Commit graph

127 commits

Author SHA1 Message Date
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
Al Riddoch
28d9e0e62a 2004-04-20 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Add comments on new Python type API.
2004-04-19 10:14:17 +00:00
Al Riddoch
9a7a07007f 2004-01-22 Al Riddoch <alriddoch@zepler.org>
* common/custom.cpp, common/inheritance.cpp, common/operations.cpp,
2004-01-22 03:03:07 +00:00
Al Riddoch
ba69f6ec4d 2003-11-22 Al Riddoch <alriddoch@zepler.org>
* common/Database.cpp: Additional error reporting for bad update
	  queries.

	* rulesets/Plant.h: Add accessor for number of fruits.

	* rulesets/Python_API.cpp: Remove experimental Python type code.

	* server/Persistor_impl.h: Fix persisting plant fruits, and
	  character attributes.
2003-11-22 15:30:30 +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
b584b32964 2003-09-08 Al Riddoch <alriddoch@zepler.org>
* client/Py_CreatorClient.cpp, client/Py_CreatorClient.h,
	  rulesets/Py_BBox.cpp, rulesets/Py_BBox.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_Quaternion.cpp, rulesets/Py_Quaternion.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/PythonMindScript.cpp, rulesets/PythonThingScript.cpp,
	  rulesets/Python_API.cpp:
	  Clean up python API code, with decent names for types,
	  decent error reporting, and making the more paranoid checks
	  only present in debug build.

	* common/BaseEntity.cpp, common/BaseEntity.h, server/Account.cpp:
	  Remove pointless method setRefnoOp, and put it in the body as
	  an inline method.

	* common/BaseEntity.h, common/BaseWorld.cpp, common/Setup.h,
	  common/Tick.h, common/operations.h, common/custom.cpp,
	  common/types.h, common/utility.cpp, common/utility.h,
	  modules/Location.h, physics/Vector3D.h, rulesets/BaseMind.cpp,
	  rulesets/Script.h, server/EntityFactory.h:
	  Clean up the dependency trees using more forward declarations.

	* common/inheritance.cpp, common/inheritance.h:
	  Move most of the implementation into the .cpp file as its
	  not suited to inlining.

	* rulesets/MemMap.cpp, rulesets/MemMap.h, rulesets/MemMap_methods.h:
	  Move contents of MemMap_methods.h into the .cpp file, as it is
	  not suited to inlining, and remove the file from the build.
2003-09-07 23:38:32 +00:00
Al Riddoch
eafee1e683 2003-08-30 Al Riddoch <alriddoch@zepler.org>
* server/Makefile.am: Move cyslave into EXTRAs so that its not
	  built by default.

	* server/CommListener.cpp: Check that listener is open before using
	  it.

	* common/log.h, common/log.cpp: Add log levels for output from
	  scripts.

	* rulesets/Python_API.cpp: Add new python objects which replace
	  sys.stdout and sys.stderr, and redirect output to the
	  cyphesis logging mechanism.
2003-08-30 11:41:58 +00:00
Al Riddoch
0fbfc771ad 2003-08-07 Al Riddoch <alriddoch@zepler.org>
* server/Lobby.cpp: Add some debugging messages.

	* server/CommServer.cpp: Tweak select loop so that closed connections
	  are cleaned up as soon as they are detected.

	* rulesets/World.cpp: Make demo terrain a bit more mountainous.

	* Convert entire codebase over to using Atlas-C++ 0.4.90, as
	  start of transition to 0.6 API.
2003-08-07 23:03:26 +00:00
Al Riddoch
00e9aeb541 2003-07-21 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Clean up initialisation of python modules to
	  make code readable.
2003-07-22 15:06:31 +00:00
Al Riddoch
cbbcbcc33e 2003-07-21 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Fix leaked python reference.

	* rulesets/World.cpp: Fix leaked terrain object.
2003-07-21 02:36:58 +00:00
Al Riddoch
184b29b6a6 2003-07-19 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_BBox.cpp, rulesets/Py_Quaternion.cpp,
	  rulesets/Python_API.cpp, server/Restorer_impl.h:
	  Add some casts and tweaks so that wrappers and
	  database code work with wfmath structures.
2003-07-19 02:11:49 +00:00