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/TerrainModProperty.cpp, rulesets/TerrainModProperty.h,
server/CorePropertyManager.cpp: Re-work part of the way
terrain mod properties are set up, removing the need for
a setup handler, and using install instead.
* 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.
* rulsets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Add a
function to easily remove a terrain mod from the terrain.
* server/CorePropertyManager.cpp: Fix the delete handler for terrain
mods to correctly clear them from the terrain when their owning entity
is deleted.
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Fixed
an improperly named variable.
2008-08-17 Tamas Bates <rhymer@gmail.com>
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Fixed
a logic issue which would have prevented some types of terrain mods
from ever being parsed.
2008-08-17 Tamas Bates <rhymer@gmail.com>
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Fixed
a number of inconsistent indentations. Avoid passing Point3D objects
by value in the terrain modifier parsing functions.
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Fix a
number of uninitialized variables that were causing warnings. Fix the
way that the position of a modifier is retrieved when parsing to avoid
copying it to more locations than necessary. Moved the parsing code for
specific modifiers into separate functions to make them easier to find
and to shorten the main parsing function.
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h:
Avoid passing Point3D objects by value, to make the code faster.
Fix a crash in getTerrain(). Clean up for 80 columns, in the
header.
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Clean
up some commented out code. Reorganize TerrainModProperty.h so that
methods specific to terrain mods are more easily distinguished from
those used by all properties. Change the way the terrain is searched
for to avoid iterating through the entire entity tree. Removed the
prototype for an unused function named set().
* rulesets/TerrainModProperty.cpp, rulesetes/TerrainModProperty.h: Add
a member to store the pointer returned from Terrain::addMod(). Revise
set() to use this pointer.
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h: Update the
API for controlling modifiers to use the pointer returned by
Terrain::addMod() when adding or updating modifiers.
* server/CorePropertyManager.cpp: Update the handler for Move Operations
on terrain modifiers so that it correctly uses the new position.
Changes by Tamas Bates <rhymer@gmail.com>
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h: Add an
API for controlling modifiers to the terrain.
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h:
Implement a new property for entities which affect the height
of the terrain.
* server/CorePropertyManager.cpp: Add handlers to deal with
operations that manipulate the terrain when a terrain mod
property changes.
* rulesets/mason/define_world.py: Add a test function for
terrain modification properties.