Commit graph

137 commits

Author SHA1 Message Date
Al Riddoch
d68e894f5a 2005-12-26 Al Riddoch <alriddoch@zepler.org>
* rulesets/Character.cpp: Switch to using the test combat script.

	* rulesets/Py_EntityWrapper.h, rulesets/Py_Statistics.h: Move the
	  generic entity wrapper structure into its own header.

	* client/Py_CreatorClient.cpp, rulesets/Py_Location.cpp,
	  rulesets/Py_Location.h, rulesets/Py_Mind.cpp, rulesets/Py_Thing.cpp,
	  rulesets/Python_API.cpp: Modify PyLocation so that rather than
	  having a flag to indicate whether the script owns the object,
	  it instead stores a pointer to the entity that owns it in that
	  eventuality.

	* rulesets/Py_Thing.cpp: Allow map and list attributes to be set from
	  scripts as long as the contents are Atlas compatible.

	* rulesets/Python_API.cpp: Fix script output handling so only complete
	  lines are output.

	* rulesets/mason/world/tasks/Combat.py: Add code for identifying
	  attacker and defender in a combat.
2005-12-26 18:49:14 +00:00
Al Riddoch
a2914a39e3 2005-12-24 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Re-work the keywords handling in Operation()
	  to avoid bugs in the mapping protocol by using Dict functions, and
	  eliminate wasteful double lookup. No longer accept setting FROM
	  in constructor as its never required.

	* rulesets/werewolf/world/objects/characters/Villager.py,
	  rulesets/basic/editor.py: No longer set FROM on operations at
	  construction. It was never necessary.
2005-12-24 02:23:31 +00:00
Al Riddoch
c2e1e78271 2005-12-23 Al Riddoch <alriddoch@zepler.org>
* rulesets/mason/world/tasks/Combat.py: Expand the sample combat
	  to include tick ops.

	* rulesets/Python_API.cpp, rulesets/Py_Operation.cpp: Add necessary
	  handlers for sub_to attribute on operations.

	* rulesets/Character.cpp: Adapt test code for combat scripts to
	  the latest task API.
2005-12-23 23:34:19 +00:00
Al Riddoch
560887fccd 2005-12-14 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Remove an obsolete commented out function.

	* rulesets/CalendarProperty.cpp, rulesets/CalendarProperty.h,
	  rulesets/World.cpp: Add a new property to handle revealing
	  astronomical calendar information on the world object, so clients
	  can get day/night cycle right.

	* tools/cycmd.cpp: Improve formatting of output Atlas data, to make
	  it readable.
2005-12-14 17:16:21 +00:00
Al Riddoch
ad8e5989cf 2005-12-11 Al Riddoch <alriddoch@zepler.org>
* rulesets/PythonWrapper.h, rulesets/PythonWrapper.cpp: Add new
	  class which inherits from Script to store a wrapper pointer
	  for instances which have no script.

	* rulesets/PythonScript.h, rulesets/PythonScript.cpp,
	  rulesets/PythonThingScript.h, rulesets/PythonThingScript.cpp,
	  rulesets/PythonMindScript.h, rulesets/PythonMindScript.cpp:
	  Refactor script classes to inherit from PythonWrapper to make
	  storing wrappers for mind and world entities easier.

	* rulesets/Py_Location.cpp, rulesets/Py_World.cpp: Use PythonWrapper
	  interface to get wrapper pointers from Script objects.

	* rulesets/Python_API.cpp: Improve variable names, and comment out
	  some unused code.
2005-12-11 20:33:43 +00:00
Al Riddoch
1ed6e05234 2005-12-11 Al Riddoch <alriddoch@zepler.org>
* rulesets/PythonThingScript.h, rulesets/PythonThingScript.cpp:
	  Store a pointer to the core object's python wrapper, and modify
	  constructor to initialise it.

	* rulesets/Python_API.cpp, server/ScriptFactory.cpp,
	  server/TaskFactory.cpp: Modify variable name to make it clearer
	  what the wrapper object is. Pass wrapper to script management
	  object constructor, so it can store the pointer.

	* rulesets/PythonMindScript.h: Make constructor explicit for
	  safety.
2005-12-11 03:28:18 +00:00
Al Riddoch
563b6c4714 2005-12-05 Al Riddoch <alriddoch@zepler.org>
* server/TaskFactory.cpp, server/TaskFactory.h: Re-write the
	  script task to handle creating the script directly, rather than
	  use ScriptFactory which is not suitable.

	* rulesets/PythonMindScript.cpp, rulesets/PythonScript.cpp,
	  rulesets/PythonScript.h, PythonThingScript.cpp,
	  rulesets/PythonThingScript.h, rulesets/Python_API.cpp,
	  server/ScriptFactory.cpp: Remove obsolete pointer to entity
	  from script class, removing its link to Entity, making it more
	  generally useful.
