Commit graph

121 commits

Author SHA1 Message Date
Al Riddoch
5aaabb48ee 2007-10-01 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Clean up an error message. Modify the logic
	  when rules aren't loaded, so the error messages make more sense.
2007-10-01 03:31:34 +00:00
Al Riddoch
87ecdcad4b 2007-07-30 Al Riddoch <alriddoch@zepler.org>
* client/Py_CreatorClient.cpp, common/Database.cpp,
	  common/accountbase.cpp, common/system.cpp, rulesets/Character.cpp,
	  rulesets/Motion.cpp, rulesets/Plant.cpp, rulesets/Py_Location.cpp,
	  rulesets/Py_Mind.cpp, rulesets/Py_Operation.cpp,
	  rulesets/Py_Point3D.cpp, rulesets/Py_Statistics.cpp,
	  rulesets/Py_Task.cpp, rulesets/Py_TerrainProperty.cpp,
	  rulesets/Py_Thing.cpp, rulesets/Py_Vector3D.cpp,
	  rulesets/Py_WorldTime.cpp, rulesets/Python_API.cpp,
	  rulesets/TerrainProperty.cpp, server/Admin.cpp,
	  server/CommServer.cpp, server/Connection.cpp,
	  server/EntityFactory.cpp, server/WorldRouter.cpp,
	  tools/cycmd.cpp, tools/cyconvertrules.cpp, tools/cyctrl.cpp:
	  Remove unnecessary () from conditional expressions, where operator
	  binding is clear.
2007-07-30 18:12:50 +00:00
Al Riddoch
c81f804c29 2007-07-30 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp, server/EntityFactory.h: Major overhaul of
	  error reporting when installing rules, covering many new cases, and
	  reporting errors more clearly.
2007-07-30 01:54:25 +00:00
Al Riddoch
2dad34d7eb 2007-07-29 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Don't use camel casing for local
	  variables or function arguments.
2007-07-29 20:35:47 +00:00
Al Riddoch
e4d9db8a3e 2007-07-29 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Remove some left over debug output.
	  Fix a directory object leaked.
2007-07-29 18:03:56 +00:00
Al Riddoch
2069f3dd4c 2007-07-29 Al Riddoch <alriddoch@zepler.org>
* 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:
2007-07-29 03:33:33 +00:00
Al Riddoch
ec513b015c 2007-07-26 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.h, server/EntityFactory.cpp: Improve the
	  mechanism for identifying rules which have broken dependencies.
2007-07-26 00:15:52 +00:00
Al Riddoch
860e46d04c 2007-07-24 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Remove and disable debug output.
2007-07-24 00:27:49 +00:00
Al Riddoch
cbc4d8d097 2007-07-17 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Complete the code that populates
	  operations on a tool based on the task activations in the
	  ruleset, removing the need for world builders to synchronise
	  this data manually.

	* data/basic.xml, data/mason.xml: Remove operations from all tools
	  that only use them for activating tasks, now that this is handled
	  automatically.
2007-07-17 17:13:25 +00:00
Al Riddoch
69751c53bd 2007-07-17 Al Riddoch <alriddoch@zepler.org>
* common/debug.cpp: Add template specialisation for dumping lists.

	* server/EntityFactory.cpp: Add part completed code for adding tool
	  operations dynamically to tools.
2007-07-17 02:26:43 +00:00
Al Riddoch
fba527b770 2007-07-16 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Fix a race condition in the code that
	  loads rules that depend on other rules.
2007-07-16 22:56:34 +00:00
Al Riddoch
e2f97526c3 2007-07-09 Al Riddoch <alriddoch@zepler.org>
* 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.
2007-07-08 23:45:12 +00:00
Al Riddoch
40b8b52252 2007-07-06 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: When processing a new task rule, check
	  that the operation and tool classes referenced have been installed.
	  If not, make the class pending on those classes.
