Commit graph

350 commits

Author SHA1 Message Date
Al Riddoch
2b94478c6b 2005-05-14 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/misc_goal.py: Fix cut_something
	  goal so it now works with current tool use.
2005-05-14 20:20:57 +00:00
Al Riddoch
627484f79b 2005-05-14 Al Riddoch <alriddoch@zepler.org>
* data/mason.xml: Add a new rule for fish.

	* rulesets/mason/define_world.py: Add a shoal of fish to the lake.

	* common/custom.cpp, rulesets/Character.cpp,
	  rulesets/basic/mind/NPCMind.py: Use Unseen operation to notify
	  minds when they attempt to interactive with something that
	  they can't iteract with, either because its outside their
	  area of perception, or because its been deleted.
2005-05-14 15:17:31 +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
0c69dee552 2005-05-10 Al Riddoch <alriddoch@zepler.org>
* data/mason.xml: Type for bundles of grass.

	* rulesets/World.cpp: Implement resource gathering for all the
	  currently supported resource types.

	* rulesets/basic/world/objects/Pile.py: Fix so Pile inherits from
	  Thing correctly.
2005-05-10 16:32:28 +00:00
Al Riddoch
5aebaefe22 2005-05-10 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml, rulesets/basic/world/objects/Pile.py: Add a new
	  experimental type for piles.

	* TODO: Some random crazy shit.
2005-05-10 15:52:51 +00:00
Al Riddoch
ccb6388908 2005-05-06 Al Riddoch <alriddoch@zepler.org>
* common/Dig.h, common/Mow.h, common/custom.cpp, common/operations.cpp:
	  Add new Dig and Mow operations, for handling resource gathering.

	* rulesets/basic/world/objects/tools/Shovel.py,
	  rulesets/basic/world/objects/tools/Scythe.py,
	  data/basic.xml: Add new scythe and shovel for gathering resources
	  from the terrain.

	* rulesets/basic/world/objects/tools/Pickaxe.py,
	  common/Delve.h: Fix the comments.

	* rulesets/World.cpp, rulesets/World.h: Move code for determining
	  terrain surface type into a method of its own. Implement handlers
	  for Dig and Mow ops.
2005-05-06 01:41:17 +00:00
Al Riddoch
6d127f1a7e 2005-04-24 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/misc_goal.py,
	  rulesets/basic/mind/goals/humanoid/construction.py:
	  Make sure Use arguments explicitly have an objtype in the
	  argument.
2005-04-24 23:08:34 +00:00
Al Riddoch
7ba24a29d9 2005-04-21 Al Riddoch <alriddoch@zepler.org>
* common/custom.cpp, common/Delve.h,
	  common/operations.cpp, common/operations.h:
	  Add new delve operation for digging with a pickaxe.

	* data/basic.xml, rulesets/basic/world/objects/tools/Pickaxe.py:
	  Add new pickaxe entity which emits a Delve operation when
	  used.

	* rulesets/Character.cpp: Fix a bug where a segfault occured
	  if an operation was requested by a tool that was unknown to
	  to the core server code. Instead an error message is emitted.

	* rulesets/World.cpp: Subscribe world terrain to delve ops.
2005-04-22 00:29:10 +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
4155ad1240 Remove some obsolete .cvsignore files 2005-01-25 23:56:42 +00:00
Al Riddoch
62412887cf 2005-01-25 Al Riddoch <alriddoch@zepler.org>
* data/werewolf.xml,
	  rulesets/mason/world/objects/plants/seeds/Apple.py,
	  rulesets/werewolf/world/objects/characters/Villager.py,
	  rulesets/werewolf/world/objects/tools/Gallows.py:
	  Remove some more obsolete constructors.
2005-01-25 23:50:57 +00:00
Al Riddoch
bda38097f0 2005-01-25 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Clean out a load of obsolete classes and scripts.

	* rulesets/basic/world/objects/buildings/House.py,
	  rulesets/basic/world/objects/buildings/StoneHouse.py,
	  rulesets/basic/world/objects/tools/Bow.py,
	  rulesets/basic/world/objects/tools/Sword.py,
	  rulesets/mason/world/objects/plants/seeds/Seed.py,
	  rulesets/mason/world/objects/undead/Skeleton.py:
	  Remove obsolete constructors, and don't inherit from
	  obsolete scripts.
