* rulesets/basic/world/objects/Thing.py: Remove self.attributes
from the base class for all python scripts.
* rulesets/mason/world/objects/Weather.py,
rulesets/basic/world/objects/plants/Tree.py,
rulesets/basic/world/objects/animals/Animal.py,
data/basic.xml, data/mason.xml: Don't use set_kw to handle default
attributes, and add the to the .xml rules files.
* 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/animals/Deer.py,
rulesets/mason/world/objects/animals/Pig.py,
rulesets/mason/world/objects/outdoor/Campfire.py,
rulesets/mason/world/objects/outdoor/Gravestone.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/Cleaver.py,
rulesets/mason/world/objects/undead/Skeleton.py,
rulesets/werewolf/world/objects/characters/Villager.py,
rulesets/werewolf/world/objects/tools/Gallows.py:
Don't import set_kw from misc, as its now obsolete and unused.
* rulesets/basic/mind/NPCMind.py: Add handling for 'about' knowledge
and return it in a way that makes sense to the listener.
* rulesets/mason/define_world.py: Provide NPCs which lots of
information 'about' the world, so they can help players.
* rulesets/basic/mind/NPCMind.py: Don't respond to knowledge
queries if the character has no knowledge.
* server/Connection.cpp, rulesets/Creator.cpp, rulesets/Character.cpp:
Use flag check to see if operations have FROM set, rather than
checking for an empty string.
* rulesets/Thing.cpp: When handling move ops, avoid lookup of LOC
in world unless it has changed.
* rulesets/Character.cpp: Report a warning when action ops are sent
from client or mind code.
* rulesets/Py_Location.cpp: Allow invalid vectors to be used
to set attributes on Location.
* rulesets/acorn/world/objects/undead/Skeleton.py,
rulesets/mason/world/objects/undead/Skeleton.py: Remove action
ops replacing them with setting MODE of skeleton to
collapsed.
* rulesets/basic/mind/NPCMind.py,
rulesets/basic/mind/goals/common/misc_goal.py: Use Imaginary ops
rather than Action for emotes.
* rulesets/basic/mind/NPCMind.py: Fix face() so that NPC doesn't crash
if it turns to face something that is zero distance away.
* server/EntityFactory.cpp: Improve error reporting when an entity
has velocity set at creation, and ensure that the velocity is
unset before the entity goes into the world.
* modules/Location.cpp: Fix a bug where POS was being corrupted
whenever velocity was supposed to be set.
* rulesets/basic/mind/goals/humanoid/mason.py: Convert ID to entity
before checking location.
* rulesets/mason/mind/PigMind.py: Convert ID to entity before
passing location to another function.
* 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.
* rulesets/basic/mind/goals/common/misc_goal.py: Don't return
non-existant ops.
* rulesets/Thing.cpp: Fix some places where root_operations
were being returned.
* common/inheritance.cpp: Add "affect" operation base class,
and fix parents on use and wield.
* common/custom.cpp: Install atlas factories for custom op
types.
* rulesets/basic/mind/goals/common/common.py,
rulesets/basic/mind/goals/common/misc_goal.py,
rulesets/basic/mind/goals/common/move.py,
rulesets/basic/mind/goals/humanoid/build_home.py,
rulesets/basic/world/probability.py,
rulesets/basic/world/objects/plants/Tree.py,
rulesets/mason/define_world.py, rulesets/mason/mind/SkelMind.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/outdoor/Gravestone.py,
rulesets/mason/world/objects/plants/seeds/Seed.py,
rulesets/mason/world/objects/undead/Skeleton.py,
rulesets/werewolf/define_world.py:
Switch to importing random and fall back to deprecated whrandom
on older python versions.
* rulesets/basic/mind/goals/common/misc_goal.py: More changes
to make goals work with new spot_something.
* rulesets/basic/mind/goals/common/move.py: Modify hunt pursuit goal
to fit with spot_something.
* rulesets/basic/mind/goals/humanoid/construction.py: Re-work
goals to use new movement goals, and fix some bugs. Use
right_hand_wield properlly when using tools. Adjust to use
new spot_something goal.
* rulesets/mason/define_world.py: Fix up world initialisation
to setup forage now the constructor args have changed.
* rulesets/basic/mind/goals/common/misc_goal.py: Re-work
spot_something goal to store the entity spotted in Knowledge
rather than it being hacked in as a possession. Re-work many
other goals to work with spot_something, eliminating reference
to mind from constructors where possible.
* rulesets/basic/mind/goals/common/move.py: Break down goals for
picking up things into separate goals for picking up
posessions, and focussed items, and similarly for moving toward
items.
* rulesets/basic/mind/goals/humanoid/construction.py: Add a new
goal for planting seeds.
* rulesets/mason/define_world.py: Add a forester NPC that uses
the plant_seeds goal to plant acorns.
* data/basic.xml: Added operations "disperse" and "extinguish".
Set up "disperse" as the default operation for the pile.
* rulesets/basic/world/objects/Pile.py: The operation "disperse"
will call the "extinguish" operation on the target. Maybe it is
advisable to add an assertion if the target is indeed a fire.
* rulesets/mason/define_world.py: Add peck as a goal for the chicken,
and a test_chicken function.
* rulesets/basic/mind/panlingua/interlinguish.py: Add peck verb.
* rulesets/basic/mind/goals/common/misc_goal.py: Add peck goal.
Chicken will now run around. The actual peck will be added later.
* rulesets/mason/define_world.py: Fix graveyard bbox.
Tweak lych's patrol path so he doesn't run into gravestones.
* rulesets/basic/mind/NPCMind.py: WTF!
* 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.
* 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.
* rulesets/mason/world/objects/tools/Tinderbox.py: Change strength
of initial fire spark to 0.05.
* common/operations.cpp: Fix nourish op, which got broken when mow
was added.
* data/basic.xml: Add a default bbox for lumber, giving it a more
apropriate size.
* rulesets/Py_World.cpp: Add a compare implementation so that
` scripts can check entities to see if they are the world.
* rulesets/basic/world/objects/elements/Fire.py: Tune the
changes which occur in fire as it burns.
* rulesets/mason/world/objects/tools/Rope.py: Correct the syntax
of stub functions.
* rulesets/basic/world/objects/buildings/StoneHouse.py: Fix the import
statements.
* rulesets/basic/world/objects/buildings/House.py: Fix import for
physics module.
* rulesets/basic/mind/goals/common/misc_goal.py: Fix typo in
cut_something.
* server/ScriptFactory.cpp, server/ScriptFactory.h: New factory
class for handling python scripts for entities much more
efficiently, and provide a means where they can be re-imorted
at an apropriate time.
* server/PersistantThingFactory.h,
server/PersistantThingFactory.cpp: Make PersistantThingFactory
copy constructor protected, to ensure its not used accidentally.
Replace strings for storing python script data with a pointer
to a factory for creating scripts.
* server/EntityFactory.cpp: Use the new ScriptFactory mechnism
for creating scripts attached to entities. Improve variable
names a little.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.