Commit graph

62 commits

Author SHA1 Message Date
Erik Ogenvik
eb81c7eecb Use "git describe" for buildid.
Also removed circular dependency as well as CVS leftover script.
2016-06-22 17:06:50 +02:00
Olek Wojnar
7f9ff2246d Remove CVS $Id tags
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Erik Ogenvik
91d3cf60c2 Enable persistence of account entities.
This is now on by default whenever the persistence is also enabled. It's
not clear why it wasn't on before though.
As a result Account has also been changed to be able to report whether
it should be persisted or not.
2013-06-25 21:42:24 +02:00
Erik Ogenvik
c7f4499385 Remove hard coded admin account.
This isn't needed anymore since we can connect through a local socket
instead if we need admin rights.
2013-06-23 00:49:34 +02:00
Alistair Riddoch
e37a9904cf Fix initilisation to be float value 2011-04-27 19:55:04 +01:00
Al Riddoch
f8e0380f38 2008-11-13 Al Riddoch <alriddoch@googlemail.com>
* common/const.h: I guess the name length limit for identifiers
	  should be unsigned.
2008-11-13 15:13:50 +00:00
Al Riddoch
7abe077c79 2008-11-13 Al Riddoch <alriddoch@googlemail.com>
* common/const.h: Add a constant for the name length limit of
	  rule IDs and property names.

	* common/Database.cpp: Use the name length constant for database
	  fields that will store the name.
2008-11-13 03:27:17 +00:00
Al Riddoch
7e914c3bb6 2007-10-01 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Remove the hard coded flag that used to disable
	  the database code.
2007-10-01 03:40:04 +00:00
Al Riddoch
cb7083d253 Make enable/disable database a run time option. 2007-02-06 17:10:29 +00:00
Al Riddoch
b2ee6977d7 Instrument BaseMind/MemMap to detect mutiple additions of the same thing
to the same mind.

Make it easier to use cypasswd to elevate privs.

Add ability to create other types of avatar.
2007-02-06 17:09:40 +00:00
Al Riddoch
8ee2524332 2007-01-17 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Back off accidentally commited change.
2007-01-17 23:16:21 +00:00
Al Riddoch
72125ffd44 2007-01-17 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp: Remove some debugging output.
2007-01-17 23:12:21 +00:00
Al Riddoch
d58109f9e3 2007-01-07 Al Riddoch <alriddoch@zepler.org>
* rulesets/Character.h: Fix broken doc comments on constants for
	  metabolism.

	* rulesets/Character.cpp: Switch metabolism code over to use the
	  update mechanism, to remove race conditions. Re-write the
	  math so that nothing can stay alive for ages by consuming all their
	  mass. Tune constants so a well fed character will take a month.

	* data/mason.xml: Set up goblin and settler class so that by
	  default they will starve to death in a few hours, and need to find
	  food to avoid this.

	* common/const.h: Oops. Database got disabled again by accident.
	  Turn it back on.
2007-01-08 03:19:20 +00:00
Al Riddoch
69995fa1b9 2007-01-07 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_Operation.cpp: Fix formatting of comments.

	* rulesets/Py_Oplist.cpp: Adapt sequence methods to be compatible
	  with the new interface typedefs in Python 2.5
2007-01-07 04:16:46 +00:00
Al Riddoch
adedf138f4 2006-12-27 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Add declaration for buildid, an incrementing
	  build number to give finer version tracking of development code.

	* server/ServerRouting.cpp: Add buildid to the server status
	  made available to all clients. Fix entity count in server status
	  as it wasn't fully added in the last change.

	* server/Makefile.am, scripts/gen_buildid.py: Implement buildid
	  by pulling the RCS revision number out of ChangeLog from its
	  embedded RCS $Id$ entry.
2006-12-27 10:49:05 +00:00
Al Riddoch
65bd6125d5 2006-12-24 Al Riddoch <alriddoch@zepler.org>
* 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.
2006-12-24 14:42:05 +00:00
Al Riddoch
a686ef73ce 2006-12-19 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Re-enable database for accounts and rules.

	* data/mason.xml: Make loaf inherit from food.