2005-01-25 23:22:30 +00:00
Al Riddoch
fb80cb3c42 2005-01-24 Al Riddoch <alriddoch@zepler.org>
* rulesets/mason/world/objects/tools/Cleaver.py,
	  rulesets/mason/world/objects/animals/Deer.py,
	  rulesets/basic/world/objects/tools/Axe.py:
	  Remove obsolete commented out code, and useless constructors
	  from some scripts.

	* data/mason.xml: Remove obsolete scripts for some entities
	  which don't do anything.
2005-01-24 17:18:08 +00:00
Al Riddoch
8e5c27bf80 2004-01-09 Al Riddoch <alriddoch@zepler.org>
* rulesets/mason/define_world.py: Use know() for prices rather
	  than the special case code.

	* rulesets/basic/editor.py, rulesets/basic/mind/NPCMind.py:
	  Remove obsolete special case code for handling knowledge of
	  prices. Improve code to express distance to a location so
	  it neglects the vertical distance, and better handles the
	  very close case.

	* rulesets/basic/mind/goals/humanoid/mason.py: Track the character
	  being helped in the help goal, and turn to face them when speaking.

	* rulesets/basic/mind/panlingua/interlinguish.py: Add more support
	  for pronouns, conjugations and whitespace in regex used to match
	  certain sentence structures.
2005-01-09 21:24:57 +00:00
Al Riddoch
1d368609cd 2004-01-09 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/panlingua/interlinguish.py:
	  Slight tweak to regular expressions for simple sentences.
2005-01-09 02:01:09 +00:00
Al Riddoch
003dcfbcc3 2004-01-09 Al Riddoch <alriddoch@zepler.org>
* rulesets/Py_Vector3D.cpp: Add print handler for Vector3D, which
	  doesn't seem to work yet.

	* rulesets/basic/mind/panlingua/interlinguish.py: Add tell verb.
	  Modify regexs for simple sentences so they tolerate more
	  variation in the structure.

	* rulesets/basic/mind/compass.py: New function to convert direction
	  vector into a compass direction string.

	* rulesets/basic/mind/NPCMind.py: Add handler for tell verb, to
	  query knowledge from NPCs.
2005-01-09 01:16:16 +00:00
Al Riddoch
846a008105 2004-12-20 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/move.py: Don't try and move to
	  destination when displacement is pure vertical.

This stops the pig merchant from walking on the spot.
2004-12-20 00:34:21 +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
76dbac23b1 2004-12-18 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/panlingua/interlinguish.py: Added new noun for
	  deed.

	* data/mason.xml, rulesets/mason/define_world.py: Added new marshall
	  character who handles asigning land to settlers for housing.
2004-12-18 23:04:03 +00:00
Al Riddoch
9a47027b9d 2004-12-17 Al Riddoch <alriddoch@zepler.org>
* rulesets/mason/define_world.py,
2004-12-17 02:00:19 +00:00
Al Riddoch
03f105d991 2004-12-17 Al Riddoch <alriddoch@zepler.org>
* rulesets/mason/define_world.py,
	  rulesets/basic/mind/goals/humanoid/mason.py: Add suggested responses
	  to talk messages from NPCs. Helps the client make it easy
	  for the user to respond.
2004-12-17 01:41:30 +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
e809d387c4 2004-11-19 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/Knowledge.py: Fix nasty problem caused because
	  the default arguments to constructor meant that all knowledge
	  was shared between all entities, causing invalid pointers in
	  the wrong places.

	* rulesets/MemMap.h: Add const to find method, as it should be.
