Commit graph

173 commits

Author SHA1 Message Date
Erik Hjortsberg
b5447f2eb9 Added debug function for getting all knowledge. 2011-10-23 16:04:52 -07:00
Erik Hjortsberg
c90b62d52d Handle punctuation and upper case intial letter.
The interlinguish code couldn't handle sentences starting with upper
case letters, and ending in punctuations.
2011-10-23 16:04:52 -07:00
Alistair Riddoch
29fb2c0922 Formatting tweaking 2011-09-14 16:29:56 +01:00
Alistair Riddoch
bf9e7ebbfe Format tweaking 2011-09-14 16:29:41 +01:00
Alistair Riddoch
87406d39ae Fix up comment spelling and formatting 2011-09-14 16:17:16 +01:00
Erik Ogenvik
361e074954 Address the calling entity when responding. 2011-09-02 23:51:07 +02:00
Erik Ogenvik
c4c4199865 Ignore messages addressed to others.
So far we only perform this check for the "list" and "tell" verbs, but
we should probably apply it to most talk ops.
2011-09-02 23:51:06 +02:00
Amey Parulekar
eab877b245 Corrected bugs in code for detecting presence of hook in fish's inventory 2009-08-03 20:44:40 +05:30
Amey Parulekar
e91e37f004 Amble goal will return if a hook is present inside fish 2009-07-29 00:17:22 +05:30
Amey Parulekar
165055b54e Make school goal return if a hook is present inside fish 2009-07-29 00:15:30 +05:30
Amey Parulekar
f3ede87736 Changed search criteria from type to name in school goal 2009-07-25 00:35:12 +05:30
Amey Parulekar
015c03f4d2 Re-added school and amble goals to interlinguish 2009-07-17 15:24:06 +05:30
Amey Parulekar
c5f8fec6b1 Created a new branch of master and merged all changes into it 2009-07-10 03:15:53 +05:30
Alistair Riddoch
aac6856fa5 Fix check for Point3D in the pig herd goal. 2009-07-07 18:37:12 +01:00
Alistair Riddoch
7a1bc1d3a6 Fix up some goal functionality, but disable it as it currently hogs CPU. 2009-07-07 01:14:10 +01:00
Alistair Riddoch
8533389e8d Update NPCMind to inherit from core wrapper type. 2009-07-01 17:03:24 +01:00
Alistair Riddoch
c2cff84e1f Clean up imports removing deprecated support and obsolete modules. 2009-07-01 14:07:28 +01:00
Alistair Riddoch
084d4a6301 Change a few doc string typos. Thanks Amey. 2009-06-23 15:38:50 +01:00
Alistair Riddoch
531e4f512d Update all scripts to use atlas.Oplist 2009-05-21 16:34:27 +01:00
Alistair Riddoch
24a0887b58 Update all the scripts to import Quaternion from physics 2009-05-20 20:50:26 +01:00
Alistair Riddoch
6679b1b30f Update all Python scripts to import vector and point from physics 2009-05-20 19:34:01 +01:00
Alistair Riddoch
ff3cf9902c Jitter AI ticks so things look more natural 2009-04-21 23:02:14 -07:00
Al Riddoch
f1ffc6ce7f 2009-01-27 Al Riddoch <alriddoch@googlemail.com>
* rulesets/basic/mind/goals/humanoid/mason.py: Fix a potential issue
	  with goals not having full dependencies imported.
2009-01-27 18:17:14 +00:00
Al Riddoch
cb5456a59f 2008-12-07 Al Riddoch <alriddoch@googlemail.com>
* rulesets/basic/mind/NPCMind.py: Remove a few chunks of unused code.
	  Clean up and simplify the logic when dealing with converting plain
	  talk ops into structured interlinguish. Add some doc strings and
	  comments.
2008-12-07 03:54:44 +00:00
Al Riddoch
2a9bfe7f08 2008-10-21 Al Riddoch <alriddoch@googlemail.com>
* rulesets/basic/mind/NPCMind.py: Avoid a tight loop by more
	  fully checking an entity is ready to be added to posessions
	  before trying to add it.
2008-10-21 17:58:25 +00:00
Al Riddoch
9776626954 2008-09-18 Al Riddoch <alriddoch@googlemail.com>
* rulesets/basic/mind/goals/animal/domestic.py,
	  rulesets/basic/mind/goals/animal/herd.py,
	  rulesets/basic/mind/goals/common/misc_goal.py,
	  rulesets/basic/mind/goals/common/trigger.py,
	  rulesets/basic/mind/goals/dynamic/add_unique_goal.py,
	  rulesets/basic/mind/goals/humanoid/construction.py,
	  rulesets/basic/mind/goals/humanoid/fire.py,
	  rulesets/basic/mind/goals/humanoid/mason.py,
	  rulesets/basic/mind/goals/humanoid/transaction.py:
	  Add nominal doc strings to some goal classes.