2007-07-06 16:36:12 +00:00
Al Riddoch
ea08205db3 2007-07-04 Al Riddoch <alriddoch@zepler.org>
* rulesets/Area.cpp, rulesets/Area.h, rulesets/Food.cpp,
	  rulesets/Food.h, rulesets/Line.cpp, rulesets/Line.h:
	  Remove these unused core entity classes from the build.

	* rulesets/attributes.h, server/EntityFactory.cpp,
	  server/PersistantThingFactory.cpp, server/Persistor.cpp,
	  server/Persistor.h, server/Persistor_impl.h, server/Restoration.cpp,
	  server/Restorer.cpp: Remove the unused classes above from the
	  persistence code.

	* tests/Makefile.am: Remove tests for the removed classes.
2007-07-05 17:51:40 +00:00
Al Riddoch
3b5e1ef9da 2007-07-02 Al Riddoch <alriddoch@zepler.org>
* rulesets/mason/world/tasks/Reap.py: New task to implement reaping
	  grass with a scythe.

	* server/EntityFactory.cpp: Report an error more clearly.

	* data/mason.xml: Fix a bug in the gravestone rule.

	* date/mason.xml: Add new reap task class.
2007-07-02 21:58:01 +00:00
Al Riddoch
bb1d4fb60d 2007-07-02 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Remove factory for food core base class,
	  as it is no longer used.
2007-07-02 15:49:07 +00:00
Al Riddoch
f4d4ac8938 2007-06-22 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp, tools/cyaddrules.cpp,
	  tools/cyloadrules.cpp: Remove some directory walking debug output.
2007-06-22 12:58:59 +00:00
Al Riddoch
f8a2731576 2007-06-19 Al Riddoch <alriddoch@zepler.org>
* common/globals.cpp, common/globals.h: Change the type and name
	  of the ruleset list to a string.

	* rulesets/Python_API.cpp, server/EntityFactory.cpp,
	  server/server.cpp, tools/cyaddrules.cpp, tools/cydumprules.cpp,
	  tools/cyloadrules.cpp: Switch to using single ruleset config
	  variable.
2007-06-19 13:19:57 +00:00
Al Riddoch
13d0e5e00f 2007-06-16 Al Riddoch <alriddoch@zepler.org>
* data/Makefile.am: Install the xml files for mason into the mason.d
	  subdir, as the rule loading code now prefers.

	* server/EntityFactory.cpp, tools/cyaddrules.cpp,
	  tools/cyloadrules.cpp: Modify the way rule xml files are loaded
	  so files from the ruleset specific subdirectory are loaded first,
	  and the legacy way of doing it is done if this files, with a warning
	  message.
2007-06-16 13:39:54 +00:00
Al Riddoch
8c0ead4568 2007-06-15 Al Riddoch <alriddoch@zepler.org>
* configure.ac: Check for dirent.h.

	* common/AtlasFileLoader.cpp: Report duplicate IDs when loading rule
	  data.

	* data/basic.xml: Remove obsolete old overriden rules, as we will
	  no longer be doing rules that way.

	* server/EntityFactory.cpp: When loading rulesets directly from
	  files, also load all files in ruleset.d.
2007-06-15 15:18:55 +00:00
Al Riddoch
e4fe88005d 2007-06-14 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Add some warnings when task classes linked
	  to other classes may be suspect.
2007-06-14 18:07:10 +00:00
Al Riddoch
8c336bc66f 2007-02-20 Al Riddoch <alriddoch@zepler.org>
* 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.
2007-02-20 00:52:41 +00:00
Al Riddoch
9a56dac06c 2006-10-26 Al Riddoch <alriddoch@zepler.org>
* Add RCS Id keywords to every file, for better version tracking.
2006-10-26 00:48:00 +00:00
Al Riddoch
0d79c8300d 2006-07-31 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Don't call upper_bound in a loop
	  as it is return by value, and expensive to call.
2006-07-31 17:36:18 +00:00
Al Riddoch
0af4ecec9f 2006-07-10 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.h, server/EntityFactory.cpp: Improve test
	  for task classes by checking if the class parent has already been
	  installed as a class.