2006-12-19 22:37:10 +00:00
Al Riddoch
defed47f1f 2006-12-12 Al Riddoch <alriddoch@zepler.org>
* configure.ac: Increment version.

	* common/const.h: Declare a doxygen group for all the consts.

	* common/operations.cpp, common/Add.h, common/Attack.h, common/Burn.h,
	  common/Chop.h, common/Connect.h, common/Cut.h, common/Delve.h,
	  common/Dig.h, common/Drop.h, common/Eat.h, common/Monitor.h,
	  common/Mow.h, common/Nourish.h, common/Pickup.h, common/Setup.h,
	  common/Tick.h, common/Unseen.h, common/Update.h:
	  Declare a doxygen group for all custom operations.

	* rulesets/Area.h, rulesets/Character.h, rulesets/Creator.h,
	  rulesets/Entity.h, rulesets/Food.h, rulesets/Line.h,
	  rulesets/Missile.h, rulesets/Plant.h, rulesets/Stackable.h,
	  rulesets/Structure.h, rulesets/World.h: Declare a doxygen group
	  for in game entity classses.

	* common/Property.h, common/Property_impl.h, server/ScriptFactory.cpp,
	  server/ScriptFactory.h, server/SlaveClientConnection.cpp,
	  server/SlaveClientConnection.h: Add some more inlined documentation.
2006-12-12 15:54:20 +00:00
Al Riddoch
5e532c86ab 2006-12-05 Al Riddoch <alriddoch@zepler.org>
* OperationExerciser.cpp, OperationExerciser.h: Template class to
	  exercise and test custom operation classes.


	* Attacktest.cpp, Burntest.cpp, Choptest.cpp, Connecttest.cpp,
	  Cuttest.cpp, Delvetest.cpp, Digtest.cpp, Droptest.cpp,
	  Eattest.cpp, Monitortest.cpp, Mowtest.cpp, Nourishtest.cpp,
	  Pickuptest.cpp, Setuptest.cpp, Ticktest.cpp, Unseentest.cpp,
	  Updatetest.cpp: Use OperationExerciser on all current custom op
	  classes.
2006-12-05 09:39:53 +00:00
Al Riddoch
d0fdca0d70 *** empty log message *** 2006-10-26 11:29:31 +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
eca784582c Improve pig death handling. Death is effectively just removing the mind
state, so do so. Also think about disconnecting the incoming side
of external mind. Perhaps interact in some way with the movement state?
2006-10-25 18:06:39 +00:00
Al Riddoch
d8b6d32803 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* rulesets/Creator.cpp, server/WorldRouter.cpp,
	  server/WorldRouter.h: Remove obsolete code to handle omnipresent
	  entities.

	* common/const.h: Remove obsolete flag enabling omnipresent
	  entities.

	* tests/consttest.cpp: Remove test for omnipresent flag.
2006-07-08 21:05:34 +00:00
Al Riddoch
87c135a6af 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Remove obsolete config option to disable
	  range checks and calculations.

	* client/ObserverClient.cpp, rulesets/Movement.cpp,
	  server/Admin.cpp, tools/AdminClient.h, tools/cycmd.cpp:
	  Remove const.h from files which no longer require it.

	* rulesets/Python_API.cpp: Remove python bindings for obsolete
	  constants.

	* rulesets/Thing.cpp, rulesets/World.cpp, server/WorldRouter.cpp:
	  Remove obsolete rotten code for handling sight without ranges.

	* tests/consttest.cpp: Remove tests for removed constants.
2006-07-08 20:45:10 +00:00
Al Riddoch
1340b4a878 2006-05-31 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Add new constant for period between movement updates.

	* rulesets/Pedestrian.cpp: Don't update entity movement timestamp
	  here.

	* rulesets/Thing.cpp: Add comments about movement code. Update
	  movement timestamp when move op is handled. Use movement update
	  interval for update ops.
2006-05-31 16:31:52 +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
e2b83394b0 2005-12-13 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Add a second const for the non-squared default
	  box size for visibility calculations.

	* modules/Location.cpp: Initialise cached box size members with
	  defaults from consts.

	* rulesets/basic/mind/goals/common/move.py: Don't remove focus
	  knowledge about item just because it has been picked up. This
	  fixes eating acorns.

	* rulesets/basic/mind/goals/common/misc_goal.py: Remove focus knowledge
	  when something is eaten.