2005-12-05 23:47:17 +00:00
Al Riddoch
b60512e186 2005-11-30 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Remove obsolete C++ set_kw() implementation.
2005-11-30 22:40:20 +00:00
Al Riddoch
19d808718a 2005-09-12 Al Riddoch <alriddoch@zepler.org>
* configure.ac: Increment version to development 0.5.x series.

	* aiclient/ClientAccount.cpp, client/BaseClient.cpp,
	  client/ClientConnection.cpp, common/BaseEntity.cpp,
	  common/Database.cpp, common/custom.cpp, common/inheritance.cpp,
	  common/operations.h, rulesets/BaseMind.cpp, rulesets/Creator.cpp,
	  rulesets/Food.cpp, rulesets/MemMap.cpp, rulesets/Pedestrian.cpp,
	  rulesets/Py_Operation.cpp, rulesets/Py_RootEntity.cpp,
	  rulesets/Python_API.cpp, rulesets/Stackable.cpp, rulesets/Thing.cpp,
	  rulesets/World.cpp, server/CommClient.cpp, server/Connection.cpp,
	  server/WorldRouter.cpp, tests/inheritancetest.cpp,
	  tools/AdminClient.h, tools/cyaddrules.cpp,
	  tools/cycmd.cpp, tools/cydumprules.cpp,
	  tools/cyloadrules.cpp, tools/cypasswd.cpp:
	  Remove unnecessary using directives.

	* common/utility.cpp, common/utility.h,
	  rulesets/BaseMind.cpp, rulesets/Py_Operation.cpp,
	  server/CommClient.cpp, tools/AdminClient.h, tools/cycmd.cpp:
	  Remove obsolete utility function from the build.

	* common/operations.h: Remove unused obsolete header from the
	  build.
2005-09-12 16:21:18 +00:00
Al Riddoch
d5637bacef 2005-09-11 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_Operation.h, rulesets/Py_Operation.cpp: Remove reference
	  ownership flag, and from and to pointers from the python operation
	  structure.

	* rulesets/Py_Map.cpp, rulesets/Py_Oplist.cpp,
	  rulesets/PythonMindScript.cpp, rulesets/PythonThingScript.cpp,
	  rulesets/Python_API.cpp: Remove all usage of own, from and to.

	* rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/mind/goals/common/misc_goal.py,
	  rulesets/basic/mind/goals/humanoid/mason.py,
	  rulesets/basic/mind/goals/humanoid/transaction.py,
	  rulesets/mason/world/objects/clothing/Garment.py,
	  rulesets/mason/world/objects/plants/seeds/Acorn.py,
	  rulesets/mason/world/objects/plants/seeds/Apple.py,
	  rulesets/mason/world/objects/plants/seeds/Fircone.py,
	  rulesets/mason/world/objects/tools/Bucksaw.py,
	  rulesets/mason/world/objects/tools/Cleaver.py,
	  rulesets/mason/world/objects/tools/Trowel.py: Modify all scripts
	  so they expect from and to of ops to be an ID string rather than
	  an entity.
2005-09-11 18:51:55 +00:00
Al Riddoch
41fd29502f 2005-09-11 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Modify Python API so Entity() now creates
	  a RootEntity not a Message Element.

	* client/Py_CreatorClient.cpp, client/CreatorClient.h,
	  client/CreatorClient.cpp: Modify CreatorClient and bindings to
	  take a RootEntity rather than a Message Element.
2005-09-11 17:48:26 +00:00
Al Riddoch
1a3157ffb3 2005-09-11 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_Object.h, rulesets/Py_Object.cpp: Remove nasty code
	  used to handle complex attributes to Message Elements. Now should
	  either be converted or rejected.

	* rulesets/Python_API.cpp: Remove code that merged complex python
	  attributes to entity arguments.

	* rulesets/Py_Mind.cpp: Add note that as_entity() method should
	  be removed in the long term.
2005-09-11 17:04:32 +00:00
Al Riddoch
4b41bdb212 2005-09-11 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_Object.cpp, rulesets/Py_Object.h: Ensure that
	  Python to Atlas conversions are aborted if they fail at any
	  point.

	* rulesets/Py_RootEntity.cpp: Ensure all static functions still have
	  unique names. Support setting and retrieving soft attributes.
	  For attribute values which are non-convertible python objects,
	  store a pointer to the original Python object.

	* rulesets/Python_API.cpp: Adapt setting of operation arguments
	  modified Python to Atlas conversion functions.

	* rulesets/mason/define_world.py: Add a very basic test for
	  experimenting with interlinguish.