2006-07-10 01:45:28 +00:00
Al Riddoch
57cb4b1a09 2006-07-03 Al Riddoch <alriddoch@zepler.org>
* common/PropertyManager.cpp: When the PropertyManager is deleted,
	  set the instance variable to 0.

	* server/EntityFactory.cpp, server/EntityFactory.h: Add a destructor
	  so the property manager can be deleted at shutdown.
2006-07-03 11:25:28 +00:00
Al Riddoch
1d53fa068f 2006-07-03 Al Riddoch <alriddoch@zepler.org>
* client/ClientPropertyManager.cpp, client/ClientPropertyManager.h:
	  A new class as a dummy property manager for the client side.
	  Never creates property objects.

	* client/client.cpp: Instantiate the client property manager
	  during client initialisation.

	* server/EntityFactory.cpp: Instatiate the server property manager
	  during server intialisation.

	* common/PropertyManager.h: Add the singletons accessor, and
	  make the addProperty member return a pointer to the property.

	* server/CorePropertyManager.h, server/CorePropertyManager.cpp:
	  Implement creating properties for server side entity objects.

	* rulesets/Entity.cpp: Use the property manager singleton to
	  create properties if a new attribute is set which is not already
	  a property, and its also not already a soft attribute.
2006-07-03 01:29:07 +00:00
Al Riddoch
852bb1d643 2006-06-30 Al Riddoch <alriddoch@zepler.org>
* FIXME, Makefile.am: Add new FIXME file which documents FIXMEs in
	  the code.

	* server/EntityFactory.cpp: Remove the terrain feature classes
	  implemented as hard coded classes.

	* data/basic.xml: Add the terrain feature classes as soft data
	  defined classes.
2006-06-30 15:11:57 +00:00
Al Riddoch
ac963eb892 2006-05-09 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_Task.cpp: Missing missing return when an error is
	  detected.

	* rulesets/Python_API.cpp: Remove obsolete Vector3D and Point3D
	  constructors and method tables, now replaced by init method
	  implementations.

	* server/EntityFactory.cpp: Comment out as yet unused code for
	  updating a task factory from an admin client.
2006-05-09 10:19:33 +00:00
Al Riddoch
124b6746ab 2006-04-30 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Remove some debug output.
2006-04-30 01:37:59 +00:00
Al Riddoch
55ad954c81 2006-04-28 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Clear out all the factories on shutdown,
	  not just the entity factories.
2006-04-29 02:27:15 +00:00
Al Riddoch
f8eed4120b 2006-04-25 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Remove some debug output.
2006-04-25 21:23:56 +00:00
Al Riddoch
6e286ebeca 2006-04-25 Al Riddoch <alriddoch@zepler.org>
* server/Admin.cpp, server/EntityFactory.cpp, server/EntityFactory.h:
	  Change function args to take class descriptions for modification
	  as an Object not a Message. Makes it easier to defermine when
	  op definitions should be processed.
2006-04-25 02:03:36 +00:00
Al Riddoch
0cca233ad5 2006-04-25 Al Riddoch <alriddoch@zepler.org>
* server/Admin.cpp: Allow client to update op definition, passing
	  it to EntityFactory, just like other types.

	* server/EntityFactory.h, server/EntityFactory.cpp: Add method to
	  handle updating op definitions. Catch a bug which might cause
	  a crash if the client updates a core C++ hard coded entity type.
2006-04-25 01:50:17 +00:00
Al Riddoch
11d268bc54 2006-04-25 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.h, server/EntityFactory.cpp: Make the
	  activation map a multimap, and search through it to find a match
	  for the target entity.
2006-04-25 00:32:58 +00:00
Al Riddoch
fe4330bedb 2006-04-24 Al Riddoch <alriddoch@zepler.org>
* common/BaseWorld.h, rulesets/Character.cpp,
	  server/EntityFactory.cpp, server/EntityFactory.h,
	  server/TaskFactory.h, server/WorldRouter.cpp,
	  server/WorldRouter.h: Specify the target base type that a given
	  task is valid for, and provide target type when activating a task.

	* data/mason.xml: Add target base types to most task rules.

	* rulesets/mason/world/tasks/Combat.py: Fix the copyright date.

	* rulesets/mason/world/tasks/Sharpen.py: Proof of concept task
	  for turning logs into stakes.
