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/EntityProperty.h, rulesets/EntityProperty.cpp:
Refactor so this property is always dynamic, and add an accessor.
* rulesets/Character.cpp, rulesets/Character.h: Remove the hard
coded entity references used for wield tool, and replace with
a dynamic property.
* rulesets/EntityProperty.cpp: Modify EntityProperty so it
shows its value as an empty ID if it is not set to anything,
and clears its reference if it is set to an empty string.
* rulesets/Character.cpp: Fix the code that handles an empty wield
argument, so it clears the wielded entity correctly and efficiently.
* rulesets/attributes.h, server/Persistor_impl.h,
server/Restorer.cpp: Remove right_hand_wield from the
persistence layer, pending its complete removal.
* rulesets/EntityProperty.h, rulesets/EntityProperty.cpp:
Make EntityProperty a more normal property by making it hold
a reference to its value, not the value itself.
* rulesets/Character.cpp, rulesets/Character.h: Use EntityProperty
for right_hand_wield attribute, so it stores the value long term
which I think is more efficient.
* tests/EntityPropertytest.cpp: Add a complete set of unit tests for
EntityProperty.
* rulesets/EntityProperty.cpp: Fix and instrument the code based
on the findings from the unit test.