2005-09-11 13:50:14 +00:00
Al Riddoch
d375a679bc 2005-09-11 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_Operation.cpp: Return entity arguments as RootEntity
	  rather than MessageElement.

	* rulesets/Py_RootEntity.cpp: get_name() returns "obj" as it should
	  rather than "op". Add warnings if unknown attributes are requested
	  or set.

	* rulesets/Python_API.cpp: Accept RootEntity python wrapped
	  objects as arguments to operations.
2005-09-10 23:47:25 +00:00
Al Riddoch
925401e492 2005-08-28 Al Riddoch <alriddoch@zepler.org>
* common/custom.cpp: Install an atlas factory for custom op as a test.

	* rulesets/Py_Operation.cpp: Improve error reporting.

	* rulesets/Python_API.cpp: Fix bug where arguments to ops were
	  ignored.
2005-08-28 15:01:25 +00:00
Al Riddoch
fdd316b628 2005-08-27 Al Riddoch <alriddoch@zepler.org>
* Port whole code base to Atlas-C++ 0.6 series. Main server binary
	  now links.
2005-08-27 14:52:12 +00:00
Al Riddoch
a2b95197d1 2005-06-23 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Move declaration of clist_size so its
	  initialisation is no longer bipassed by jumps.
2005-06-23 13:09:02 +00:00
Al Riddoch
04a1310ed6 2005-06-23 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp, modules/Location.h, rulesets/Python_API.cpp:
	  Implement a function for determining the horizontal distance
	  between two locations neglecting height difference, as for
	  locations on the terrain it is not relevant.

	* rulesets/basic/mind/goals/common/move.py: Improve the coding of
	  the move_me_to_it goal, so distance determination is more effective.
	  Make distance independant of height.
	  Relax distances at which character is concidered to have arrived at
	  its destination.

	* rulesets/basic/mind/Goal.py: Modify goal so that it understands
	  that a subgoal can be unfulfilled, but still not need to take any
	  action.
2005-06-23 12:46:28 +00:00
Al Riddoch
ff6227f0e7 2005-06-22 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.cpp: Fix a problem where entities contained by
	  other entities had their height adjusted incorrectly.

	* rulesets/basic/world/objects/elements/Fire.py: Allow fires to be
	  moved.

	* rulesets/Python_API.cpp: Add constructor for BBox.

	* data/mason.xml: Add a torch. Add burn_speed attributes to a
	  bunch more entity classes.

	* rulesets/mason/world/objects/tools/Torch.py: Script for torch.
2005-06-22 14:56:14 +00:00
Al Riddoch
1f283e4f50 2005-05-14 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_Script_Utils.h, rulesets/Python_API.h,
	  rulesets/Python_API.cpp, rulesets/MindFactory.cpp,
	  server/EntityFactory.cpp: Move functions related to creating
	  script objects into a new header, to avoid namespace pollution.
2005-05-14 23:02:02 +00:00
Al Riddoch
143bad1a28 2005-05-14 Al Riddoch <alriddoch@zepler.org>
* rulesets/Entity.h, rulesets/BaseMind.h: Make scriptSubscribe
	  virtual so it can be overriden in BaseMind.

	* rulesets/Python_API.cpp: Get rid of template for Subscribe_Script
	  as its no longer necessary now scriptSubscribe is virtual.
2005-05-14 22:36:48 +00:00
Al Riddoch
aabb8239c9 2005-05-14 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Clean up variable names to make code more
	  readable.
2005-05-14 20:46:48 +00:00
Al Riddoch
da5b9c4551 2005-05-14 Al Riddoch <alriddoch@zepler.org>
* tools/AdminClient.cpp, tools/AdminClient.h, tools/cyaddrules.cpp:
	  New tool to load new rules into a running server.

	* data/mason.xml, rulesets/mason/world/objects/tools/Rope.py:
	  Experimental type for a rope.

	* man/cyclient.sgml, man/cycmd.sgml, man/cyphesis-tools.sgml,
	  man/cyphesis.sgml: Add SEE ALSO sections to the man pages.

	* rulesets/Python_API.cpp: Clean up variable names.

	* server/Admin.cpp: Send an info response when types are
	  installed from the client.

	* tools/cyloadrules.cpp: Correct copyright dates.
2005-05-13 23:25:32 +00:00
Al Riddoch
354dc0a1b9 2005-05-12 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Re-write the code for extracting operation
	  subscriptions from python classes so its now more efficient and
	  picks up methods from base classes.

	* rulesets/basic/mind/BaseMind.py, rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/world/objects/Thing.py: Rename some methods
	  which have match the signature of operation handlers.
2005-05-12 00:28:01 +00:00
Al Riddoch
7f1ee732b7 2005-05-01 Al Riddoch <alriddoch@zepler.org>
* rulesets/Character.cpp: Include POS from a Use op argument when
	  building the arg for the resulting op.

	* rulesets/Py_Point3D.cpp: Add a print handler.

	* rulesets/Python_API.cpp: When constructing Point3D or Vector3D
	  accept an Atlas list as well as a standard python list.