2006-04-24 19:51:54 +00:00
Al Riddoch
6a0a1ac44a 2006-04-24 Al Riddoch <alriddoch@zepler.org>
* common/custom.cpp: Add a "task" base class to the inheritance tree.

	* server/EntityFactory.h, server/EntityFactory.cpp: Add
	  functionality to allow task rules to be installed and updated from
	  an admin client. Improve the error reporting for a number of error
	  conditions.

	* server/Connection.cpp: Correct the copyright dates.

	* server/Admin.cpp: Improve error reporting for a number of error
	  conditions. Remove obsolete commented out code for installing
	  rules using Set ops, and add error notification when the
	  admin client attempts to update an op definition. Allow the
	  admin client to install an op definition.
2006-04-24 12:37:33 +00:00
Al Riddoch
816a2dfc6c 2006-04-05 Al Riddoch <alriddoch@zepler.org>
* common/BaseWorld.h, server/WorldRouter.h, server/WorldRouter.cpp:
	  Add interface to allow world entities to activate tasks based on
	  tool use operations.

	* server/EntityFactory.h, server/EntityFactory.cpp: Add method which
	  createa a new task in response to an activation request.

	* rulesets/Character.cpp: When a character uses a tool, use the
	  tool type and operation to activate a task if one is available.
2006-04-05 01:21:40 +00:00
Al Riddoch
fac57eee73 2006-01-19 Al Riddoch <alriddoch@zepler.org>
* aiclient/ClientAccount.cpp, aiclient/ClientAccount.h,
	  aiclient/ClientConnection.cpp, aiclient/ClientConnection.h,
	  aiclient/client.cpp, aiclient/client.h, client/BaseClient.cpp,
	  client/BaseClient.h, client/CharacterClient.cpp,
	  client/CharacterClient.h, client/ClientConnection.cpp,
	  client/ClientConnection.h, client/CreatorClient.cpp,
	  client/CreatorClient.h, client/ObserverClient.cpp,
	  client/ObserverClient.h, client/Py_CreatorClient.cpp,
	  client/Py_CreatorClient.h, client/client.cpp,
	  client/define_world.cpp, client/define_world.h, common/Add.h,
	  common/Affect.h, common/AtlasFileLoader.cpp,
	  common/AtlasFileLoader.h, common/Attack.h, common/BaseEntity.cpp,
	  common/BaseEntity.h, common/BaseWorld.cpp, common/BaseWorld.h,
	  common/Burn.h, common/Chop.h, common/Connect.h, common/CustomOp.cpp,
	  common/CustomOp.h, common/CustomOp_impl.h, common/Cut.h,
	  common/Database.cpp, common/Database.h, common/Delve.h, common/Dig.h,
	  common/Eat.h, common/FormattedXMLWriter.cpp,
	  common/FormattedXMLWriter.h, common/Generic.h, common/Load.h,
	  common/Monitor.h, common/Mow.h, common/Nourish.h,
	  common/OOGThing.cpp, common/OOGThing.h, common/Property.cpp,
	  common/Property.h, common/Property_impl.h, common/Save.h,
	  common/Setup.h, common/Tick.h, common/Unseen.h, common/Update.h,
	  common/Use.h, common/Wield.h, common/accountbase.cpp,
	  common/accountbase.h, common/const.cpp, common/const.h,
	  common/custom.cpp, common/debug.h, common/globals.cpp,
	  common/globals.h, common/id.cpp, common/id.h, common/inheritance.cpp,
	  common/inheritance.h, common/inheritance_impl.h, common/log.cpp,
	  common/log.h, common/newid.cpp, common/nls.h, common/op_switch.h,
	  common/operations.cpp, common/operations.h, common/random.h,
	  common/refno.h, common/serialno.cpp, common/serialno.h,
	  common/system.cpp, common/system.h, common/terrain_utils.cpp,
	  common/terrain_utils.h, common/type_utils.h, common/types.h,
	  common/utility.cpp, common/utility.h, modules/DateTime.cpp,
	  modules/DateTime.h, modules/Location.cpp, modules/Location.h,
	  modules/WorldTime.cpp, modules/WorldTime.h, physics/BBox.cpp,
	  physics/BBox.h, physics/Collision.cpp, physics/Collision.h,
	  physics/Quaternion.cpp, physics/Quaternion.h, physics/Vector3D.cpp,
	  physics/Vector3D.h, physics/VectorPol.h, rulesets/Area.cpp,
	  rulesets/Area.h, rulesets/AreaProperty.cpp, rulesets/AreaProperty.h,
	  rulesets/ArithmeticScript.cpp, rulesets/ArithmeticScript.h,
	  rulesets/BaseMind.cpp, rulesets/BaseMind.h,
	  rulesets/CalendarProperty.cpp, rulesets/CalendarProperty.h,
	  rulesets/Character.cpp, rulesets/Character.h, rulesets/Combat.cpp,
	  rulesets/Combat.h, rulesets/Container.cpp, rulesets/Container.h,
	  rulesets/Creator.cpp, rulesets/Creator.h, rulesets/Entity.cpp,
	  rulesets/Entity.h, rulesets/EntityProperties.cpp,
	  rulesets/Entity_getLocation.h, rulesets/Fell.cpp, rulesets/Fell.h,
	  rulesets/Food.cpp, rulesets/Food.h, rulesets/Line.cpp,
	  rulesets/Line.h, rulesets/LineProperty.cpp, rulesets/LineProperty.h,
	  rulesets/MemEntity.cpp, rulesets/MemEntity.h, rulesets/MemMap.cpp,
	  rulesets/MemMap.h, rulesets/MemMap_methods.h,
	  rulesets/MindFactory.cpp, rulesets/MindFactory.h, rulesets/Missile.h,
	  rulesets/Motion.cpp, rulesets/Motion.h, rulesets/Movement.cpp,
	  rulesets/Movement.h, rulesets/Pedestrian.cpp, rulesets/Pedestrian.h,
	  rulesets/Plant.cpp, rulesets/Plant.h, rulesets/Py_BBox.cpp,
	  rulesets/Py_BBox.h, rulesets/Py_EntityWrapper.h,
	  rulesets/Py_Location.cpp, rulesets/Py_Location.h,
	  rulesets/Py_Map.cpp, rulesets/Py_Map.h, rulesets/Py_Mind.cpp,
	  rulesets/Py_Mind.h, rulesets/Py_Object.cpp, rulesets/Py_Object.h,
	  rulesets/Py_Operation.cpp, rulesets/Py_Operation.h,
	  rulesets/Py_Oplist.cpp, rulesets/Py_Oplist.h, rulesets/Py_Optime.cpp,
	  rulesets/Py_Optime.h, rulesets/Py_Point3D.cpp, rulesets/Py_Point3D.h,
	  rulesets/Py_Property.cpp, rulesets/Py_Property.h,
	  rulesets/Py_Quaternion.cpp, rulesets/Py_Quaternion.h,
	  rulesets/Py_RootEntity.cpp, rulesets/Py_RootEntity.h,
	  rulesets/Py_Statistics.cpp, rulesets/Py_Statistics.h,
	  rulesets/Py_Task.cpp, rulesets/Py_Task.h, rulesets/Py_Thing.cpp,
	  rulesets/Py_Thing.h, rulesets/Py_Vector3D.cpp,
	  rulesets/Py_Vector3D.h, rulesets/Py_World.cpp, rulesets/Py_World.h,
	  rulesets/Py_WorldTime.cpp, rulesets/Py_WorldTime.h,
	  rulesets/PythonArithmeticScript.cpp,
	  rulesets/PythonArithmeticScript.h, rulesets/PythonMindScript.cpp,
	  rulesets/PythonMindScript.h, rulesets/PythonScript.cpp,
	  rulesets/PythonScript.h, rulesets/PythonThingScript.cpp,
	  rulesets/PythonThingScript.h, rulesets/PythonWrapper.cpp,
	  rulesets/PythonWrapper.h, rulesets/Python_API.cpp,
	  rulesets/Python_API.h, rulesets/Python_Script_Utils.h,
	  rulesets/Script.cpp, rulesets/Script.h, rulesets/Stackable.cpp,
	  rulesets/Stackable.h, rulesets/Statistics.cpp, rulesets/Statistics.h,
	  rulesets/StatisticsProperty.cpp, rulesets/StatisticsProperty.h,
	  rulesets/Structure.cpp, rulesets/Structure.h, rulesets/Task.cpp,
	  rulesets/Task.h, rulesets/TaskScript.cpp, rulesets/TaskScript.h,
	  rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h,
	  rulesets/Thing.cpp, rulesets/Thing.h, rulesets/ThingFactory.cpp,
	  rulesets/ThingFactory.h, rulesets/World.cpp, rulesets/World.h,
	  rulesets/attributes.h, server/Account.cpp, server/Account.h,
	  server/Admin.cpp, server/Admin.h, server/ArithmeticFactory.cpp,
	  server/ArithmeticFactory.h, server/CommClient.cpp,
	  server/CommClient.h, server/CommIdleSocket.cpp,
	  server/CommIdleSocket.h, server/CommListener.cpp,
	  server/CommListener.h, server/CommLocalClient.cpp,
	  server/CommLocalClient.h, server/CommMDNSPublisher.cpp,
	  server/CommMDNSPublisher.h, server/CommMaster.cpp,
	  server/CommMaster.h, server/CommMetaClient.cpp,
	  server/CommMetaClient.h, server/CommPSQLSocket.cpp,
	  server/CommPSQLSocket.h, server/CommPeer.cpp,
	  server/CommPeer.h, server/CommPeerListener.cpp,
	  server/CommPeerListener.h, server/CommRemoteClient.cpp,
	  server/CommRemoteClient.h, server/CommServer.cpp,
	  server/CommServer.h, server/CommSlaveClient.cpp,
	  server/CommSlaveClient.h, server/CommSlaveListener.cpp,
	  server/CommSlaveListener.h, server/CommSocket.cpp,
	  server/CommSocket.h, server/CommUnixListener.cpp,
	  server/CommUnixListener.h, server/Connection.cpp,
	  server/Connection.h, server/Connection_methods.h,
	  server/EntityFactory.cpp, server/EntityFactory.h,
	  server/ExternalMind.cpp, server/ExternalMind.h,
	  server/Idle.cpp, server/Idle.h, server/Lobby.cpp, server/Lobby.h,
	  server/Master.cpp, server/Master.h, server/Peer.cpp, server/Peer.h,
	  server/Persistance.cpp, server/Persistance.h,
	  server/PersistantThingFactory.cpp, server/PersistantThingFactory.h,
	  server/PersistantThingFactory_impl.h, server/Persistor.cpp,
	  server/Persistor.h, server/Persistor_impl.h,
	  server/Player.cpp, server/Player.h, server/Restoration.cpp,
	  server/Restoration.h, server/Restorer.cpp, server/Restorer.h,
	  server/Restorer_impl.h, server/ScriptFactory.cpp,
	  server/ScriptFactory.h, server/ServerRouting.cpp,
	  server/ServerRouting.h, server/ServerRouting_methods.h,
	  server/SlaveClientConnection.cpp, server/SlaveClientConnection.h,
	  server/TaskFactory.cpp, server/TaskFactory.h,
	  server/TrustedConnection.cpp, server/TrustedConnection.h,
	  server/WorldRouter.cpp, server/WorldRouter.h,
	  server/server.cpp, server/server.h, server/slave.cpp,
	  tests/Areatest.cpp, tests/BaseEntitytest.cpp,
	  tests/Charactertest.cpp, tests/Containertest.cpp,
	  tests/Creatortest.cpp, tests/EntityExerciser.h,
	  tests/EntityFactorytest.cpp, tests/Entitytest.cpp,
	  tests/Foodtest.cpp, tests/IGEntityExerciser.h,
	  tests/Linetest.cpp, tests/Locationtest.cpp, tests/OOGThingtest.cpp,
	  tests/Planttest.cpp, tests/Propertytest.cpp, tests/Stackabletest.cpp,
	  tests/Structuretest.cpp, tests/Tasktest.cpp, tests/TestWorld.h,
	  tests/Thingtest.cpp, tests/WorldTimetest.cpp, tests/Worldtest.cpp,
	  tests/allOperations.h, tests/collisiontest.cpp, tests/consttest.cpp,
	  tests/distancetest.cpp, tests/emergencetest.cpp,
	  tests/inheritancetest.cpp, tests/logtest.cpp, tests/randomtest.cpp,
	  tests/systemtest.cpp, tests/transformtest.cpp,
	  tests/type_utilstest.cpp, tests/utilitytest.cpp,
	  tools/AdminClient.cpp, tools/AdminClient.h, tools/cyaddrules.cpp,
	  tools/cycmd.cpp, tools/cyconfig.cpp, tools/cyconvertrules.cpp,
	  tools/cyctrl.cpp, tools/cydbload.cpp, tools/cydumprules.cpp,
	  tools/cyisoload.cpp, tools/cyloadrules.cpp, tools/cypasswd.cpp,
	  tools/cywatchdog.cpp: Replace the copyright and license statements
	  with new versions that include disclaimer of warranty, and
	  permit distribution under later versions of the GPL.