2008-09-18 00:53:14 +00:00
Al Riddoch
c71d5ef8a5 2008-09-17 Al Riddoch <alriddoch@googlemail.com>
* rulesets/basic/mind/goals/common/move.py: Add nominal doc strings
	  to some goal classes.
2008-09-17 17:46:35 +00:00
Al Riddoch
e5bee108c9 2008-09-17 Al Riddoch <alriddoch@googlemail.com>
* rulesets/basic/mind/goals/common/common.py,
	  rulesets/basic/mind/goals/common/move.py,
	  rulesets/basic/mind/goals/humanoid/build_home.py,
	  rulesets/basic/mind/goals/humanoid/fire.py,
	  rulesets/basic/mind/goals/humanoid/mason.py,
	  rulesets/basic/mind/goals/humanoid/transaction.py:
	  Clean up the way goals are imported so it makes more sense,
	  and doxygen has an easier time with it.
2008-09-17 17:33:30 +00:00
Al Riddoch
fda943df0d 2008-09-17 Al Riddoch <alriddoch@googlemail.com>
* rulesets/basic/mind/NPCMind.py: Add a mechanism to detect when
	  the mind is assigned ownership of something it has not yet seen,
	  and postpone adding it to owned things until later.
2008-09-17 15:14:08 +00:00
Al Riddoch
07d04e99a3 2008-03-28 Al Riddoch <alriddoch@googlemail.com>
* data/devices.xml: Add a second type of operation to the example
	  device.

	* rulesets/Character.cpp: Sort out the fixme so non-default actions
	  can be specified when actuating devices.

	* rulesets/basic/mind/goals/common/misc_goal.py: Clean up the
	  actuation testing goal.
2008-03-28 02:03:09 +00:00
Al Riddoch
6ab0d6753d 2008-03-28 Al Riddoch <alriddoch@googlemail.com>
* rulesets/basic/mind/goals/common/misc_goal.py: Make the checking
	  for a list simpler. Add a test goal for exercising the device
	  activation interface.

	* rulesets/mason/define_world.py: Add client test method to try
	  out the activation goal.
2008-03-28 01:20:29 +00:00
Al Riddoch
0ee685cf25 2008-03-28 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Py_Location.cpp: Implement the repr() method of the
	  Python object protocol for this wrapper, making debugging easier in
	  scripts.
2008-03-28 01:13:26 +00:00
Al Riddoch
6f51647c51 2008-01-04 Al Riddoch <alriddoch@googlemail.com>
* rulesets/basic/mind/NPCMind.py: Clean up some imports, and remove
	  some legacy aliasing.
2008-01-04 23:34:01 +00:00
Al Riddoch
8e9bd398af 2008-01-04 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Python_API.cpp: Remove the server_python flag used to
	  allow scripts to run unmodified on the obsolete python prototype.

	* rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/mind/goals/animal/herd.py,
	  rulesets/basic/mind/goals/common/common.py,
	  rulesets/basic/mind/goals/common/move.py,
	  rulesets/mason/world/objects/buildings/House.py: Remove support
	  for running these scripts on the obsolete python prototype.
2008-01-04 00:45:39 +00:00
Al Riddoch
d4968ffcc2 2007-11-28 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/editor.py: Don't pre-pend the name on sentences
	  sent to program the AIs.

	* rulesets/basic/mind/NPCMind.py: Replace all the places where
	  the name of an entity is taken with a function which checks
	  for the name, but then uses the type if it is not present.

	* rulesets/basic/mind/panlingua/interlinguish.py: Fix the code
	  that strips the name from the beginning of sentences so that
	  it checks first.
2007-11-28 20:51:43 +00:00
Al Riddoch
f557abbe13 2007-11-23 Al Riddoch <alriddoch@zepler.org>
* rulesets/Script.h, rulesets/Script.cpp,
	  rulesets/PythonThingScript.h, rulesets/PythonThingScript.cpp,
	  rulesets/PythonMindScript.h, rulesets/PythonMindScript.cpp:
	  Modify the script interface so it now only handles one operation.

	* rulesets/BaseMind.cpp: Pass in the sub operation only for
	  sight and sound of other operations.

	* rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/mind/goals/humanoid/transaction.py: Adapt the mind
	  and goal code so it only requires one operation.
2007-11-23 16:06:52 +00:00
Al Riddoch
5f691f2291 2007-11-23 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/NPCMind.py: Rename some arguments to make
	  way for some changes to the code.
2007-11-23 11:13:35 +00:00
Al Riddoch
5d1a6541bc 2007-09-22 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/NPCMind.py: Clean up formatting, and make
	  the code more readable.