2005-05-01 18:05:52 +00:00
Al Riddoch
a8c3b3bec0 2005-04-24 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Don't set objtype on entities from python
	  scripts unless they have parents.
2005-04-24 21:58:00 +00:00
Al Riddoch
edc9d66023 2005-04-10 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_Operation.cpp, rulesets/Py_Optime.cpp,
	  rulesets/Py_Optime.h rulesets/Python_API.cpp:
	  Remove the Optime class from the API and force scripts to use
	  setFutureSeconds() to modify operation dispatch time.

	* rulesets/acorn/world/objects/Weather.py,
	  rulesets/acorn/world/objects/plants/Tree.py,
	  rulesets/acorn/world/objects/plants/seeds/Acorn.py,
	  rulesets/acorn/world/objects/plants/seeds/Apple.py,
	  rulesets/acorn/world/objects/plants/seeds/Seed.py,
	  rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/mind/goals/common/move.py,
	  rulesets/basic/world/objects/animals/Animal.py,
	  rulesets/basic/world/objects/buildings/House.py,
	  rulesets/basic/world/objects/elements/Fire.py,
	  rulesets/basic/world/objects/plants/Tree.py,
	  rulesets/basic/world/objects/tools/Bow.py,
	  rulesets/mason/world/objects/Weather.py,
	  rulesets/mason/world/objects/plants/seeds/Acorn.py,
	  rulesets/mason/world/objects/plants/seeds/Apple.py,
	  rulesets/mason/world/objects/plants/seeds/Fircone.py,
	  rulesets/mason/world/objects/plants/seeds/Seed.py:
	  Fix up all the python scripts to use setFutureSeconds on
	  ops instead of time.sadd.
2005-04-11 00:54:15 +00:00
Al Riddoch
85932901ea 2004-12-27 Al Riddoch <alriddoch@zepler.org>
* client/BaseClient.h, client/CharacterClient.h,
	  client/ClientConnection.h, client/CreatorClient.h,
	  client/ObserverClient.h, client/Py_CreatorClient.h,
	  common/Burn.h, common/Chop.h, common/Cut.h, common/Database.h,
	  common/Eat.h, common/Generic.h, common/Nourish.h, common/Setup.h,
	  common/Tick.h, common/Unseen.h, common/Use.h, common/Wield.h,
	  common/accountbase.h, common/inheritance.h, rulesets/Container.h,
	  rulesets/Creator.h, rulesets/LineProperty.h, rulesets/MemMap.h,
	  rulesets/MindFactory.h, rulesets/Movement.h, rulesets/Pedestrian.h,
	  rulesets/Py_BBox.h, rulesets/Py_Location.h, rulesets/Py_Map.h,
	  rulesets/Py_Mind.h, rulesets/Py_Object.h, rulesets/Py_Operation.h,
	  rulesets/Py_Oplist.h, rulesets/Py_Optime.h, rulesets/Py_Point3D.h,
	  rulesets/Py_Quaternion.h, rulesets/Py_Thing.h,
	  rulesets/Py_Vector3D.h, rulesets/Py_World.h, rulesets/Py_WorldTime.h,
	  rulesets/PythonMindScript.h, rulesets/PythonScript.h,
	  rulesets/PythonThingScript.h, rulesets/Python_API.cpp,
	  rulesets/TerrainProperty.h, rulesets/ThingFactory.h, server/Admin.h,
	  server/EntityFactory.h, server/Master.h, server/Peer.h,
	  server/Persistance.h, server/PersistantThingFactory.h,
	  server/Persistor.h, server/Player.h, server/Restoration.h,
	  server/Restorer.h, server/TrustedConnection.h: Make sure all
	  classes have up updated description in the comments.
2004-12-27 03:06:54 +00:00
Al Riddoch
72052d2008 2004-12-19 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_Vector3D.cpp: Allow setting of Vector3D attributes
	  x y and z.

	* rulesets/Python_API.cpp: Fix bug in calculating orientation
	  Quaternion for rotation between two unit vectors.

	* rulesets/basic/mind/NPCMind.py: Implement a method which calculates
	  the orientation required to face another entity. Use it to face
	  a character which wants to buy something.

	* rulesets/mason/define_world.py: Tweak orientation of pig merchant
	  so he doesn't end up upside down.

	* server/Makefile.am: Remove cyslave from the build for now, as its
	  not functional.
2004-12-19 01:46:23 +00:00
Al Riddoch
b634627491 2004-12-05 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp, server/CommListener.cpp:
	  Remove redundant <cstdio> includes.