2006-01-19 02:17:06 +00:00
Al Riddoch
a36b7f5db5 2006-01-10 Al Riddoch <alriddoch@zepler.org>
* 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.
2006-01-10 17:51:32 +00:00
Al Riddoch
6863bcaec2 2006-01-08 Al Riddoch <alriddoch@zepler.org>
* 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.
2006-01-10 15:28:50 +00:00
Al Riddoch
815fd28c78 2005-12-08 Al Riddoch <alriddoch@zepler.org>
* 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.
2005-12-08 03:37:59 +00:00
Al Riddoch
d0713d4183 2005-12-08 Al Riddoch <alriddoch@zepler.org>
* server/TaskFactory.h, server/TaskFactory.cpp,
	  server/EntityFactory.h, server/EntityFactory.cpp,
	  rulesets/TaskScript.h, rulesets/TaskScript.cpp:
	  Implement task script interface.
2005-12-08 03:04:04 +00:00
Al Riddoch
bd153b9f87 2005-12-05 Al Riddoch <alriddoch@zepler.org>
* 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.
2005-12-05 21:23:50 +00:00
Al Riddoch
287a9bc660 2005-11-23 Al Riddoch <alriddoch@zepler.org>
* client/BaseClient.cpp, common/Database.cpp, rulesets/MemMap.cpp,
	  server/Connection.cpp, server/EntityFactory.cpp, server/Peer.cpp,
	  server/Persistance.cpp, server/Restoration.cpp,
	  server/ServerRouting.h: Update integer ID related checks now that
	  integerId() function has changed.