2004-11-19 01:58:28 +00:00
Al Riddoch
0e71e6be03 2004-11-18 Al Riddoch <alriddoch@zepler.org>
* rulesets/Character.cpp, rulesets/Plant.cpp: Encapsulate the
	  debugging output relating to tool use into the debug macro, so it
	  is no longer printed.

	* rulesets/basic/mind/goals/common/move.py: Re-write a couple
	  of movement goals so they work more reliably.

	* rulesets/basic/mind/goals/humanoid/construction.py: Comment out
	  debugging output.

	* rulesets/mason/define_world.py: More additions to NPC settler test.
2004-11-18 14:48:32 +00:00
Al Riddoch
aab495780a 2004-11-18 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/editor.py: Improve the define_world API by making
	  the type argument optional.
2004-11-18 11:41:00 +00:00
Al Riddoch
6935e5f411 2004-11-18 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/NPCMind.py: Use primary type as key in
	  mind.things when name is not useful.
2004-11-18 01:51:40 +00:00
Al Riddoch
6b0ddf41ac 2004-11-18 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/move.py:
	  Try and make some of the move goals a bit more legible.

	* rulesets/basic/mind/goals/humanoid/construction.py:
	  Fix a bunch of bugs in the resource gathering goals.
	  These now basically work.

	* rulesets/mason/define_world.py: Add knowledge of a test location
	  to the settler NPC testing code.
2004-11-18 01:26:09 +00:00
Al Riddoch
37178eb88e 2004-11-17 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/move.py: Fix mistake converting
	  pursuit goal from get_xyz() to distance_to().
2004-11-17 20:53:57 +00:00
Al Riddoch
7ed5102c7c 2004-11-17 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/humanoid/construction.py: New currently
	  non-functional goals for construction related tasks.

	* rulesets/mason/define_world.py: Add new test for construction
	  goals.
2004-11-17 18:59:06 +00:00
Al Riddoch
7fc11bbf84 2004-11-17 Al Riddoch <alriddoch@zepler.org>
* rulesets/acorn/mind/PigMind.py,
	  rulesets/basic/mind/goals/common/misc_goal.py,
	  rulesets/basic/mind/goals/common/move.py,
	  rulesets/mason/define_world.py,
	  rulesets/mason/mind/PigMind.py: Re-write all code that uses
	  get_xyz() to use the code for calculating relative distance
	  vector.
2004-11-17 15:26:34 +00:00
Al Riddoch
707ba21b19 2004-11-17 Al Riddoch <alriddoch@zepler.org>
* rulesets/MemMap.cpp: Add checks so that only visible entities
	  in the memory map are returned by the find function.
2004-11-17 02:47:33 +00:00
Al Riddoch
45eba48bf6 2004-11-13 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/world/objects/tools/Axe.py,
	  rulesets/Plant.cpp: Make trees rotate 90 degress when they are
	  chopped, simulating being cut down.
2004-11-13 16:42:55 +00:00
Al Riddoch
25b857aa98 2004-11-04 Al Riddoch <alriddoch@zepler.org>
* cyphesis.spec.in: Ensure rpm spec correctly obsoletes the old
	  mason and service rpms.

	* modules/Location.cpp: Get rid of accidentally commited change
	  that screws up orientation.

	* rulesets/Character.cpp: Provide more info about ops which
	  have TO set incorrectly.

	* rulesets/MemMap.cpp: Don't set TO on look ops from memory.

	* rulesets/basic/mind/NPCMind.py: Don't set TO on tick ops
	  from the mind.
2004-11-04 21:04:01 +00:00
Al Riddoch
e13826d573 2004-11-04 Al Riddoch <alriddoch@zepler.org>
* rulesets/Character.cpp: Add notes, and a check to ensure that
	  ops from the mind don't have TO set.

	* rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/mind/goals/common/misc_goal.py,
	  rulesets/basic/mind/goals/humanoid/mason.py: Don't set TO or FROM
	  on goals from the mind.
2004-11-04 17:42:40 +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
1c6d68c9cb 2004-10-26 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/misc_goal.py: Clarify logic
	  in get_knowledge().

	* rulesets/mason/define_world.py: Make the butcher work all day for
	  now. Give all the warriors arrows. Add a test function for the
	  deer.