2007-09-22 15:19:21 +00:00
Al Riddoch
ba57f6e668 2007-09-06 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/panlingua/interlinguish.py: Add the list verb.

	* rulesets/basic/mind/Goal.py: Add a __repr__() method to make it
	  more intuitive to get a text representation of a goal.

	* rulesets/basic/mind/NPCMind.py: Add a handler for the list verb
	  that causes all the matching knowledge to be listed.
2007-09-06 22:17:57 +00:00
Al Riddoch
412e9d6df5 2007-07-06 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/misc_goal.py: Don't use "with"
	  as a variable name as it is about to become a reserved word in
	  Python 2.6.
2007-07-06 00:41:26 +00:00
Al Riddoch
ddfed59ec8 2007-06-19 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Remove the messy import hooks that make
	  inherited rulesets work, but screw up module reloading.

	* rulesets/acorn/mind/SkelMind.py,
	  rulesets/acorn/world/objects/Weather.py,
	  rulesets/acorn/world/objects/animals/Crab.py,
	  rulesets/acorn/world/objects/animals/Deer.py,
	  rulesets/acorn/world/objects/animals/Pig.py,
	  rulesets/acorn/world/objects/animals/Squirrel.py,
	  rulesets/acorn/world/objects/animals/Wolf.py,
	  rulesets/acorn/world/objects/buildings/FarmHouse1.py,
	  rulesets/acorn/world/objects/buildings/FarmHouse2.py,
	  rulesets/acorn/world/objects/buildings/FarmHouse3.py,
	  rulesets/acorn/world/objects/buildings/FarmStand.py,
	  rulesets/acorn/world/objects/buildings/FishShop.py,
	  rulesets/acorn/world/objects/buildings/House1.py,
	  rulesets/acorn/world/objects/buildings/House2.py,
	  rulesets/acorn/world/objects/buildings/House3.py,
	  rulesets/acorn/world/objects/buildings/House4.py,
	  rulesets/acorn/world/objects/buildings/House5.py,
	  rulesets/acorn/world/objects/buildings/Inn1.py,
	  rulesets/acorn/world/objects/buildings/Inn2.py,
	  rulesets/acorn/world/objects/buildings/ItemShop.py,
	  rulesets/acorn/world/objects/buildings/Mansion.py,
	  rulesets/acorn/world/objects/buildings/MetalShop.py,
	  rulesets/acorn/world/objects/buildings/Ruin.py,
	  rulesets/acorn/world/objects/buildings/Shack.py,
	  rulesets/acorn/world/objects/buildings/Stall.py,
	  rulesets/acorn/world/objects/buildings/Sty.py,
	  rulesets/acorn/world/objects/buildings/VacantShop1e.py,
	  rulesets/acorn/world/objects/buildings/VacantShop1w.py,
	  rulesets/acorn/world/objects/buildings/VacantShop2.py,
	  rulesets/acorn/world/objects/outdoor/Campfire.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/acorn/world/objects/tools/Cleaver.py,
	  rulesets/acorn/world/objects/undead/Arm.py,
	  rulesets/acorn/world/objects/undead/Pelvis.py,
	  rulesets/acorn/world/objects/undead/Ribcage.py,
	  rulesets/acorn/world/objects/undead/Shin.py,
	  rulesets/acorn/world/objects/undead/Skull.py,
	  rulesets/acorn/world/objects/undead/Thigh.py,
	  rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/world/objects/Pile.py,
	  rulesets/basic/world/objects/animals/Animal.py,
	  rulesets/basic/world/objects/buildings/House.py,
	  rulesets/basic/world/objects/buildings/StoneHouse.py,
	  rulesets/basic/world/objects/elements/Fire.py,
	  rulesets/basic/world/objects/plants/Tree.py,
	  rulesets/basic/world/objects/tools/Axe.py,
	  rulesets/basic/world/objects/tools/Bow.py,
	  rulesets/basic/world/objects/tools/Pickaxe.py,
	  rulesets/basic/world/objects/tools/Scythe.py,
	  rulesets/basic/world/objects/tools/Shovel.py,
	  rulesets/basic/world/objects/tools/Sword.py,
	  rulesets/mason/world/objects/Pile.py,
	  rulesets/mason/world/objects/Weather.py,
	  rulesets/mason/world/objects/animals/Deer.py,
	  rulesets/mason/world/objects/animals/Pig.py,
	  rulesets/mason/world/objects/buildings/House.py,
	  rulesets/mason/world/objects/buildings/House3.py,
	  rulesets/mason/world/objects/buildings/StoneHouse.py,
	  rulesets/mason/world/objects/clothing/Garment.py,
	  rulesets/mason/world/objects/elements/Fire.py,
	  rulesets/mason/world/objects/outdoor/Campfire.py,
	  rulesets/mason/world/objects/outdoor/Gravestone.py,
	  rulesets/mason/world/objects/plants/Fir.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,
	  rulesets/mason/world/objects/tools/Axe.py,
	  rulesets/mason/world/objects/tools/Bow.py,
	  rulesets/mason/world/objects/tools/Bucksaw.py,
	  rulesets/mason/world/objects/tools/Cleaver.py,
	  rulesets/mason/world/objects/tools/Pickaxe.py,
	  rulesets/mason/world/objects/tools/Rope.py,
	  rulesets/mason/world/objects/tools/Scythe.py,
	  rulesets/mason/world/objects/tools/Shovel.py,
	  rulesets/mason/world/objects/tools/Sword.py,
	  rulesets/mason/world/objects/tools/Tinderbox.py,
	  rulesets/mason/world/objects/tools/Torch.py,
	  rulesets/mason/world/objects/tools/Trowel.py,
	  rulesets/mason/world/objects/undead/Skeleton.py,
	  rulesets/mason/world/tasks/Bisect.py,
	  rulesets/mason/world/tasks/Combat.py,
	  rulesets/mason/world/tasks/Logging.py,
	  rulesets/mason/world/tasks/Raise.py,
	  rulesets/mason/world/tasks/Ram.py,
	  rulesets/mason/world/tasks/Sharpen.py,
	  rulesets/mason/world/tasks/Slice.py,
	  rulesets/mason/define_world.py:
	  Convert rulesets over to inheriting from the Thing class in
	  the new non ruleset specific location.

	* rulesets/basic/mind/goals/animal/domestic.py: Add file missing from
	  previous commit.