2004-12-05 21:36:21 +00:00
Al Riddoch
299efcafdc 2004-12-03 Al Riddoch <alriddoch@zepler.org>
* 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/Py_CreatorClient.cpp, common/BaseEntity.cpp,
	  common/BaseEntity.h, common/BaseWorld.h, common/custom.cpp,
	  common/inheritance.cpp, common/inheritance.h,
	  common/inheritance_impl.h, common/op_switch.h, common/type_utils.h,
	  common/types.h, common/utility.cpp, common/utility.h,
	  modules/Location.cpp, 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/EntityProperties.cpp, rulesets/Entity_getLocation.h,
	  rulesets/Food.cpp, rulesets/Food.h, rulesets/MemMap.cpp,
	  rulesets/MemMap.h, rulesets/Missile.h, rulesets/Pedestrian.cpp,
	  rulesets/Plant.cpp, rulesets/Plant.h, rulesets/Py_Mind.cpp,
	  rulesets/Py_Object.cpp, rulesets/Py_Operation.cpp,
	  rulesets/Py_Operation.h, rulesets/Py_Thing.cpp,
	  rulesets/PythonMindScript.h, rulesets/PythonScript.h,
	  rulesets/PythonThingScript.h, rulesets/Python_API.cpp,
	  rulesets/Script.cpp, rulesets/Script.h, rulesets/Stackable.cpp,
	  rulesets/Stackable.h, rulesets/Thing.cpp, rulesets/Thing.h,
	  rulesets/World.cpp, rulesets/World.h,
	  server/Account.cpp, server/Account.h server/Admin.cpp, server/Admin.h,
	  server/CommClient.cpp, server/Connection.cpp, server/Connection.h,
	  server/EntityFactory.cpp, server/EntityFactory.h, server/Lobby.cpp,
	  server/Lobby.h, server/Persistance.cpp, server/Persistance.h,
	  server/Persistor.cpp, server/Player.cpp, server/Player.h,
	  server/ServerRouting.cpp, server/ServerRouting.h,
	  server/TrustedConnection.cpp, server/TrustedConnection.h,
	  server/WorldRouter.cpp, server/WorldRouter.h, tests/Areatest.cpp,
	  tests/Charactertest.cpp, tests/Creatortest.cpp,
	  tests/EntityExerciser.h, tests/Entitytest.cpp, tests/Foodtest.cpp,
	  tests/IGEntityExerciser.h, tests/Linetest.cpp, tests/Planttest.cpp,
	  tests/Stackabletest.cpp, tests/Structuretest.cpp, tests/Thingtest.cpp,
	  tests/Worldtest.cpp, tests/allOperations.h, tests/inheritancetest.cpp,
	  tests/utilitytest.cpp, tools/cycmd.cpp:
	  Modify the entity interface so that all Operation methods
	  take references to RootOperation, as its cleaner, and requires
	  less nasty casts. Clean up operations in headers generally.
2004-12-03 14:49:13 +00:00
Al Riddoch
6e10c36111 2004-11-29 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Clear up the logging wrappers.
	  Add python wrapper for squareDistance which is more efficient
	  in the goal code that distanceTo. Remove some old python functions
	  which serve no purpose. Move distanceTo and squareDistance into
	  their own module.

	* rulesets/basic/mind/NPCMind.py: Remove obsolete import.

	* rulesets/basic/mind/goals/common/misc_goal.py,
	  rulesets/basic/mind/goals/common/move.py,
	  rulesets/basic/mind/goals/humanoid/construction.py: Use the new
	  physics.square_distance where linear distance is required
	  in goals.
2004-11-29 21:32:53 +00:00
Al Riddoch
d836d1b3b8 2004-11-20 Al Riddoch <alriddoch@zepler.org>
* rulesets/MindFactory.cpp, rulesets/Py_Object.h,
	  rulesets/Py_Operation.h, rulesets/PythonScript.h,
	  rulesets/Python_API.cpp: Include Python.h first to avoid some
	  header conflicts.
