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.
The Link reference provided is the object allowing direct communication
back to the external source of the operation. This allows us to handle
things more cleanly in some cases.
* Charactertest.cpp, Creatortest.cpp, Planttest.cpp,
Stackabletest.cpp, Structuretest.cpp, Thingtest.cpp,
Worldtest.cpp: Update tests so they no longer expect the
contains property to be set by default.
* tests/Areatest.cpp, tests/Charactertest.cpp, tests/Creatortest.cpp,
tests/Entitytest.cpp, tests/Foodtest.cpp, tests/Linetest.cpp,
tests/Planttest.cpp, tests/Stackabletest.cpp, tests/Structuretest.cpp,
tests/Thingtest.cpp, tests/Worldtest.cpp: Remove mass from the
attribute names assumed in the entity tests.
* tests/Areatest.cpp, tests/Charactertest.cpp, tests/Creatortest.cpp,
tests/Entitytest.cpp, tests/Foodtest.cpp, tests/Linetest.cpp,
tests/Planttest.cpp, tests/Stackabletest.cpp,
tests/Structuretest.cpp, tests/Thingtest.cpp,
tests/Worldtest.cpp: Remove the STATUS and NAME properties
from those expected to be on all entities.
* tests/ThingupdatePropertiestest.cpp: Comment out all the code
as it depends on the NAME property being hard coded.
* common/inheritance.cpp, common/inheritance.h: Introduce a type
node class as a carrier for all information, including default
values for a type.
* rulesets/Entity.h, rulesets/Entity.cpp, rulesets/Character.cpp:
Use a TypeNode pointer rather than a string giving the type
of an entity.
* client/Py_CreatorClient.cpp, rulesets/MemMap.cpp, rulesets/MemMap.h,
rulesets/MindFactory.cpp, rulesets/MindFactory.h,
rulesets/Py_Mind.cpp, rulesets/Py_Thing.cpp, rulesets/Stackable.cpp,
rulesets/World.cpp, server/PersistantThingFactory.h,
server/Restorer_impl.h, server/WorldRouter.cpp:
Adapt all the code that deals with types. Set the type pointer
up correctly in BaseMind.
* server/EntityFactory.cpp: Initialise the TypeNode pointer on new
entities.
* tests/inheritancetest.cpp: Adapt the test to cope with TypeNode.