* common/log.cpp, common/log.h: Switch to taking a C++ string reference
rather than a char *, as it is not really an optimisation, and it
makes the code simpler to read and write.
* client/BaseClient.cpp, client/ClientConnection.cpp,
common/AtlasFileLoader.cpp, common/BaseEntity.cpp,
common/Database.cpp, common/globals.cpp, common/id.cpp,
common/inheritance.cpp, common/log.cpp, common/log.h,
rulesets/Character.cpp, rulesets/Creator.cpp, rulesets/Entity.cpp,
rulesets/MemMap.cpp, rulesets/Motion.cpp, rulesets/Pedestrian.cpp,
rulesets/Py_Object.cpp, rulesets/Py_RootEntity.cpp,
rulesets/PythonMindScript.cpp, rulesets/PythonThingScript.cpp,
rulesets/Python_API.cpp, rulesets/Thing.cpp, server/Account.cpp,
server/Admin.cpp, server/ArithmeticFactory.cpp,
server/CommClient.cpp, server/CommListener.cpp,
server/CommMDNSPublisher.cpp, server/CommServer.cpp,
server/Connection.cpp, server/EntityFactory.cpp,
server/Persistance.cpp, server/Restoration.cpp,
server/ScriptFactory.cpp, server/TaskFactory.cpp,
server/WorldRouter.cpp, server/server.cpp: Convert over to using
new API correctly.
* data/mason.xml: Add biomass and transient to fircone, making its
script obsolete:
* index.dox, common/BaseWorld.cpp, common/BaseWorld.h,
common/PropertyFactory.h, common/PropertyManager.h, common/const.h,
rulesets/ActivePropertyFactory.h, rulesets/Entity.h,
rulesets/Py_Vector3D.h, rulesets/Py_World.h, rulesets/Py_WorldTime.h,
rulesets/PythonMindScript.cpp, rulesets/PythonMindScript.h,
rulesets/PythonScript.h,
rulesets/PythonThingScript.h, rulesets/PythonWrapper.cpp,
rulesets/PythonWrapper.h, rulesets/Script.cpp, rulesets/Script.h,
server/ArithmeticFactory.h, server/CommServer.h, server/CommSocket.h,
server/ScriptFactory.cpp, server/TaskFactory.cpp,
server/TaskFactory.h, server/WorldRouter.cpp, tools/AdminClient.h,
tools/cyaddrules.cpp, tools/cycmd.cpp, tools/cyconfig.cpp,
tools/cydumprules.cpp, tools/cyloadrules.cpp:
Add a truck load of inline docs.
* tools/cywatchdog.cpp: Mark obsolete file as removed from the build.
* tools/cyloadrules.cpp, tools/cyconfig.cpp, tools/cyaddrules.cpp:
Rename some overly generic types so they have more indicative
and unique names.
* FIXME, server/ScriptFactory.cpp, server/TaskFactory.h: Add a couple
of formal FIXMEs to sort out the code for loading modules and
classes.
* rulesets/PythonThingScript.h: Remove some commented out code.
* rulesets/Task.cpp, rulesets/Task.h: Add two members to task,
progress and rate which handle the progress towards completion,
and the rate at which it is changing. Add a member function which
adds an atlas representation of the task as an attribute to an
Atlas entity.
* rulesets/Py_Task.cpp: Expose progress and rate attributes allowing
them to be set.
* server/TaskFactory.cpp: Set the name of a task when it is created
by its factory.
* rulesets/mason/world/tasks/Logging.py: Set the progress and rate
of the logging task as it progresses.
* rulesets/Character.h, rulesets/Character.cpp: Add updateTask()
method to be called when task ticks. Make initTask, updateTask
and clearTask emit Set operations which set the TASK attribute
on the character to reflect the current status of the task.
* 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.
* rulesets/PythonThingScript.h, rulesets/PythonThingScript.cpp:
Store a pointer to the core object's python wrapper, and modify
constructor to initialise it.
* rulesets/Python_API.cpp, server/ScriptFactory.cpp,
server/TaskFactory.cpp: Modify variable name to make it clearer
what the wrapper object is. Pass wrapper to script management
object constructor, so it can store the pointer.
* rulesets/PythonMindScript.h: Make constructor explicit for
safety.
* rulesets/TaskScript.cpp, server/TaskFactory.cpp: Add some assert
checks.
* server/EntityFactory.cpp: Remove some debug output.
* rulesets/mason/world/tasks/Combat.py: Add a simple example
of the interface required in a task script.
* server/TaskFactory.cpp, server/TaskFactory.h: Re-write the
script task to handle creating the script directly, rather than
use ScriptFactory which is not suitable.
* rulesets/PythonMindScript.cpp, rulesets/PythonScript.cpp,
rulesets/PythonScript.h, PythonThingScript.cpp,
rulesets/PythonThingScript.h, rulesets/Python_API.cpp,
server/ScriptFactory.cpp: Remove obsolete pointer to entity
from script class, removing its link to Entity, making it more
generally useful.
* server/EntityFactory.h, server/EntityFactory.cpp: Add a handler for
objects in rules files.
* rulesets/TaskScript.h, rulesets/TaskScript.cpp: Task class which
delegates functionality to a script object. Basically just a
stub at this point.
* server/TaskFactory.h server/TaskFactory.cpp: Factory class for
creating instances of Task classes.