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.
* common/OperationRouter.cpp, common/OperationRouter.h: Interface
class for objects when can handle or route operations.
* common/BaseEntity.h, common/BaseEntity.cpp: Remove standard
implementation of operation handler, forcing class to provide
more specific implementations.
* rulesets/LocatedEntity.h, rulesets/LocatedEntity.cpp: Add an
implementation of the OperationRouter interface, suitable for
IG operations.
* server/ServerRouting.h, server/Peer.cpp, server/Peer.h,
rulesets/MemEntity.h: Add placeholder OperationRouter
implementations.
* server/Connection.cpp: Update OperationRouter implementation to
be better suited.
* server/Account.cpp, server/Account.h: Implement OperationRouter
for accounts.
* client/CreatorClient.cpp, client/CreatorClient.h,
client/Py_CreatorClient.cpp, common/BaseWorld.h, common/types.h,
modules/Location.cpp, modules/Location.h,
rulesets/AtlasProperties.cpp, rulesets/AtlasProperties.h,
rulesets/BaseMind.cpp, rulesets/Character.cpp, rulesets/Character.h,
rulesets/Entity.cpp, rulesets/Entity.h,
rulesets/EntityProperties.cpp, rulesets/LocatedEntity.cpp,
rulesets/LocatedEntity.h, rulesets/MemEntity.cpp,
rulesets/MemEntity.h, rulesets/MemMap.cpp, rulesets/Motion.cpp,
rulesets/Motion.h, rulesets/Py_Location.h, rulesets/Py_Mind.cpp,
rulesets/Py_Thing.cpp, rulesets/Py_Thing.h,
rulesets/PythonMindScript.h, rulesets/PythonScript.h,
rulesets/PythonThingScript.cpp, rulesets/PythonThingScript.h,
rulesets/Python_API.cpp, rulesets/Script.cpp, rulesets/Script.h,
rulesets/Thing.cpp, rulesets/World.cpp, server/WorldRouter.cpp,
server/WorldRouter.h: Refactor all the entity code so there is now
a new base class for entities in the world simulation, and in the
mind which only contains things which are trully common to both.
This moves a lot of functionality which should not have been
present in mind entities away, and makes that code safer and more
efficient.
* tests/TestWorld.h: Update the test world API to match the base
class.
* common/BaseEntity.h, common/BaseEntity.cpp: Add an integer ID
member variable, and accessor, and require it to be initialised
along with string ID in constructor.
* common/const.cpp, common/const.h: Add a const for the integer value
of the world ID.
* rulesets/Area.cpp, rulesets/Area.h, rulesets/BaseMind.cpp,
rulesets/BaseMind.h, rulesets/Character.cpp, rulesets/Character.h,
rulesets/Creator.cpp, rulesets/Creator.h, rulesets/Entity.cpp,
rulesets/Entity.h, rulesets/Food.cpp, rulesets/Food.h,
rulesets/Line.cpp, rulesets/Line.h, rulesets/MemEntity.cpp,
rulesets/MemEntity.h, rulesets/Plant.cpp, rulesets/Plant.h,
rulesets/Stackable.cpp, rulesets/Stackable.h, rulesets/Structure.cpp,
rulesets/Structure.h, rulesets/Thing.cpp, rulesets/Thing.h,
rulesets/World.cpp, rulesets/World.h: Add integer ID handling to
constructors of all in-game entity classes.
* rulesets/MemMap.cpp: Initialise integer ID of entities in the mind
map.
* rulesets/MindFactory.cpp, rulesets/MindFactory.h: Handle integer
ID when constructing mind objects.
* server/EntityFactory.cpp, server/EntityFactory.h,
server/PersistantThingFactory_impl.h: Handle integer
ID when contructing entity objects.
* server/Restoration.cpp, server/Restoration.h, server/Restorer.h,
server/Restorer_impl.h: Handle integer ID when restoring from
database.
* server/WorldRouter.cpp: Assign integer ID when constructing the
world.
* client/CharacterClient.h, client/CreatorClient.h,
common/OOGThing.h, rulesets/Entity.h, rulesets/MemEntity.h:
Fix naming of header guards so they are consistant.
* common/BaseEntity.h, common/OOGThing.h, rulesets/Area.h,
rulesets/BaseMind.h, rulesets/Entity.h, rulesets/Food.h,
rulesets/Line.h, rulesets/MemEntity.h, rulesets/Missile.h,
rulesets/Plant.h, rulesets/Stackable.h, rulesets/Structure.h,
rulesets/Thing.h, rulesets/World.h, server/Account.h,
server/Connection.h, server/Lobby.h: Update the comments describing
the function of these classes.
* rulesets/Character.h, server/Account.cpp, server/Connection.cpp,
server/ExternalMind.cpp, server/ExternalMind.h: Make ExternalMind
inherit from BaseEntity, eliminating the need for the name argument
to the constructor and simplifying the class greatly by dropping
loads of unused inherited functionality.
* rulesets/MemMap.cpp: Very carefully ensure that the garbage
collection iterator is not reset to the beginning too often
so that we cover the whole mind.
* rulesets/MemEntity.h: Only report time skew if the time passed
is non-zero.
* rulesets/BaseMind.cpp: Some useful debugging output.
* rulesets/PythonMindScript.cpp: Go back to using getAdd.
* rulesets/MemEntity.h: Tweak check for backwards time so we
only report an error if it really is backwards.
* rulesets/BaseMind.cpp, rulesets/MemEntity.h,
rulesets/MemMap.cpp, rulesets/MemMap.h: Implement a function
which slowly iterates over the contents of the mind checking
for things which are obsolete, and removes them.
* client/CreatorClient.cpp, rulesets/BaseMind.cpp,
rulesets/MemEntity.cpp, rulesets/MemEntity.h,
rulesets/MemMap.cpp, rulesets/MemMap.h, rulesets/Py_Map.cpp:
Set time on memory entities when we update them.
* common/BaseWorld.h: Make object accessor const.
* common/Database.cpp, common/Database.h, common/accountbase.cpp,
server/Connection.cpp, server/Persistance.cpp,
server/WorldRouter.cpp: Rename function to get new ID from
database to more correctly reflect its role.
* rulesets/PythonMindScript.cpp: Use get rather than getAdd
to sort out to and from of ops send to mind scripts.
* rulesets/mason/define_world.py: Add a couple more test functions.
* rulesets/MemMap.h: Add accessor for internal data for debugging.
* rulesets/MemMap.cpp: Comments and debugging output to help solve
memory bloat.
* rulesets/MemEntity.h, rulesets/MemEntity.cpp: Add flag to track
whether entities in memory are visible to the NPC.
* rulesets/Entity.cpp: FIXME note for coordinate conversion.
* rulesets/BaseMind.cpp: Track the visibility of entities in
the mind.
* client/CommClient.cpp, rulesets/Entity.cpp, rulesets/Entity.h,
rulesets/Entity_getLocation.h, server/EntityFactory.cpp:
Make Entity::getLocation a template, so it works with maps on
types other than entity.
* rulesets/BaseMind.cpp, rulesets/BaseMind.h,
rulesets/MemEntity.cpp, rulesets/MemEntity.h,
rulesets/MemMap.cpp, rulesets/MemMap.h, rulesets/Py_Map.cpp:
Make MemEntity inherit from Entity, and BaseMind inherit from
MemEntity, and use MemEntity for all objects in MemMap, so we
can have extra functionality on MemEntity.