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.
* tests/IGEntityExerciser.h: Treat entities with ID 0 a little
differently as they should be rigged up as the world for testing.
* tests/Creatortest.cpp, tests/Worldtest.cpp: Remove the test world
is it is now set up in the exerciser.
* rulesets/Character.cpp, rulesets/Character.h: Remove SEX property
from Character.
* rulesets/attributes.h, server/Persistor_impl.h, server/Restorer.cpp:
Remove SEX property from the persistence code.
* tests/Charactertest.cpp, tests/Creatortest.cpp: Remove SEX attribute
from the tests, as it is no longer there.
* rulesets/Character.cpp, rulesets/Creator.cpp, rulesets/Entity.cpp,
rulesets/Entity.h, rulesets/Pedestrian.cpp, rulesets/Py_Thing.cpp,
rulesets/Stackable.cpp, rulesets/Thing.cpp, rulesets/World.cpp:
Remove m_world member variable from all Entity classes, and
access the world manager object as a singleton.
* tools/Makefile.am: Add the network libraries to cypasswd as they
are needed on some platforms for gethostname.
* tests/Makefile.am: Ensure the tests like correctly.
* tests/Creatortest.cpp, tests/Charactertest.cpp: Remove test for
drunkness property, as it has been removed from the Character
entity class.
* tests/TestWorld.h, tests/Creatortest.cpp, tests/Worldtest.cpp:
Move test implementation of BaseWorld into its own header, as
it's used in multiple places.
* common/inheritance.cpp, common/inheritance.h: Re-introduce
opEnumerate function as its useful for scripts, and tests.
* tests/inheritancetest.cpp: Add necessary includes to pick up
operation class numbers.
* tests/Areatest.cpp, tests/BaseEntitytest.cpp,
tests/Charactertest.cpp, tests/Creatortest.cpp,
tests/EntityExerciser.h, tests/Entitytest.cpp,
tests/Foodtest.cpp, tests/Linetest.cpp, tests/OOGThingtest.cpp,
tests/Planttest.cpp, tests/Stackabletest.cpp,
tests/Structuretest.cpp, tests/Thingtest.cpp, tests/Worldtest.cpp:
Remove all uses of the removed op subscription mechanism.
* tests/Creatortest.cpp, tests/EntityExerciser.h,
tests/Tasktest.cpp, tests/Worldtest.cpp,
tests/allOperations.h, tests/inheritancetest.cpp,
tests/utilitytest.cpp: Fix up tests to work with new Atlas-C++
version.
* common/BaseEntity.cpp, common/BaseWorld.h, common/refno.h,
common/serialno.h, rulesets/Character.cpp, rulesets/Creator.cpp,
rulesets/World.h, server/Account.cpp, server/Admin.cpp,
server/Connection.cpp, server/Lobby.cpp, server/ServerRouting.h,
server/WorldRouter.cpp, server/WorldRouter.h, tests/Creatortest.cpp,
tests/Worldtest.cpp: Simplify the way operation refnos and serialnos
are handled, getting rid of some unnecessary virtual methods and
functions.