* 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.
* 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.
* rulesets/basic/editor.py: Make the default argument of m.make
the type, and name optional.
* rulesets/mason/define_world.py: Swap the type to the default
argument of m.make, and strip the names off most entities.
* 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.
* 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.
* rulesets/basic/world/objects/buildings/House.py,
rulesets/basic/world/objects/buildings/StoneHouse.py,
rulesets/basic/world/objects/buildings/__init__.py,
rulesets/basic/world/objects/elements/Fire.py,
rulesets/basic/world/objects/elements/__init__.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/basic/world/objects/tools/__init__.py:
Remove files that are no longer used from here, and have
been duplicated in the mason ruleset.
* 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.
* rulesets/mason/world/tasks/Logging.py: Implement logging entirely
in the task, instead of relying on functionality in the plant
class.
* rulesets/Py_Quaternion.cpp: Implement rotation method as in the
the wfmath class, as required for Logging.
* rulesets/Plant.cpp: Add an error message if the old plant
functionality gets called.
* rulesets/basic/world/objects/tools/Axe.py: Add an error message
noting that this method should not be called.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* rulesets/Python_API.cpp: Change the entity_new constructor used
by define world scripts so that it takes an optional "pos" argument
rather than the long obsolete "xyz".
* rulesets/mason/define_world.py, rulesets/werewolf/define_world.py:
Modify the most relevant define_world scripts to use the changed API.
* rulesets/basic/mind/goals/common/move.py: Remove a long obsolete
commented out debug line.
* rulesets/Thing.h, rulesets/Thing.cpp, rulesets/Plant.h,
rulesets/Plant.cpp: Remove SetupOperation from Thing
and implement in Plant, as not all entities need a starting
tick, but plants do.
* rulesets/basic/world/objects/elements/Fire.py,
rulesets/mason/world/objects/Weather.py: Add setup_operation
handlers as these scripts require ticks.
* rulesets/BaseMind.cpp, rulesets/MemMap.cpp, rulesets/MemMap.h:
Remove commented out lookId code. Re-write findByLocation to
require a type as well, and use a more efficient search to find
the entities requested.
* rulesets/Py_Map.cpp: Re-write find_by_location wrapper to handle
the extra type argument.
* rulesets/basic/mind/Memory.py: Re-write recall_place so that
type and radius are now required, and make sure all types listed
are checked for.
* rulesets/basic/mind/goals/common/move.py: Check if recall_place
has returned anything at all.
* rulesets/basic/mind/goals/common/misc_goal.py: Clean up defend
goal so it works with new spot_something.
* rulesets/mason/define_world.py: Add goblins.
* client/Py_CreatorClient.cpp, rulesets/Py_Map.cpp,
rulesets/Py_Operation.cpp, rulesets/Py_Oplist.cpp,
rulesets/Py_Point3D.cpp, rulesets/Py_Vector3D.cpp,
rulesets/Py_WorldTime.cpp, rulesets/Python_API.cpp:
Convert functions that take a single argument to use METH_O
and avoid calling PyArg_ParseTuple.
* rulesets/Py_Point3D.cpp, rulesets/Py_Vector3D.cpp,
rulesets/basic/mind/goals/common/move.py: Rename
unit_vector_to_another_vector to unit_vector_to.
* rulesets/Python_API.cpp: Remove C++ implementation of server.dictlist
as its installation was messy, and it serves no purpose being
implemented in C++.
* rulesets/basic/mind/NPCMind.py, rulesets/basic/mind/dictlist.py:
Use python dictlist implementation from original Python version
of cyphesis.
* rulesets/Py_WorldTime.cpp: Extend the type object for python
WorldTime to the format used by more recent python versions,
adding new and init methods as well as flags, and doc string.
* rulesets/Python_API.cpp: Refactor the way the server python
module and its type server.WorldTime are created to be the
preferred way for more recent python versions.
* rulesets/basic/mind/NPCMind.py: Remove explicit WorldTime
member, as there is already one in the C++ base class.
* 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.
* rulesets/basic/mind/goals/common/misc_goal.py: Fix a problem where
an NPC seller would not count all the coins handed over immediatly.
* rulesets/basic/mind/goals/humanoid/transaction.py: Add a FIXME about
a mis-coding using for loops.
* rulesets/basic/mind/goals/humanoid/transaction.py: Tell the seller
how much the pig they have just sold was worth. Only value each
pig rather than continuously re-pricing the same pig.
* rulesets/mason/define_world.py: Fix formatting.
* rulesets/basic/mind/NPCMind.py: Add structure to store things
an NPC has been given.
* rulesets/basic/mind/goals/humanoid/transaction.py: Add new goal
for buying things from a given entity.
* common/const.h: Add a second const for the non-squared default
box size for visibility calculations.
* modules/Location.cpp: Initialise cached box size members with
defaults from consts.
* rulesets/basic/mind/goals/common/move.py: Don't remove focus
knowledge about item just because it has been picked up. This
fixes eating acorns.
* rulesets/basic/mind/goals/common/misc_goal.py: Remove focus knowledge
when something is eaten.
* rulesets/basic/mind/NPCMind.py,
rulesets/basic/world/objects/Thing.py: Move some functionality
from the Thing base class into NPCMind, leaving minimal
functionality in the base class making it suitable as an interface
for all scripts.
* rulesets/Py_BBox.cpp, rulesets/Py_Optime.cpp,
rulesets/Py_Statistics.cpp, rulesets/Py_Thing.cpp: Ensure that
setattr returns an exception if the attribute is not a valid one.
* rulesets/Py_Map.cpp, rulesets/Py_Point3D.cpp,
rulesets/Py_Quaternion.cpp, rulesets/Py_World.cpp,
rulesets/Py_WorldTime.cpp: Remove setattr, as no attributes can
be set on this type.
* rulesets/Py_Mind.cpp, rulesets/Py_Oplist.cpp,
rulesets/Py_Vector3D.cpp: Clean up type structure.
* rulesets/basic/mind/goals/common/move.py: Remove attempt
to set "rotation" attribute on location, as its obsolete
and pointless.
* rulesets/basic/world/objects/Thing.py: Get rid of redundant kw
arg to constructor, move op_dict initialisation to cinit()
and remove base_init completely as its only required to handle
the C++ constructor behavoir which we no longer need.
* rulesets/basic/mind/NPCMind.py: Get rid of redundant args to
to mind, and call cinit to handle connection to C++ core directly
now that base_init is gone.