* 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/Py_Property.h, rulesets/Py_Property.cpp,
rulesets/Py_TerrainProperty.cpp, rulesets/Makefile.am,
rulesets/Python_API.cpp: Complete implementation of terrain
property wrapper.
* rulesets/mason/world/tasks/Reap.py: Check the surface to make sure
it is grass. Remove deubg output.
* 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.
* rulesets/Py_BBox.cpp, rulesets/Py_Statistics.cpp,
rulesets/Python_API.cpp: Replace calls to the cyphesis log
system with Python exceptions.
* rulesets/Py_Mind.cpp: Accept map and list atlas attributes on
the mind object.
* rulesets/Py_Property.cpp: Improve the wording of some log messags.
* rulesets/Py_RootEntity.cpp: Assert that attributes work correctly.
* rulesets/Plant.cpp: Add FIXME about an issue with plants eating
people.
rulesets/Py_Location.h, rulesets/Py_Map.h, rulesets/Py_Mind.h,
rulesets/Py_Object.h, rulesets/Py_Operation.h, rulesets/Py_Oplist.h,
rulesets/Py_Point3D.h, rulesets/Py_Quaternion.h,
rulesets/Py_RootEntity.h, rulesets/Py_Task.h, rulesets/Py_Thing.h,
rulesets/Py_Vector3D.h, rulesets/Py_World.h, rulesets/Py_WorldTime.h:
Re-wrote PyFoo_Check macros to comply with recent conventions
and be a little more efficient.
* rulesets/Py_Statistics.cpp, rulesets/PythonArithmeticScript.cpp,
rulesets/mason/world/statistics/Statistics.py: Remove lots of
debug output.
* rulesets/PythonArithmeticScript.h: Add an accessor to get to the
python object.
* rulesets/StatisticsProperty.h: Add an accessor to get to the
Statistics reference handled by this class.
* rulesets/Py_Property.cpp: Return the script for a statistics
object rather than creating a wrapper for it.
* rulesets/Character.cpp, rulesets/StatisticsProperty.h,
rulesets/StatisticsProperty.cpp: Add a property handler for
statistics.
* rulesets/Character.cpp: When setting task, check if an existing
task needs to be cleared first. When clearing a task, check
whether a task exists or not.
* rulesets/Character.cpp: When initiating combat task from task
factory, check to see if the task is successfully created before
using it.
* rulesets/Py_Property.cpp, rulesets/Py_Property.h: New python wrapper
class for entity properties.
* rulesets/Py_Mind.cpp: Re-work getattr logic to make it clearer.
* rulesets/Py_Object.cpp: Return Py_None when an Atlas Element cannot
be converted to python. This ensures that this function never returns
null.
* rulesets/Py_Statistics.cpp: Add temporary handlers for hardcoded
statistics for "attack", "defence", and "strength".
* rulesets/Py_Task.cpp: Add wrappers for methods Task.irrelevant and
Task.obsolete, as these are now required in combat scripts.
* rulesets/Py_Task.h: Fix the PyTask_Check macro, which was miscoded.
* rulesets/Py_Thing.cpp: Add wrapper for Entity.send_world so that
scripts can channel ops through entities.
* rulesets/Py_Thing.h, rulesets/Py_Thing.cpp: Add an addition structure
for directlty wrapping Character in a type safe way. Add method
structure pointer to Entity and Character wrappers so that
the same getattr method is used for both. Add new method table for
Character including wrappers for set_task and clear_task, allowing
task scripts to add themselves and remove themselves from
characters. Modify wrapEntity() to ensure that Character entities
get the right wrapper.
* rulesets/Py_Thing.cpp: Re-work getattr code so that properties and
soft attributes are checked individually, rather than in a single
call to Entity.get. Use new python property wrappers to wrap
properties explicitly if required rather than converting to Atlas
then to generic Python data.
* rulesets/TerrainProperty.h: Fix incorrect class description in
documentation.
* rulesets/mason/world/tasks/Combat.py: Complete implementation of
simple example combat.
* server/TaskFactory.cpp: Remove debug output.