2004-11-20 10:28:24 +00:00
Al Riddoch
c4a92de9f3 2004-11-06 Al Riddoch <alriddoch@zepler.org>
* aiclient/ClientConnection.cpp, client/BaseClient.cpp,
	  client/CharacterClient.cpp, client/ClientConnection.cpp,
	  common/Database.cpp, common/FormattedXMLWriter.cpp,
	  common/inheritance.cpp, common/refno.h, common/terrain_utils.cpp,
	  common/type_utils.h, common/utility.cpp, modules/WorldTime.cpp,
	  modules/WorldTime.h, physics/Collision.cpp, rulesets/Area.cpp,
	  rulesets/BaseMind.cpp, rulesets/Character.cpp, rulesets/Entity.cpp,
	  rulesets/Line.cpp, rulesets/MemMap.cpp, rulesets/MemMap_methods.h,
	  rulesets/Movement.cpp, rulesets/Plant.cpp, rulesets/Py_Map.cpp,
	  rulesets/Py_Object.cpp, rulesets/Py_Operation.cpp,
	  rulesets/Py_Oplist.cpp, rulesets/PythonMindScript.cpp,
	  rulesets/PythonThingScript.cpp, rulesets/Python_API.cpp,
	  rulesets/Stackable.cpp, rulesets/TerrainProperty.cpp,
	  rulesets/Thing.cpp, rulesets/World.cpp, server/Account.cpp,
	  server/CommClient.cpp, server/CommServer.cpp, server/Connection.cpp,
	  server/EntityFactory.cpp, server/Lobby.cpp, server/Persistance.cpp,
	  server/Player.cpp, server/Restoration.cpp, server/ServerRouting.cpp,
	  server/WorldRouter.cpp, tests/EntityExerciser.h,
	  tests/IGEntityExerciser.h, tests/inheritancetest.cpp,
	  tools/cycmd.cpp, tools/cyconvertrules.cpp, tools/cydbload.cpp,
	  tools/cyloadrules.cpp:
	  Tweak for loops to avoid creating a temporary iterator each
	  iteration.

	* tests/type_utilstest.cpp: New test for function which does
	  list conversions.
2004-11-06 20:36:03 +00:00
Al Riddoch
4cc780a559 2004-11-04 Al Riddoch <alriddoch@zepler.org>
* rulesets/Plant.h, rulesets/Plant.cpp: Add handler for chop so
	  we can chop down vegetation.

	* rulesets/basic/world/objects/tools/Axe.py: Modify Axe to comply
	  with new tool use mechanism.

	* rulesets/basic/mind/goals/humanoid/transaction.py,
	  rulesets/basic/mind/goals/common/misc_goal.py,
	  rulesets/mason/define_world.py: Update butcher goals to use tool
	  use mechanism.

	* rulesets/Python_API.cpp: Ensure entities created from Python
	  have an objtype.
2004-11-04 11:39:00 +00:00
Al Riddoch
feb7cb032e 2004-10-23 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.cpp: Add a note to check the code.

	* rulesets/basic/mind/goals/humanoid/transaction.py: Remove debug
	  output.

	* rulesets/basic/mind/goals/common/move.py: New goal to accompany
	  another person.

	* rulesets/basic/mind/goals/common/misc_goal.py: Use new accompany
	  goal for hirelings.

	* rulesets/Python_API.cpp: Fix distance_to arg checking error
	  message.

	* rulesets/Py_Vector3D.cpp: Add square magnitude and distance checking
	  methods.
2004-10-24 01:38:59 +00:00
Al Riddoch
ce8f62d539 2004-10-11 Al Riddoch <alriddoch@zepler.org>
* modules/Location.cpp, modules/Location.h: Add new function for
	  usefully calculating the distance vector of another entity.

	* tests/distancetest.cpp: Update test to check new distance
	  function.

	* rulesets/Python_API.cpp: Make the new distance vector function
	  available to python rather than the relative postion function.

	* rulesets/basic/mind/Knowledge.py, rulesets/basic/mind/NPCMind.py:
	  Ensure that Knowledge really does handle arbitrary triples.

	* rulesets/basic/mind/goals/common/misc_goal.py: Add new version
	  of transaction goal for transactions for hirelings.

	* rulesets/basic/mind/goals/humanoid/transaction.py: Complete
	  the implementation of the trigger goal for hirelings.

	* rulesets/mason/define_world.py: Move the mercenaries closer to
	  origin for debugging.
2004-10-11 01:04:27 +00:00
Al Riddoch
5cfdd958c7 2004-10-05 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Process python output into clean log
	  output.
2004-10-04 23:08:26 +00:00
Al Riddoch
195ac5a2e3 2004-10-02 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_BBox.cpp, rulesets/Py_Location.cpp,
	  rulesets/Python_API.cpp: Eliminate some raw stderr output,
	  and replace with python errors, and calls to the log subsystem.
2004-10-02 15:36:34 +00:00
Al Riddoch
0b4f56e441 2004-10-02 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Add new python wrapper for
	  relativePosition().

	* common/Database.cpp: Don't need trailing ; on database queries.