2005-11-23 11:55:08 +00:00
Al Riddoch
63e1fdf76d 2005-11-20 Al Riddoch <alriddoch@zepler.org>
* tests/EntityFactorytest.cpp: Add more tests to ensure adding or
	  removing attributes propagates correctly down the type tree.

	* server/EntityFactory.cpp: Reset class attributes when factory
	  is modified.
2005-11-20 02:03:08 +00:00
Al Riddoch
dc387bdeca 2005-11-19 Al Riddoch <alriddoch@zepler.org>
* common/id.cpp, common/id.h: Add a function to check a string ID
	  can be converted to an integer.

	* server/EntityFactory.cpp: Check IDs are valid integers before
	  looking them up in the world.
2005-11-19 13:15:04 +00:00
Al Riddoch
9d10ba6510 2005-11-18 Al Riddoch <alriddoch@zepler.org>
* server/PersistantThingFactory.h,
	  server/PersistantThingFactory_impl.h: Add separate tracking of
	  class attributes, and accumulated attributes including those
	  inherited from the parent class. Add members for storing
	  parent and child types to a factory.

	* server/EntityFactory.h: Ensure instance pointer is zeroed
	  when instance is deleted. Make internal methods protected so
	  its easier to test them in a unit test.

	* server/EntityFactory.cpp: Add pointers to child factories to parent
	  when installing new ones. Handle copying inherited attribute
	  defaults from the parent factory.

	* tests/EntityFactorytest.cpp: Add a new class which exposes the
	  protected parts of EntityFactory for testing.
