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, 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.
* rulesets/TerrainProperty.cpp, rulesets/World.cpp: Fix the code
to take account of the modified semantics of Segment member
variable xref and yref.
* configure.ac: Add a requirement for the latest version of
Mercator.
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.
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h:
Add storage for terrain.surfaces subproperty.
* rulesets/mason/define_world.py: Add some surface settings to the
default moraf terrain.
* rulesets/Character.cpp, rulesets/MemMap.cpp, rulesets/Motion.cpp,
rulesets/Python_API.cpp, rulesets/TerrainProperty.cpp,
rulesets/Thing.cpp, rulesets/World.cpp: Don't use camel casing for
local variables or function arguments.
* rulesets/Py_Property.h, rulesets/Py_Property.cpp: Add handling
for a Python wrapper for terrain property.
* rulesets/TerrainProperty.h, rulesets/TerrainProperty.cpp:
Copy functions from World for getting information about surface
and height from the terrain property.
* tests/Makefile.am: Update the linker options for the flags now that
the core property code references the mercator terrain library.
* common/Property.h, common/Property_impl.h,
rulesets/AreaProperty.cpp, rulesets/AreaProperty.h,
rulesets/CalendarProperty.cpp, rulesets/CalendarProperty.h,
rulesets/Entity.cpp, rulesets/EntityProperties.cpp,
rulesets/LineProperty.cpp, rulesets/LineProperty.h,
rulesets/Py_Thing.cpp, rulesets/StatisticsProperty.cpp,
rulesets/StatisticsProperty.h, rulesets/TerrainProperty.cpp,
rulesets/TerrainProperty.h: Change return value of Property::get
to bool, and use it to indicate if the property has a value.
* common/Property.cpp, common/Property.h, common/Property_impl.h:
Add a default add() method to the Property base class, as its
often the same in derived classes.
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h:
Remove add() method, as its now covered by the default in
the base class.
* rulesets/Entity.cpp: Fix for loop not to create temporary for
end() on every iteration.
* common/Property.cpp, common/Property.h, common/Property_impl.h:
Add new ImmutableProperty for properties that cannot be
modified, and hold a const reference.
* rulesets/EntityProperties.cpp: Add some specialisations of
Property to handle attributes of Entity.
* rulesets/LineProperty.h, rulesets/LineProperty.cpp:
Property class for handling linear list of coordinates.
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h:
Property class for handling Mercator terrain.