2005-12-13 01:38:08 +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
Al Riddoch
2103037359 2005-09-11 Al Riddoch <alriddoch@zepler.org>
* common/const.cpp, common/const.h: Git rid of bizare scheme
	  where each constant appears twice, debug and non-debug versions.

	* rulesets/Pedestrian.cpp, rulesets/Thing.cpp,
	  server/WorldRouter.cpp: Fix problem where an essential call
	  was inside an assert, so did not happen when built in non-debug
	  mode.
2005-09-11 21:53:17 +00:00
Al Riddoch
9f96a387cd 2004-01-23 Al Riddoch <alriddoch@zepler.org>
* common/const.cpp, common/const.h: Re-enable database code by default
	  as the disable option is now well tested.
2005-01-23 20:23:04 +00:00
Al Riddoch
8e12cf8de0 2004-01-13 Al Riddoch <alriddoch@zepler.org>
* common/Database.cpp: Improve error reporting for query errors.

	* common/const.cpp, common/const.h: Add full details and comments
	  for enable_database option.

	* common/id.h, common/id.cpp: New ID generator for use when we
	  are not using the Database.

	* common/AtlasFileLoader.cpp, common/AtlasFileLoader.h: Generic
	  class for loading Atlas data from a file.

	* server/Connection.cpp, server/EntityFactory.h,
	  server/EntityFactory.cpp, server/Persistor.cpp,
	  server/WorldRouter.cpp, server/server.cpp:
	  Implement the enable_database option by wrapping all use of database
	  in if statements. Rules are loaded from files instead.
2005-01-13 00:38:41 +00:00
Al Riddoch
73e3689712 2004-01-12 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Add a new config flag for completely disabling the
	  need for a database.
2005-01-12 14:54:23 +00:00
Al Riddoch
7273cb19cc 2004-12-30 Al Riddoch <alriddoch@zepler.org>
* 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.
2004-12-30 20:01:33 +00:00
Al Riddoch
e4aa444f3c 2004-11-29 Al Riddoch <alriddoch@zepler.org>
* common/BaseEntity.cpp, common/BaseEntity.h, common/BaseWorld.cpp,
	  common/BaseWorld.h, common/Burn.h, common/Chop.h, common/Cut.h,
	  common/Database.cpp, common/Database.h, common/Eat.h,
	  common/Generic.h, common/Load.h, common/Nourish.h,
	  common/OOGThing.cpp, common/OOGThing.h, common/Save.h,
	  common/Setup.h, common/Tick.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/inheritance.cpp, common/inheritance.h,
	  common/log.cpp, common/log.h, common/op_switch.h, common/random.h,
	  common/serialno.h, common/system.cpp, common/system.h,
	  common/type_utils.h, common/types.h, common/utility.cpp,
	  common/utility.h: Update copyright dates in files as appropriate.
2004-11-29 21:42:00 +00:00
Al Riddoch
bfe15e611d 2004-06-21 Al Riddoch <alriddoch@zepler.org>
* common/const.h, common/const.cpp: Decrease sight range setting,
	  and increase minimum box size.
2004-06-21 15:57:32 +00:00
Al Riddoch
90241acd88 2004-06-21 Al Riddoch <alriddoch@zepler.org>
* common/const.h, common/const.cpp: Increase sight range setting.
2004-06-21 08:44:53 +00:00
Al Riddoch
b278543da6 2004-05-12 Al Riddoch <alriddoch@zepler.org>
* common/const.cpp, common/const.h: Add constants for handling
	  size based visibility calculations.

	* rulesets/World.cpp, server/WorldRouter.cpp: Convert op broadcast
	  and viewing distance to being handled by a visibility calculation
	  based on size and distance, rather than distance alone. Movement
	  appearance and disappearance is yet to be done.
2004-05-12 09:39:20 +00:00
Al Riddoch
f3fed3984f 2004-04-27 Al Riddoch <alriddoch@zepler.org>
* common/const.cpp, common/const.h, server/EntityFactory.cpp,
	  server/Restoration.cpp: Add flag to disable saving of state
	  to the database.
2004-04-27 11:23:38 +00:00
Al Riddoch
60ffa51795 2003-10-30 Al Riddoch <alriddoch@zepler.org>
* common/const.h, common/const.cpp: Add constant for square
	  sight range.

	* physics/Vector3D.h, physics/Vector3D.cpp: Move distance
	  function into .cpp file.