2005-11-18 01:52:10 +00:00
Al Riddoch
162f57955e 2005-11-11 Al Riddoch <alriddoch@zepler.org>
* common/types.h, server/Persistance.h, common/BaseWorld.h,
	  common/BaseWorld.cpp, server/WorldRouter.cpp:
	  Switch core world map to reference by integer ID rather than string.
	  Add version of getEntity() which converts from string to integer
	  automatically.

	* rulesets/Character.cpp, rulesets/Thing.cpp, rulesets/World.cpp,
	  server/EntityFactory.cpp,
	  Use getEntity() when looking up an entity, so that conversion of
	  ID from string to integer is automatic.

	* rulesets/BaseMind.cpp, rulesets/MemMap.cpp, rulesets/MemMap.h:
	  Switch to using integer IDs in MemMap's core mapping.

	* server/Account.cpp, server/Account.h: Switch a few function
	  parameters to use integer ID values, making the code cleaner.

	* server/Account.cpp, server/Admin.cpp, server/Persistance.cpp:
	  Handle string ID to integer conversions as required.
2005-11-11 02:04:56 +00:00
Al Riddoch
75e9d3a546 2005-11-10 Al Riddoch <alriddoch@zepler.org>
* common/BaseEntity.h, common/BaseEntity.cpp: Add an integer ID
	  member variable, and accessor, and require it to be initialised
	  along with string ID in constructor.

	* common/const.cpp, common/const.h: Add a const for the integer value
	  of the world ID.

	* rulesets/Area.cpp, rulesets/Area.h, rulesets/BaseMind.cpp,
	  rulesets/BaseMind.h, rulesets/Character.cpp, rulesets/Character.h,
	  rulesets/Creator.cpp, rulesets/Creator.h, rulesets/Entity.cpp,
	  rulesets/Entity.h, rulesets/Food.cpp, rulesets/Food.h,
	  rulesets/Line.cpp, rulesets/Line.h, rulesets/MemEntity.cpp,
	  rulesets/MemEntity.h, rulesets/Plant.cpp, rulesets/Plant.h,
	  rulesets/Stackable.cpp, rulesets/Stackable.h, rulesets/Structure.cpp,
	  rulesets/Structure.h, rulesets/Thing.cpp, rulesets/Thing.h,
	  rulesets/World.cpp, rulesets/World.h: Add integer ID handling to
	  constructors of all in-game entity classes.

	* rulesets/MemMap.cpp: Initialise integer ID of entities in the mind
	  map.

	* rulesets/MindFactory.cpp, rulesets/MindFactory.h: Handle integer
	  ID when constructing mind objects.

	* server/EntityFactory.cpp, server/EntityFactory.h,
	  server/PersistantThingFactory_impl.h: Handle integer
	  ID when contructing entity objects.

	* server/Restoration.cpp, server/Restoration.h, server/Restorer.h,
	  server/Restorer_impl.h: Handle integer ID when restoring from
	  database.

	* server/WorldRouter.cpp: Assign integer ID when constructing the
	  world.
2005-11-11 00:06:48 +00:00