This changes any entity references to not present the data as a regular
string. Instead any entity reference is presented as a map, with one
entry named "$eid".
This allows clients to know what values are references to other
entities, and act upon that. This wasn't possible previously when a
simple string was used instead.
Note that those properties that implicitly refer to other entities, i.e.
"contains" and "loc" still use strings. This is because these are known
by the entity as entity referring entities.
All IG code should use the interface of LocatedEntity when dealing
with any entity, rather than sometimes requiring Entity. Add virtual
functions to the interface where required, and modify all other interfaces
to stop them using Entity. This makes the code way cleaner, and much better
de-coupled.
* rulesets/LocatedEntity.cpp, rulesets/LocatedEntity.h: Add a virtual
function that is called when the location of an entity changes.
* rulesets/Entity.cpp, rulesets/Entity.h: Implement the virtual
function called when location changes and use it to call the
containered signal. Remove the containered_oneshots list, and
make containered inherently one shot only.
* rulesets/OutfitProperty.cpp: Remove the use of containered_oneshots
is this mechanism is obsolete and has been removed.
* rulesets/OutfitProperty.cpp: Add the connection to the entities
deleted signal to those to be removed when the entity is containered
or a garment will be connected to its wearer forever, even after
it has been removed.
* rulesets/OutfitProperty.h, rulesets/OutfitProperty.cpp: Add
arguments to methods, so the owner of this property is available
in important parts of the code. Trigger an Update when clothing
is removed, so the property change is propagated.
* rulesets/Character.cpp: Call OutfitProperty with a pointer to
the Character, so it knows where to send the update.
* rulesets/Entity.h, rulesets/Entity.cpp: Add a mechanism to make
signal connection to Entity::containered single shot only.
* rulesets/OutfitProperty.cpp: Make the connect to garments
containered signal single shot, to avoid having to disconnect it.
* rulesets/OutfitProperty.cpp, rulesets/OutfitProperty.h:
Add a virtual destructor, for strict correctness.
* rulesets/Entity.cpp: Clean up variable names in destroy().
Moving moving contents into LOC on destruction, remove the
ref counts to the destroyed entity held by its contents.
This means Characters can now get deleted.
* rulesets/OutfitProperty.cpp, rulesets/OutfitProperty.h: Make this
property sigc++ trackable, and add a method to handle signals
indicating that the entity has been removed from the outfit.
* rulesets/mason/define_world.py: Add a test function for messing
with outfit.
* rulesets/Character.cpp: Make sure the "outfit" property really is
an OutfitProperty.
* rulesets/OutfitProperty.h, rulesets/OutfitProperty.cpp: Ensure that
removed garments or equipment get reported as empty IDs, and provide
a function to clean them up. Provide a direct function for adding
garments, without needing to go through the slower standard interface.
* rulesets/mason/define_world.py: Add a quick hacked in test garment.
* rulesets/Character.cpp: Implement adding OUTFIT property on demand,
and adding to it anything wielded that has a WORN attribute.
* rulesets/OutfitProperty.cpp, rulesets/OutfitProperty.h:
Remove the flags constructor argument, as this type of property
doesn't work that way.
* server/CorePropertyManager.cpp: Add OUTFIT property to the
dynamic properties handled by the property manager.
* rulesets/GuiseProperty.h, rulesets/GuiseProperty.cpp,
rulesets/OutfitProperty.h, rulesets/OutfitProperty.cpp,
rulesets/Makefile.am: Rename "guise" to "outfit" as had
been agreed quite a while ago on irc, but I forgot. History
preserved using cvs repository hackery.
* rulesets/GuiseProperty.cpp, rulesets/GuiseProperty.h:
New property class to handle guise data. I think we had decided
to call this property something else, but I can't remember what.
* common/Property.h, rulesets/EntityProperty.h,
rulesets/LineProperty.h: Regularise argument names in property
classes, to make checking easier and reduce chance of mimatched
overriding.