set PROP_LAST_ITEM automatically

This commit is contained in:
Seth Alves 2015-04-08 17:07:20 -07:00
parent 51a0fdf3d4
commit 62ff8bf735
2 changed files with 8 additions and 2 deletions

View file

@ -27,6 +27,8 @@
#include "ParticleEffectEntityItem.h"
EntityPropertyList PROP_LAST_ITEM = (EntityPropertyList)(PROP_AFTER_LAST_ITEM - 1);
EntityItemProperties::EntityItemProperties() :
CONSTRUCT_PROPERTY(visible, ENTITY_ITEM_DEFAULT_VISIBLE),

View file

@ -99,8 +99,8 @@ enum EntityPropertyList {
PROP_SIMULATOR_ID,
////////////////////////////////////////////////////////////////////////////////////////////////////
// ATTENTION: add new properties ABOVE this line and then modify PROP_LAST_ITEM below
PROP_LAST_ITEM = PROP_MARKETPLACE_ID,
// ATTENTION: add new properties ABOVE this line
PROP_AFTER_LAST_ITEM,
////////////////////////////////////////////////////////////////////////////////////////////////////
@ -119,6 +119,10 @@ enum EntityPropertyList {
typedef PropertyFlags<EntityPropertyList> EntityPropertyFlags;
// this is set at the top of EntityItemProperties.cpp to PROP_AFTER_LAST_ITEM - 1. PROP_AFTER_LAST_ITEM is always
// one greater than the last item property due to the enum's auto-incrementing.
extern EntityPropertyList PROP_LAST_ITEM;
const quint64 UNKNOWN_CREATED_TIME = 0;
/// A collection of properties of an entity item used in the scripting API. Translates between the actual properties of an