* common/globals.cpp, common/globals.h: Add a config flag
to control whether database code is enabled.
* server/EntityFactory.cpp, server/EntityFactory.h,
server/PersistantThingFactory.cpp, server/PersistantThingFactory.h,
server/PersistantThingFactory_impl.h, server/Persistor.cpp:
Re-work the persistence code so that persistent or non-persistent
versions of entity factories are installed at startup, removing
the need to check whether the database is enabled during
runtime.
* common/newid.cpp, server/Connection.cpp, server/server.cpp:
Replace the const that used to control whether the database
was used with the config flag.
* rulesets/PythonArithmeticScript.cpp: Implement getting attribute
values from statistics script.
* rulesets/Statistics.cpp, rulesets/Statistics.h,
rulesets/Py_Statistics.cpp, rulesets/Character.cpp,
rulesets/Combat.cpp: Remove hard coded stats for combat
and strength.
* rulesets/mason/world/statistics/Statistics.py: Add test support
for combat and strength stats.
* server/PersistantThingFactory.cpp: Remove debug output.
* rulesets/ArithmeticScript.h: Remove redundant constructor.
* rulesets/ArithmeticScript.cpp: Provide empty virtual destructor
implementation.
* rulesets/Py_Statistics.cpp: Add debugging output, and remove
rubbish from __init__.
* rulesets/PythonArithmeticScript.cpp: Test implementation of
attribute.
* server/ArithmeticFactory.cpp, server/ArithmeticFactory.h: New
factory class to create instances of scripts to handle
statistics.
* server/EntityFactory.cpp, server/EntityFactory.h: Add new method
and supporting data structures to provide a way to create
statistics objects for newly created Character entities.
* server/PersistantThingFactory.cpp: Add a call to
EntityFactory::addStatisticsScript to the Character
specialisation of PersistantThingFactory::populate, giving
all characters a statistics script now.
* rulesets/mason/world/statistics/Statistics.py: Test implementation
of a class for all character statistics.
* rulesets/ArithmeticScript.h: Remove compile time warnings.
* rulesets/Statistics.h, rulesets/Statistics.cpp: Pass stats request
onto script object if one is available.
* server/PersistantThingFactory.h,
server/PersistantThingFactory_impl.h,
server/PersistantThingFactory.cpp: Add a populate method to the
entity factory, and specialise it for Character so it can be
used to add scripted statistics.
* server/EntityFactory.cpp: Add a call to populate() in the right
place.
* rulesets/Thing.cpp: Fix leak of Motion object.
* rulesets/World.cpp, rulesets/World.h: Make tileShader a member
variable, and delete it in the destructor to avoid a leak.
* server/PersistantThingFactory.cpp: Fix leak of ScriptFactorys.
* server/PersistantThingFactory_impl.h: Fix leak of Persistor
in ForbiddenThingFactory.
* rulesets/mason/world/objects/tools/Rope.py: Correct the syntax
of stub functions.
* rulesets/basic/world/objects/buildings/StoneHouse.py: Fix the import
statements.
* rulesets/basic/world/objects/buildings/House.py: Fix import for
physics module.
* rulesets/basic/mind/goals/common/misc_goal.py: Fix typo in
cut_something.
* server/ScriptFactory.cpp, server/ScriptFactory.h: New factory
class for handling python scripts for entities much more
efficiently, and provide a means where they can be re-imorted
at an apropriate time.
* server/PersistantThingFactory.h,
server/PersistantThingFactory.cpp: Make PersistantThingFactory
copy constructor protected, to ensure its not used accidentally.
Replace strings for storing python script data with a pointer
to a factory for creating scripts.
* server/EntityFactory.cpp: Use the new ScriptFactory mechnism
for creating scripts attached to entities. Improve variable
names a little.
* server/PersistantThingFactory.h, PersistantThingFactory_impl.h,
server/PersistantThingFactory.cpp: Add ForbiddenThingFactory
for entity classes that need persistence, but can't be instantiated
through the normal channels.
* server/EntityFactory.cpp: Use ForbiddenThingFactory for World.
* server/WorldRouter.cpp: Correct error message for entity
creation failure to include "forbidden" as a possible cause.
* Use " instead of < when including application headers.
* Re-work the interface between server and worldrouter objects
so that the are less tied together, and more flexible.
* server/WorldRouter.cpp, server/Admin.cpp:
Use consts::rootWorldId correctly.
* server/Persistor.cpp, server/PersistantThingFactory.cpp,
server/PersistantThingFactory.h, server/EntityFactory.h,
server/EntityFactory.cpp: Add World specialisation of Persistor
so that row in entity database is maintained, but not created.
* common/Database.h: Ensure iterator has != as well as ==.
* common/Database.cpp: Check that tuples have been returned
in response to a select.
* server/Restoration.cpp, server/Restoration.h,
server/Restorer.cpp: Restoration code now iterates over the
contents of the database, but does not attempt to actually
restore it yet.
* server/EntityFactory.cpp, server/PersistantThingFactory.cpp,
server/PersistantThingFactory.h,
server/PersistantThingFactory_impl.h,
server/Persistor.cpp: Cut down template bloat by minimising the
places where template instances are created.
* server/PersistantThingFactory.h, server/PersistantThingFactory.cpp:
Work in progress on code to handle creating entities to be persisted.
* server/WorldRouter.cpp: Get rid of hard tab.
* rulesets/Thing.cpp: Clean up checks on new entities.
* server/EntityFactory.cpp: Be stricter about entity classes which
aren't installed properlly. Add comments about implementing
persistance. Removed redundant handling of name attribute.