2004-10-26 21:53:59 +00:00
Al Riddoch
ee38122cc0 2004-10-26 Al Riddoch <alriddoch@zepler.org>
* rulesets/werewolf/world/objects/tools/Gallows.py: Make sure
	  Point3D module is imported.

	* rulesets/basic/mind/goals/humanoid/transaction.py: Fix a couple
	  of bugs with pig seller code.
2004-10-26 17:18:03 +00:00
Al Riddoch
1eb1d322a2 2004-10-25 Al Riddoch <alriddoch@zepler.org>
* rulesets/werewolf/world/objects/tools/Gallows.py,
	  rulesets/basic/world/objects/tools/Bow.py,
	  rulesets/basic/world/objects/plants/Tree.py,
	  rulesets/basic/world/objects/buildings/House.py,
	  rulesets/basic/mind/goals/humanoid/transaction.py,
	  rulesets/basic/mind/goals/common/misc_goal.py:
	  Fix bugs initialising Location ensuring the second
	  arg is a Point3D, not a Vector3D for position.
	  Fixes pig purchasing.

	* rulesets/basic/mind/goals/humanoid/mason.py:
	  Fix the velocity check for escaping pigs.

	* rulesets/Py_Point3D.cpp: Fix Point3D subtraction operator to
	  allow subtraction of both Point and Vector. Fixes pig merchant
	  goal for keeping pigs.
2004-10-25 01:23:28 +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
e4a14fd5e4 2004-10-23 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/Knowledge.py: Simplify constructor.

	* rulesets/Entity.h, rulesets/Entity.cpp: Make getXyz() inline.

	* modules/Location.h: Remove obsolete unimplemented
	  getXyz() method.
2004-10-23 22:53:37 +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
b513e157cf 2004-09-24 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/move.py: Update to use new Point3D
	  type for pos.
2004-09-24 01:15:59 +00:00
Al Riddoch
78f9a8e3e4 2004-07-22 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/misc_goal.py: Remove debugging
	  output from the spot_something() goal.
2004-07-22 16:22:52 +00:00
Al Riddoch
750205b29f 2004-07-21 Al Riddoch <alriddoch@zepler.org>
* rulesets/BaseMind.cpp, rulesets/MemMap.cpp, rulesets/MemMap.h,
	  rulesets/Py_Map.cpp: Modify python API so it passes in time
	  to map.update and map.get. Use time elapsed to decide if something
	  is ready for removal. Newly created entities are now less likely
	  to get removed before they are verified.

	* rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/mind/goals/humanoid/mason.py,
	  rulesets/acorn/mind/SkelMind.py, rulesets/mason/mind/SkelMind.py:
	  Update python code to new API.
2004-07-21 23:52:58 +00:00
Al Riddoch
dbc1db5ebc 2004-07-13 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.cpp: Clean up a special case for TO="all" on
	  ops, which we now disallow. Remove a verbose tests for NULL
	  pointers in the world dictionary and replace with a simple assert.
2004-07-13 01:37:00 +00:00
Kai Blin
d727a89d62 2004-07-05 Kai Blin
Made the fir edible for deer and the deer browse on the firs.
2004-07-05 21:50:49 +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
e2de50c8ef 2004-06-20 Al Riddoch <alriddoch@zepler.org>
* rulesets/World.cpp, rulesets/World.h: Add accessor to get height
	  at a particular point.

	* server/Account.cpp: Remove redundant check on new character
	  location.

	* common/BaseWorld.h, server/WorldRouter.cpp, server/WorldRouter.h,
	  rulesets/Thing.cpp: Add new function for correcting height
	  of entities to ground level, and use it whenever new entities
	  are created, or whenever an entity moves.
2004-06-20 22:58:18 +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
ce51e589ec 2004-05-16 Al Riddoch <alriddoch@zepler.org>
* rulesets/BaseMind.cpp: Re-order the way ops are handled to avoid
	  re-adding deleted entities to memory.

	* Fix greet goals so it works more immediatly.

	* Add a quick client function for populating the world with a minimal
	  test case for AI memory.
2004-05-17 21:52:26 +00:00