2004-10-02 01:12:02 +00:00
Al Riddoch
68ab5f7fc8 2004-09-20 Al Riddoch <alriddoch@zepler.org>
* physics/Vector3D.h, physics/Vector3D.cpp, modules/Location.h,
	  modules/Location.cpp: Convert to using WFMath::Point instead of
	  WFMath::Vector for position.

	* physics/Collision.h, physics/Collision.cpp: Update collision code
	  to use new pos type.

	* rulesets/Py_Point3D.h, rulesets/Py_Point3D.cpp: New python
	  wrappers for WFMath::Point.

	* rulesets/Py_Location.cpp, rulesets/Py_Vector3D.cpp,
	  rulesets/Python_API.cpp:
	  Update python wrappers to take into account new pos type.
	  Ensure that only apropriate functionality is available for
	  point and vector.

	* rulesets/Character.cpp, rulesets/Entity.cpp, rulesets/Entity.h,
	  rulesets/Line.cpp, rulesets/Movement.cpp, rulesets/Movement.h,
	  rulesets/Pedestrian.cpp, rulesets/Pedestrian.h,
	  rulesets/Plant.cpp, rulesets/Thing.cpp, rulesets/World.cpp,
	  server/EntityFactory.cpp, server/WorldRouter.cpp,
	  server/WorldRouter.h: Update the rest of the code for new pos
	  type, converting all places where entity parenting is changed
	  to use WFMath toParentCoords() and toLocalCoords() methods,
	  so that orientation is handled correctly.

	* tests/transformtest.cpp: New test to ensure that toParentCoords()
	  and toLocalCoords() perform as expected.

	* tests/Creatortest.cpp, tests/Locationtest.cpp, tests/Worldtest.cpp,
	  tests/collisiontest.cpp, tests/emergencetest.cpp:
	  Update the rest of the tests.
2004-09-20 10:16:04 +00:00
Al Riddoch
1cf0a8630b 2004-09-05 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Use the Generic operation class for ops
	  with no hard coded type.

	* rulesets/Movement.cpp: Make the time periods used when checking
	  collisions dependent on the standard tick time.
2004-09-05 23:03:38 +00:00
Al Riddoch
b256b30d90 2004-08-24 Al Riddoch <alriddoch@zepler.org>
* client/Py_CreatorClient.cpp, common/BaseEntity.cpp,
	  common/BaseEntity.h, modules/Location.cpp, modules/Location.h,
	  rulesets/Area.cpp, rulesets/Area.h, rulesets/Character.cpp,
	  rulesets/Character.h, rulesets/Entity.cpp, rulesets/Entity.h,
	  rulesets/Line.cpp, rulesets/Line.h, rulesets/MemMap.cpp,
	  rulesets/Pedestrian.cpp, rulesets/Plant.cpp, rulesets/Plant.h,
	  rulesets/Py_Mind.cpp, rulesets/Py_Object.cpp, rulesets/Py_Thing.cpp,
	  rulesets/Python_API.cpp, rulesets/Stackable.cpp,
	  rulesets/Stackable.h, rulesets/Thing.cpp, rulesets/World.cpp,
	  rulesets/World.h, server/Account.cpp, server/Account.h,
	  server/Admin.cpp, server/Connection.cpp, server/Lobby.cpp,
	  server/Lobby.h, server/Player.cpp, server/Player.h,
	  server/ServerRouting.cpp, server/ServerRouting.h,
	  tests/Areatest.cpp, tests/Entitytest.cpp, tests/Foodtest.cpp,
	  tests/Linetest.cpp, tests/Planttest.cpp, tests/Stackabletest.cpp,
	  tests/Structuretest.cpp, tests/Thingtest.cpp, tests/Worldtest.cpp:
	  Replace addToObject() with addToMessage() throughout.

	* server/Account.cpp, server/Lobby.cpp: Use BaseEntity::addToMessage().

	* server/Player.cpp: Make adding character types attribute to Message
	  more efficient.
