The relay mechanism, through the new internal Relay operation, allows
one external client to relay an operation to another external client,
and get the response back.
This can currently only be used by Creator clients. It's main use is for
mind introspection.
These ops are more canonical than trying to fudge it with the
undocumented and unclear "thought" operation.
The "Commune" op is used when asking an entity about its thoughts, while
the "Think" op is used when sending new thoughts.
* common/BaseEntity.cpp, common/custom.cpp, common/inheritance.cpp,
common/inheritance.h, common/op_switch.h, common/types.h,
rulesets/Character.cpp, rulesets/Creator.cpp,
rulesets/PythonThingScript.cpp, server/Account.cpp,
server/Connection.cpp, server/ExternalMind.cpp,
tests/OOGThingtest.cpp, tests/inheritancetest.cpp:
Remove a set of pointless definitions, and use the originals
throughout the code.
* data/basic.xml: Provide entirely data driven definitions for Cut
and Chop ops.
* common/Chop.h, common/Cut.h, common/Makefile.am, common/custom.cpp,
common/operations.cpp, common/types.h, tests/Makefile.am,
tests/Tasktest.cpp, tests/allOperations.h,
tests/inheritancetest.cpp: Remove the hard coded Cut and Chop op
definitions completely from the build.
* data/basic.xml: Strip entity scripts off pickaxe and shovel.
* rulesets/World.h, rulesets/World.cpp: Remove handlers used to
to implement pickaxe and shovel, which are now handled as tasks.
* common/Delve.h, common/Dig.h, common/Mow.h, common/custom.cpp,
common/operations.cpp: Remove a bunch of operations from the build
which were only used to do things in an over simple hard coded way.
* common/BaseEntity.cpp, common/BaseEntity.h, common/custom.cpp,
common/op_switch.h, rulesets/BaseMind.cpp, rulesets/Character.cpp,
rulesets/Character.h, rulesets/Thing.cpp, rulesets/Thing.h,
tests/EntityExerciser.h: Remove the long obsolete Action op from
the core code.
* common/custom.cpp: Add a "task" base class to the inheritance tree.
* server/EntityFactory.h, server/EntityFactory.cpp: Add
functionality to allow task rules to be installed and updated from
an admin client. Improve the error reporting for a number of error
conditions.
* server/Connection.cpp: Correct the copyright dates.
* server/Admin.cpp: Improve error reporting for a number of error
conditions. Remove obsolete commented out code for installing
rules using Set ops, and add error notification when the
admin client attempts to update an op definition. Allow the
admin client to install an op definition.
* common/Pickup.h, common/Drop.h, common/custom.cpp,
common/operations.cpp, common/types.h: Add and install two new
op types for Pickup and Drop.
* rulesets/Thing.cpp: Send sights of Pickup and Drop when characters
perform this actions implicitly with move ops.
* rulesets/Character.cpp: Fix handling of Touch op so it now
returns a Sight(Touch) rather than an Action op to indicate
what has occured.
* common/custom.cpp: Fix inheritance of Attack op to Action.
* TODO: Add a note about optimising the mind operation interface.
* common/BaseEntity.cpp, common/custom.cpp, common/op_switch.h,
common/types.h, rulesets/BaseMind.cpp, rulesets/Character.cpp,
rulesets/Creator.cpp, rulesets/Food.cpp, rulesets/Plant.cpp,
rulesets/Thing.cpp, rulesets/World.cpp, server/Admin.cpp,
server/Admin.cpp: Replace OpNo enumeration with defines for the
integer class numbers. Expand the switch statements used for op
dispatch because runtime extended op definitions don't have a const
number.
* server/EntityFactory.cpp: Re-order installation of ops to ensure
the number registered in enumeration maps is the one returned by
the Atlas factories.
* rulesets/Character.cpp: Improve debug output for op handling when
debug is enabled for this file.
* common/custom.cpp: Remove some operation types only used in
scrypts.
* data/basic.xml, data/mason.xml: Add the operation definitions
into the rule files.
* common/inheritance_impl.h, common/inheritance.h,
common/inheritance.cpp, common/custom.cpp: Get rid of the op
factory feature of inheritance, as its not required.
* server/EntityFactory.cpp: Register op types defined in the
data into the Atlas factory rather than the old inheritance
factory mechanism.
* common/custom.cpp, rulesets/Character.cpp: Ensure all custom op
types are registered with the Atlas factories, and switch
to using it for tool operations.
* common/Add.h, common/Burn.h, common/Chop.h, common/Connect.h,
common/Cut.h, common/Delve.h, common/Dig.h, common/Eat.h,
common/Monitor.h, common/Mow.h, common/Nourish.h, common/Setup.h,
common/Tick.h, common/Unseen.h, common/Update.h,
* common/operations.cpp, scripts/gen_op.py:
Try a new much simpler way of handling custom ops.
* common/CustomOp.cpp, common/CustomOp.h, common/CustomOp_impl.h:
Remove obsolete old template for custom ops.
* common/custom.cpp: Install factories in a different way for all
the custom op types.
* server/Account.cpp, rulesets/Thing.cpp, rulesets/Character.cpp:
Replace asserts with proper checks that arguments are of the
expected type.
* common/custom.cpp: Put ignite op installation back in.
* 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.
* 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.
* data/basic.xml, data/mason.xml: Add objtype to all rules.
Add a rule for ignite operation definition.
* common/custom.cpp: Remove hardcoded ignite operation definition.
* server/EntityFactory.cpp, server/EntityFactory.h: Remove some debug
output. Add new code to allow op_definitions to be installed as
rules.
* common/inheritance.cpp, common/inheritance.h: Return an error code
when a type without parents gets installed, rather than throwing an
exception.
* tests/inheritancetest.cpp: Fix test so it no longer expects an
exception.
* rulesets/mason/world/objects/clothing/Garment.py: Remove some
debug output.
* tools/AdminClient.cpp: Remove hardcoded objtype, depending instead
on objtype from the data file. Fix a bug where the full rule
was not getting uploaded when updating an existing rule.
Improve error reporting when update fails.
* data/mason.xml, rulesets/mason/world/objects/clothing/Garment.py:
Add experimental garment entity for changing the characters
appearance.
* common/custom.cpp: Add wear operation for use with garments.
* 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/mason/world/objects/tools/Trowel.py, data/mason.xml:
Add a rule for a trowel for planting seeds. Add a rule for spider
model.
* common/custom.cpp: Add custom ops for "sow" and "germinate" for
handling seeds.
* 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.
* 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.