These properties didn't work out when we moved to a physics based world.
Instead we've introduced the properties "planted-offset" and "planted-scaled-offset".
These properties takes a float and specified vertical offset for planted entities.
Likewise with "planted-rotation" which specifies a rotation applied for planted entities.
"active-rotation" keeps track of any applied rotation.
Instead of directly setting position and orientation we've now
added a "transforms" property. This property contains zero or many
transformations. The result of these is what drives changes to an
entity's position and orientation.
By cleanly separate disrete transformations we can more easily undo
or alter them. This allows us to do things where the position or
orientation of an entity is affected by other properties, or other
entities.
The client protocol is intact. Changes to position and orientation is
still sent the same way, by specifying "pos" and "orientation". However,
these values will now not be written directly to corresponding values on
the entity. Instead they will first be written to the "transforms" property,
with the final values being a result of combining all data in the property.
When we're restoring from storage we don't want to apply any properties
at all when the entity is created, since we'll do that ourselves in a
later pass. This is done by submitting an invalid RootOperation pointer.
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.
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/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.
* server/EntityFactory.cpp: Check class names do not violate a
32 character limit before installing them, so they never get
as far as the database limit.
* common/Database.cpp: Modify the rules table so it limits
the ID to the right size.
* server/EntityFactory.cpp: When tasks cause defaults to be changed,
also propagate the changes to the class properties.
Fixes https://bugs.launchpad.net/bugs/268725
* rulesets/ActivePropertyFactory_impl.h: Re-work the active property
factories so they just pass handler information to the property
classes rather than installing it themselves, so the property
can now handle installing the handlers each time they are installed
on an entity, making class default properties work.
* client/ClientPropertyManager.cpp, client/ClientPropertyManager.h,
common/PropertyFactory.h, common/PropertyFactory_impl.h,
common/PropertyManager.h, rulesets/ActivePropertyFactory.h,
server/CorePropertyManager.cpp, server/CorePropertyManager.h:
Modify the property manager and property factory interfaces so they
do not take a pointer to the owner, as this is never required any
more.
* rulesets/Character.cpp, rulesets/Entity.cpp: Modify code that uses
property managers to use the new interface.
* rulesets/SolidProperty.cpp, rulesets/SolidProperty.h: Make use of
the bool flag to implement this, preventing it from being tied to
having a pointer to the owner at creation time.
* rulesets/StatusProperty.cpp, rulesets/StatusProperty.h: Remove
the need for an owner pointer at construction time by using the
apply method.
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h:
Use new MultiActivePropertyManager and install method to handle
installing handlers rather than relying on the factory to do it.
* server/CorePropertyManager.cpp: Change many of the property
factories now that none get get an owner pointer.
* server/EntityFactory.cpp: Set up default properties on all type
nodes when a new class is installed, and don't apply instance
properties based on class defaults, relying on class properties.
* rulesets/Entity.cpp: Remove hard coded BBox property now that the
functionality is handled by a more special property.
* server/EntityFactory.cpp, server/PersistantThingFactory.cpp,
server/PersistantThingFactory.h,
server/PersistantThingFactory_impl.h:
Add a count to each factory of the number of entities
it has created, and add a monitor watch to each one.
* server/StorageManager.cpp, server/StorageManager.h: Add counters
for the various types of database query, and add monitor watches
for them.
* server/ScriptFactory.cpp: Simplify way the name of a class
is determined by removing the hack to upercase the type name.
* server/EntityFactory.cpp: Break python type name on the last
. making the name of the class independant of the Atlas type.
* data/basic.xml, data/buildings.xml, data/characters.xml,
data/clothing.xml, data/mason.xml, data/plants.xml,
data/tools.xml, data/weapons.xml, data/werewolf.xml: Modify all
python type names in the classes to include the name of the class
explicitly.
* rulesets/attributes.h: Remove old attribute flags used for
persistence from the build.
* rulesets/Entity.h: Replace obsolete update flags with a more
general flags field, and define three needed to track the
cleanness of basic location data.
* rulesets/Plant.cpp, rulesets/World.cpp: Remove now unused update
flags from property initialisation.
* rulesets/Entity.cpp, rulesets/Thing.cpp, server/EntityFactory.cpp:
Replace code which updated update flags with simpler changes to
the new flags field.
* server/EntityFactory.cpp: Delete the peristance connector in
the right place.
* server/PersistantThingFactory.h: Document what the persistor
connector does more clearly.