This is a mind which only registers the world, and then is responsible
to send what it knows about the world to any external mind that's
connected to the character.
Currently it only sends the thoughts that's been sent to the character.
We now register a an external mind with the ExternalMindsManager and
then let the manager make sure that there's an external mind connected.
When the external client is disconnected the manager will try to find a
new client to handle the mind.
The idea is that entities which aren't externally controlled at the
moment of death are put in limbo. Once they become externally controlled
again (i.e. the user logs in) they are respawned. This ought to fix the
issue with the graveyard being full of abandoned characters.
This required the EntityKit to be refactored, so that most fields are
pushed into EntityFactory. Due to the nature of how the rule handlers
and the factories interact the code is pretty messy. It works, but it's
tangled and not really clean.
If a character a wielded an entity b, and then was destroyed, and then b
was re-containered, it would result in segfault due to a lingering
connection. This fixes it, but it's a temporary fix until we've
transferred to using "outfit" for wielding.
The relay mechanism, through the new internal Relay operation, allows
one external client to relay an operation to another external client,
and get the response back.
This can currently only be used by Creator clients. It's main use is for
mind introspection.
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/Identified.cpp, common/Identified.h, rulesets/Character.h,
rulesets/LocatedEntity.h, server/Account.h, server/Admin.cpp,
server/CommClient.cpp, server/CommClient.h, server/Connection.cpp,
server/Connection.h, server/ExternalMind.h,
server/ExternalProperty.cpp, server/ExternalProperty.h,
server/Lobby.h, server/Master.h, server/Peer.h,
server/ServerRouting.h, server/SlaveClientConnection.h:
Rename IdentifiedRouter to Router as it's the base class
for pretty much all routers.
* rulesets/Character.cpp, rulesets/Character.h: Remove all traces
of the hard coded statistics property from Character.
* rulesets/Py_Property.cpp: Don't use Py_StatisticsProperty as the
default wrapper for a statistics property because it will no
longer work this way.
* rulesets/Python_API.cpp: Remove the setup for the Statistics
wrapper.
* rulesets/StatisticsProperty.cpp, rulesets/StatisticsProperty.h:
Change the footprint of this class so it is no longer hooked
into part of the Character class, and instead handles looking
up values from the script directly, and owns the script itself.
* server/ArithmeticFactory.cpp, server/ArithmeticFactory.h,
server/EntityFactory.cpp, server/EntityFactory.h,
server/PersistantThingFactory.cpp: Remove setup of hard coded
statistics property.
* rulesets/Statistics.h, rulesets/Statistics.cpp,
rulesets/Py_Statistics.h, rulesets/Py_Statistics.cpp,
rulesets/Makefile.am: Remove clases that are no longer used.
* rulesets/Character.cpp, rulesets/Character.h: Remove the setup
handler which used to install minds and send tick, as this is
all handled by properties now.
* rulesets/Character.cpp, rulesets/Character.h: Remove some of the
obsolete handlers in the filter on ops from the mind. Stop using
the generic IG op switch, and write a custom one.
Fix a bug where Use ops were getting filtered out unintentionally.
* data/operations.xml: Add an op definition for "actuate" to be used
for interacting with devices and machines.
* rulesets/Character.cpp, rulesets/Character.h: Mock up the code for
processing actuate operations from the client or mind.
* client/BaseClient.cpp, common/BaseEntity.cpp, common/BaseEntity.h,
common/Identified.cpp, common/Identified.h, common/Makefile.am,
common/OOGThing.cpp, common/OOGThing.h, common/OperationRouter.cpp,
common/OperationRouter.h, rulesets/Character.h, rulesets/Entity.h,
rulesets/LocatedEntity.cpp, rulesets/LocatedEntity.h,
server/Account.cpp, server/Account.h, server/Admin.cpp,
server/CommClient.cpp, server/CommClient.h, server/Connection.cpp,
server/Connection.h, server/ExternalMind.cpp, server/ExternalMind.h,
server/ExternalProperty.cpp, server/ExternalProperty.h,
server/Lobby.cpp, server/Lobby.h, server/Master.cpp, server/Master.h,
server/Peer.cpp, server/Peer.h, server/ServerRouting.cpp,
server/ServerRouting.h, server/SlaveClientConnection.cpp,
server/SlaveClientConnection.h: Factor out the more pointless base
classes, in favor of simple interface. Move destroyed signal to
Entity, which is the only place it is needed.
* 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.
* data/animals.xml: Give all the animals BIOMASS.
* data/characters.xml: Add mass to some character classes that were
missing it.
* rulesets/Character.cpp, rulesets/Character.h, rulesets/Entity.cpp,
rulesets/Entity.h, rulesets/Plant.cpp, rulesets/Statistics.cpp,
rulesets/World.cpp, server/CorePropertyManager.cpp,
server/Persistor.cpp, server/Persistor_impl.h,
server/Restorer_impl.h: Remove the hard coded mass property from
Entity.
* rulesets/mason/world/statistics/Statistics.py: Fix scripts which
assume entities will have mass.
* rulesets/Character.cpp, rulesets/Character.h, rulesets/Entity.cpp,
rulesets/Entity.h, rulesets/Plant.cpp, rulesets/Py_Thing.cpp,
rulesets/StatusProperty.cpp, rulesets/attributes.h,
server/CorePropertyManager.cpp, server/Persistor.cpp,
server/Persistor_impl.h, server/Restorer.cpp,
server/Restorer_impl.h: Remove the hard coded status property from
Entity, and the hard coded food property from character. Fix
the logic handling digestion and plants to use the new softer
properties.
* 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/op_switch.h, rulesets/Character.cpp, rulesets/Character.h:
Strip all the negative matching out of the filter for operations
going from world to mind, instead only dispatch those that pass, or
need to be checked.
* common/BaseEntity.cpp, common/BaseEntity.h, common/custom.cpp,
common/op_switch.h, rulesets/BaseMind.cpp, rulesets/Character.cpp,
rulesets/Character.h, rulesets/Thing.cpp, rulesets/Thing.h,
tests/EntityExerciser.h: Remove the long obsolete Action op from
the core code.
* common/BaseEntity.cpp, common/BaseEntity.h, common/op_switch.h,
rulesets/Character.cpp, rulesets/Character.h: Remove the chop
operation completely from the core code. Remove some OOG
operations from the world to mind filter, as they should never
occur.
* rulesets/BaseMind.cpp, rulesets/Plant.cpp: Remove some obsolete
operation header includes.
* tests/EntityExerciser.h: Remove Chop from the test for entity.
* common/BaseEntity.cpp, common/BaseEntity.h, common/op_switch.h,
rulesets/Character.cpp, rulesets/Character.h, rulesets/Food.cpp,
rulesets/Food.h, rulesets/World.cpp, rulesets/World.h,
tests/EntityExerciser.h: Purge the burn operation from the core
operation handling code. One down, many still to go.