* 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/Makefile.am, rulesets/Structure.cpp, rulesets/Structure.h,
server/PersistantThingFactory.cpp: Remove the hard coded Structure
class from the build.
* server/PersistantThingFactory.cpp, server/PersistantThingFactory.h,
server/PersistantThingFactory_impl.h: Remove the factory classes
now unused that were part of the old persistence mechanism. Rename
the new entity function to make more sense.
* server/EntityFactory.cpp, server/PersistantThingFactory.cpp,
server/PersistantThingFactory.h,
server/PersistantThingFactory_impl.h:
Add a count to each factory of the number of entities
it has created, and add a monitor watch to each one.
* server/StorageManager.cpp, server/StorageManager.h: Add counters
for the various types of database query, and add monitor watches
for them.
* server/EntityFactory.cpp, server/EntityFactory.h,
server/PersistantThingFactory.cpp, server/PersistantThingFactory.h,
server/PersistantThingFactory_impl.h: Rename the base class for
Entity factories from FactoryBase to EntityKit.
* server/EntityFactory.cpp, server/EntityFactory.h, server/Admin.cpp,
server/PersistantThingFactory.cpp, server/WorldRouter.cpp,
server/server.cpp: Rename EntityFactory to EntityBuilder, to make
it's function clearer.
* scripts/cyphesis-setup.sh: Complete the database setup script
functionality. Clean up the output, and polish.
* server/PersistantThingFactory.cpp, server/PersistantThingFactory.h,
server/PersistantThingFactory_impl.h: Partially specialise the non
persistent entity factory so we can register the persistor database
tables for the world object when persistence is disabled, so the
state of this entity can be restored.
* server/server.cpp: Tidy up the startup output.
* server/EntityFactory.cpp: Don't try and set up world persistence if
it is turned off.
* 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.