2003-10-30 02:28:17 +00:00
Al Riddoch
67e86b9e5b 2003-10-29 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Make constants static for efficiency.

	* common/const.cpp, common/const.h: Add constant minimum size for
	  entities without boxes.

	* physics/BBox.cpp, physics/BBox.h: Move box size function into
	  .cpp file, and make sure of minimum size if box is not valid.
2003-10-29 14:22:36 +00:00
Al Riddoch
8b764a710d 2003-10-29 Al Riddoch <alriddoch@zepler.org>
* common/const.cpp, common/const.h, common/random.h,
	  physics/BBox.h, physics/Collision.cpp, physics/Collision.h,
	  physics/Quaternion.cpp, physics/Quaternion.h, physics/Vector3D.h,
	  rulesets/Movement.cpp, rulesets/Plant.cpp, rulesets/Python_API.cpp,
	  tests/collisiontest.cpp: Update variables relating to geometry
	  from double to float as this is the type used internall by
	  WFMath.

	* physics/Vector3D.cpp, physics/Quaternion.cpp, physics/Quaternion.h:
	  Remove legacy code.

	* server/CommPSQLSocket.cpp: Reformatting.
2003-10-29 01:39:09 +00:00
Al Riddoch
897520a245 2003-08-13 Al Riddoch <alriddoch@zepler.org>
* common/const.cpp, common/const.h: Remove the now obsolete
	  hard coded default admin password.
2003-08-13 01:03:36 +00:00
Al Riddoch
98c7fc5f62 2003-08-13 Al Riddoch <alriddoch@zepler.org>
* common/const.cpp, common/const.h: Add a const for the default
	  admin password hash, with a view to removing the plain text
	  default admin password.

	* server/Persistance.cpp: Ensure that the database contains an
	  admin account on startup.

	* common/Database.cpp: Move the call to register the ID generating
	  sequence out of the code for creating IG entity tables, as it is
	  also required by OOG entities, in particular the admin account
	  bootstrap.

	* client/ObserverClient.cpp, client/ObserverClient.h,
	  client/client.cpp: Modify client so that it no longer attempts to
	  get account details from the database, or from a hard coded default.
	  It will now attempt a trusted login, or rely on password provided
	  by config option.
2003-08-12 23:45:40 +00:00
Al Riddoch
14aaea2756 2002-12-21 Al Riddoch <alriddoch@zepler.org>
* common/Database.cpp, common/Database.h: Implement methods
	  to query database results.

	* common/const.cpp, common/const.h: Add a const for the root
	  id.

	* server/Restoration.cpp, server/Restoration.h: Start implementing
	  code to restore world from database.
2002-12-21 17:11:05 +00:00
Al Riddoch
3a5390b5f8 2002-11-28 Al Riddoch <alriddoch@zepler.org>
* common/const.cpp, common/const.h, rulesets/Creator.cpp,
	  rulesets/Entity.cpp, rulesets/Entity.h, server/WorldRouter.cpp:
	  Re-work omnipresent flag so it can only work in a debug build,
	  and has no performance impact on the production code.
2002-11-28 18:26:45 +00:00
Al Riddoch
65b6539b49 2002-09-13 Al Riddoch <alriddoch@zepler.org>
* server/ServerRouting.cpp, common/const.h, common/const.cpp: Put all
	  the build dependant code in const.cpp, so no other file is
	  dependant on config.h.

	* Add a cyphesis-config script, so other programs can tell where its
	  installed.

	* Rework many of the build files so they are cleaner.

	* Fix the readline C++ sanity check.
2002-09-13 10:23:31 +00:00
Al Riddoch
8c6ed53647 2002-07-23 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Fix } position.
2002-07-23 18:50:18 +00:00
Al Riddoch
56ef2d5bc0 2002-07-23 Al Riddoch <alriddoch@zepler.org>
* common/const.cpp, common/const.h: Make consts modifiable in
	  the debug build.

	* common/op_switch.h, rulesets/Character.cpp, rulesets/Character.h:
	  Fix missing logout op in op switchers.

	* server/Account.cpp, server/Connection.cpp: Handle logouts
	  a bit differently, and return the info response process
	  expects.

	* server/CommClient.cpp: Set connection id to client ip and port.

	* server/CommServer.cpp: Tighten up the way eof is handled.

	* server/ServerRouting.cpp: Set lobby id.