2004-08-24 21:05:06 +00:00
Al Riddoch
96f13800c8 2004-08-07 Al Riddoch <alriddoch@zepler.org>
* common/BaseEntity.cpp, common/BaseEntity.h, common/BaseWorld.h,
	  common/Database.cpp, common/Database.h, common/FormattedXMLWriter.cpp,
	  common/FormattedXMLWriter.h, common/accountbase.cpp,
	  common/accountbase.h, common/custom.cpp, common/inheritance.cpp,
	  common/inheritance.h, common/operations.h, common/type_utils.h,
	  common/utility.cpp, common/utility.h, modules/Location.cpp,
	  modules/Location.h, rulesets/Area.cpp, rulesets/Area.h,
	  rulesets/BaseMind.cpp, rulesets/Character.cpp, rulesets/Character.h,
	  rulesets/Creator.cpp, rulesets/Entity.cpp, rulesets/Entity.h,
	  rulesets/Entity_getLocation.h, rulesets/Food.cpp, rulesets/Line.cpp,
	  rulesets/Line.h, rulesets/MemMap.cpp, rulesets/MemMap.h,
	  rulesets/Pedestrian.cpp, rulesets/Plant.cpp, rulesets/Plant.h,
	  rulesets/Py_Mind.cpp, rulesets/Py_Object.cpp, rulesets/Py_Object.h,
	  rulesets/Py_Operation.cpp, rulesets/Py_Thing.cpp,
	  rulesets/Python_API.cpp, rulesets/Stackable.cpp, rulesets/Stackable.h,
	  rulesets/Thing.cpp, rulesets/World.cpp, rulesets/World.h,
	  server/Account.cpp, server/Account.h, server/Admin.cpp,
	  server/Admin.h, server/CommClient.cpp, server/CommClient.h,
	  server/CommListener.cpp, server/CommListener.h,
	  server/CommLocalClient.cpp, server/CommLocalClient.h,
	  server/CommMetaClient.h, server/CommPSQLSocket.h,
	  server/CommRemoteClient.cpp, server/CommRemoteClient.h,
	  server/CommServer.cpp, server/CommServer.h, server/CommSocket.cpp,
	  server/CommSocket.h, server/CommUnixListener.cpp,
	  server/CommUnixListener.h, server/Connection.cpp,
	  server/Connection.h, server/EntityFactory.cpp,
	  server/EntityFactory.h, server/Lobby.cpp, server/Lobby.h,
	  server/Persistance.cpp, server/Persistance.h,
	  server/PersistantThingFactory.h, server/Persistor.cpp,
	  server/Player.cpp, server/Player.h, server/Restorer.h,
	  server/Restorer_impl.h, server/ServerRouting.cpp,
	  server/ServerRouting.h, server/TrustedConnection.cpp,
	  server/TrustedConnection.h, server/WorldRouter.cpp,
	  server/WorldRouter.h: Convert code to using Atlas Message
	  typedefs as found in Atlas-C++ 0.6 to aid conversion later.
2004-08-16 14:26:47 +00:00
Al Riddoch
dff51140d1 2004-06-29 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/NPCMind.py, rulesets/BaseMind.cpp,
	  modules/WorldTime.h: WorldTime now handles time in
	  integer seconds.

	* rulesets/Python_API.cpp: Handle all variations of args with one
	  call to PyArg_ParseTuple as multiple calls are not
	  allowed.
2004-06-29 12:19:02 +00:00
Al Riddoch
d956e574c3 2004-06-23 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_Location.cpp, rulesets/Py_Map.cpp, rulesets/Py_Mind.cpp,
	  rulesets/Py_Object.cpp, rulesets/Py_Operation.cpp,
	  rulesets/Py_Quaternion.cpp, rulesets/Py_Thing.cpp,
	  rulesets/Py_Vector3D.cpp, rulesets/Python_API.cpp:
	  Change some methods to use METH_NOARGS for simplicity.
2004-06-23 17:19:26 +00:00
Al Riddoch
9f9b0c12a3 2004-06-20 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Clean up use of standard error to go
	  via the log subsystem.

	* rulesets/basic/editor.py, rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/mind/panlingua/interlinguish.py,
	  rulesets/mason/define_world.py:
	  Expand handling of the verb "know" so that knowledge
	  is a triple, including predicate, so that know can be used
	  to inform a character of any knowledge. Generalise the client
	  code, and tweak the client data to include the right information.

	* mason.xml: Add new rule for mercenaries.

	* rulesets/basic/mind/goals/humanoid/transaction.py: Add new
	  dynamic goal for NPCs offering their services for hire.

	* rulesets/basic/mind/panlingua/interlinguish.py:
	  Add new words related to hirable NPCs

	* rulesets/mason/define_world.py: Start programming up warriors
	  to be hirable.
2004-06-20 19:24:36 +00:00
Al Riddoch
74244d514f 2004-06-15 Al Riddoch <alriddoch@zepler.org>
* common/Database.cpp, common/globals.cpp, rulesets/Area.cpp,
	  rulesets/Python_API.cpp, server/Connection.cpp,
	  server/Persistance.cpp: Ensure that all output goes either via
	  the log system, or only in debug macros.
2004-06-15 18:06:59 +00:00
Al Riddoch
db567a85b5 2004-05-16 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Add to python search path directly, rather
	  than using an environment hack.
2004-05-16 03:51:28 +00:00
Al Riddoch
6c46fee3a1 2004-04-23 Al Riddoch <alriddoch@zepler.org>
* tools/cycmd.cpp: Add new command to enable and disable server
	  monitoring.

	* server/WorldRouter.cpp, common/BaseWorld.h: Add facility to
	  notify using a SigC signal each type an op is dispatched.

	* server/CommClient.h, server/CommClient.cpp: Fix typo in
	  overridden method which meant it didn't work.

	* server/Admin.h, server/Admin.cpp: Add handler for Monitor operation
	  which turns on and off sending all IG ops to the admin client.

	* rulesets/Python_API.cpp, common/types.h, common/Generic.h,
	  common/BaseEntity.h: Fix Generic op so it can be used, and
	  clean up its use. Add an enumeration for monitor ops.
2004-04-23 17:50:38 +00:00