2007-06-19 12:36:42 +00:00
Al Riddoch
c4c19a3ca9 2007-06-18 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/trigger.py: Generic common trigger
	  goals, starting with a trigger base chase goal.

	* rulesets/basic/mind/goals/animal/domestic.py: Trigger goals specific
	  to domesticated animals, starting with goals for pig herding.

	* rulesets/basic/mind/goals/__init__.py: Add the two new files of
	  trigger goals.

	* rulesets/mason/mind/PigMind.py, rulesets/mason/mind/SkelMind.py,
	  rulesets/mason/mind/WolfMind.py, rulesets/mason/mind/__init__.py:
	  Remove special mind classes for pig, skeleton and wolf, as it
	  should be possible to do it more cleanly with trigger goals.

	* rulesets/mason/define_world.py: Add trigger goals for pig and
	  skeleton to replace the behavior that used to be in special purpose
	  mind classes.
2007-06-18 17:46:14 +00:00
Al Riddoch
97d966be62 Missed changelog commit 2007-04-29 02:11:25 +00:00
Al Riddoch
127bfd5d92 2007-04-24 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/misc_goal.py,
	  rulesets/basic/mind/goals/common/move.py,
	  rulesets/basic/mind/goals/humanoid/construction.py,
	  rulesets/mason/define_world.py: Fix most goals so they no longer
	  require a reference to the owning mind object on initialisation,
	  meaning they are now more stateless.
2007-04-23 23:42:38 +00:00
Al Riddoch
d43e7f2bb4 2007-04-22 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/move.py: Expire the accompany goal
	  used by mercenaries when the person they are working for no longer
	  exists.
2007-04-22 21:54:00 +00:00
Al Riddoch
05c29a2070 2007-04-08 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/goals/common/misc_goal.py,
	  rulesets/basic/mind/goals/common/move.py,
	  rulesets/basic/mind/goals/humanoid/construction.py:
	  Re-write goals relating to gathering things off the ground
	  to be clearer, more efficient, and to deal with lists of types.

	* rulesets/mason/define_world.py: Use warrior test to test gathering
	  lists of types.
2007-04-08 22:05:39 +00:00
Al Riddoch
23090634f6 2007-03-08 Al Riddoch <alriddoch@zepler.org>
* Makefile.am: Remove GNU echo isms.

	* rulesets/basic/mind/goals/common/move.py: Modify the pick_up_focus()
	  goal so it clears the focus. gather() now gathers things
	  indefinitely.

	* rulesets/mason/define_world.py: Add a test script for warriors to
	  gather stuff.
2007-03-08 14:14:00 +00:00
Al Riddoch
bb9d601cfd 2007-02-18 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/panlingua/interlinguish.py: Add nouns for a
	  number of tools, by Max Randor.

	* rulesets/mason/define_world.py: Make many more tools available for
	  sale, by Max Randor.
2007-02-18 21:59:00 +00:00
Al Riddoch
3bc905142b 2007-01-29 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/panlingua/interlinguish.py: Add some clothing
	  types to the vocabulary.

	* rulesets/mason/define_world.py: Add a tailor stall to the village.
2007-01-29 01:08:04 +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