2002-07-23 18:43:39 +00:00
Al Riddoch
e4b05c4b8f 2002-06-08 Al Riddoch <alriddoch@zepler.org>
* common/const.h: Increase the sight range.

	* server/WorldRouter.cpp: Put in some warnings, as I want to
	  know when ops are getting broadcast.

	* server/server.cpp: Ensure stdout is not used when in daemon mode.

	* tools/cydbload.cpp: Rename the daftly named class WorldBase
	  to WorldAccessor.

	* mason.xml, cyphesis.vconf: Stop using the Acorn ruleset in Mason,
	  as it contains strange stuff, and remove the playable farmer
	  class from basic. Now games themselves define the only
	  playable types, and mason contains its own copies of classes
	  it has in common with acorn.
2002-06-08 00:56:25 +00:00
Al Riddoch
83c53f06c6 2002-03-11 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.cpp: Eliminate unnecessary call to opEnumerate()
	  and enhance debugging output.

	* server/Player.cpp: Correct the use of string.compare() in older
	  versions of libstdc++.

	* common/types.h: Added enumeration for other operations, not
	  handled by the core, but considered valid. Added new type
	  for storing mapping between operation parents and their
	  enumerated type.

	* common/op_switch.h: Separate handling of operations known to
	  be invalid from operations which are valid, but not explicitly
	  added to the core.

	* common/inheritance.h, common/inheritance.cpp, common/custom.cpp:
	  Provide global operation mapping where enumeration of operations
	  can be looked up. Install all types handled by the core, and
	  types known to be used in scripts.

	* common/BaseEntity.h, common/BaseEntity.cpp: Add object specific
	  operation mapping where operation types each object is subscribed
	  to can be enumerated, and others are rejected. Add mechanism
	  so that objects can add to the mapping, this subscribing to
	  operations. This makes enumerating operations much cheaper, and
	  eliminates the overhead of handling ops an object has no interest
	  in.

	* rulesets/Thing.h, rulesets/Thing.cpp: Add mechanism so scripts
	  can subscribe to operations.

	* rulesets/Character.h, rulesets/Character.cpp:
	  Add subscription mechanism for ops going to and from
	  the mind.

	* rulesets/BaseMind.h, rulesets/BaseMind.cpp:
	  Add subscription mechanism for sight and sound perception
	  operations sub operations, and provide an interface to it
	  for scripts.

	* server/Connection.cpp, server/Admin.cpp, server/Account.cpp,
	  rulesets/World.cpp, rulesets/World.h, rulesets/Thing.cpp,
	  rulesets/Stackable.cpp, rulesets/Plant.cpp, rulesets/Food.cpp,
	  rulesets/Character.cpp, rulesets/BaseMind.cpp:
	  Add subscriptions to operations for all core base classes.

	* rulesets/Python_API.cpp: When script is created, go through
	  methods, and subscribe to the operations which are handled by
	  them.

	* rulesets/Character.cpp: When calculating orientation of a walking
	  character, assume it is standing upright.

	* physics/Vector3D.h: Add versions of mag() and distance() which
	  omit the square root calculations, so that when their values
	  are only used for comparison, the expensive square root
	  calculations can be ommited. Add new version of collision
	  and range checking functions which provide the optimal
	  interface to the application. Add versions of methods which
	  modify this rather than creating a new operation to eliminate
	  wasted copies.

	* physics/Quaternion.cpp: Make use of faster interface provided
	  by Vector3D.

	* physics/BBox.h: Add new version of collision checking function
	  which provides optimal interface to the application.

	* modules/Location.h, modules/Location.cpp: Add new functions
	  to optimally calculate the distance between any two entities.

	* modules/Location.h: Re-write collision and range functions to
	  make much more optimal use of Vector3D, BBox and distance
	  functionality.

	* rulesets/Py_Vector3D.cpp, rulesets/Pedestrian.cpp,
	  rulesets/Movement.cpp, rulesets/Entity.cpp, rulesets/Character.cpp:
	  Eliminate implicit copies from vector arithmetic.

	* rulesets/Pedestrian.cpp, rulesets/MemMap.cpp, common/const.h:
	  Re-write code which uses magnitude of vectors to use the square
	  of the magnitude instead, as it is much cheaper to calculate.
2002-03-11 18:24:19 +00:00