* rulesets/Py_BBox.cpp: Add method exposing boxSquareBoundingRadius
to python.
* rulesets/Task.cpp, rulesets/Task.h: Add method to generate the
next tick for this task, using a given interval. Fix setting
progress and rate, so both can be zero.
* rulesets/Py_Task.cpp: Expose nextTick() method to python.
Allow rate to be set as an integer from python, so it can be zero.
* rulesets/mason/world/tasks/Combat.py: Use next_tick() for all
tick ops.
* rulesets/mason/world/tasks/Logging.py,
rulesets/mason/world/tasks/Raise.py,
rulesets/mason/world/tasks/Ram.py,
rulesets/mason/world/tasks/Sharpen.py: Add range checks, and use
next_tick() to simplify tick op generation.
* 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/mason/world/tasks/Logging.py,
rulesets/mason/world/tasks/Raise.py,
rulesets/mason/world/tasks/Ram.py,
rulesets/mason/world/tasks/Sharpen.py: Add serial numbers to
tick ups.
* rulesets/mason/world/tasks/Combat.py: Fix the attacker initiative
and detect if combat is obsolete if a character has been defeated.
* rulesets/Task.h: Add an accessor to return an incremented serial
number for a new tick op.
* rulesets/Py_Task.cpp: Add python wrapper for new tick accessor.
* rulesets/Character.cpp: Add debug output to code enforcing
old task ticks.
* rulesets/Character.cpp, rulesets/Task.cpp, rulesets/Task.h,
rulesets/TaskScript.cpp: Re-work tick ops to tasks so they use
argument, not sub_to to get routed to the task. Do the groundwork
for having a serial number for each op, which resets to zero when
a new task is started.
* rulesets/mason/world/tasks/Combat.py,
rulesets/mason/world/tasks/Logging.py,
rulesets/mason/world/tasks/Raise.py,
rulesets/mason/world/tasks/Ram.py,
rulesets/mason/world/tasks/Sharpen.py: Modify all current tasks
to set their arg as required.
* rulesets/Character.cpp: Improve error logging in task setup.
* rulesets/Task.h, rulesets/Py_Task.cpp: Add an accessor for the
refcount of a task, and expose it to the script interface.
* rulesets/mason/world/tasks/Combat.py: Add a check that there are
still at least two participants in combat, or end the task.
* rulesets/Py_Statistics.cpp, rulesets/Py_Task.cpp: Modify
getattr handlers for "character" to use wrapEntity.
* rulesets/Task.h: Add accessor for character that owns this task.
* rulesets/Script.cpp: Document the script interface.
* rulesets/Task.h: Modify task interface so tasks now expect
the operation that initiated the task to be passed in
to an init function.
* rulesets/Combat.h, rulesets/Combat.cpp: Modify the combat task
methods to match the interface changes.
* rulesets/Character.cpp: Modify Combat use to take account
of interface changes. Prototype using script based
combat.
* rulesets/TaskScript.h, rulesets/TaskScript.cpp: Implement
passing the initialising op through to the script using the
standard scripp operation handling functions.
* rulesets/mason/world/tasks/Combat.py: Add handler for Attack
operation, which should now be passed in at init time.
* rulesets/Task.h: Make irrelevant() virtual so that each task
class is responsible for doing most of its cleanup.
* rulesets/Movement.h: Make updateNeeded() public so other code
can determine if a character is moving.
* rulesets/Character.h, rulesets/Character.cpp: Add a stamina property.
Add clearTask() used to clear the current running task. Check
if tasks are irrelevant immediatly after setup, or after each
tick, and remove if they are.
* rulesets/Combat.h: Add irrelevant() implementation, and a static
variable defining stamina level below which combat cannot occur.
* rulesets/Combat.cpp: Switch to stamina as the base stat for
combat. Implement checking stamina at setup to ensure
both combatants are fit to fight, and each tick to determine if
someone has lost.
* common/const.h: Make the coments doxygen compatable.
* rulesets/Character.cpp: Add comments to document tool use.
* rulesets/Fell.cpp, rulesets/Fell.h, rulesets/Task.cpp,
rulesets/Task.h: Add reference to Character to base Task class,
and setup() method for task initiation.
* tests/Tasktest.cpp: Update task test for new changes.
* tests/randomtest.cpp, tests/consttest.cpp: New tests for random
and const headers.
* common/OOGThing.cpp, common/Property.cpp, common/Property.h,
common/Property_impl.h, common/inheritance.h, common/operations.cpp,
rulesets/World.cpp: Update some comments.
* rulesets/Task.h, rulesets/Task.cpp, tests/Tasktest.cpp,
rulesets/Fell.h, rulesets/Fell.cpp: New Task interface for
tasks which take a while to complete. Sample implentation provided
in the form of a Fell task for felling trees.
* rulesets/Character.cpp, rulesets/Character.h: Try out Task
implementation with Fell.