Commit graph

108 commits

Author SHA1 Message Date
Erik Ogenvik
bd16dc96ea Allow Set operations from the Creator.
We should really disable random Set operations from
Characters though...
2016-01-20 15:34:48 +01:00
Erik Ogenvik
33fe1cee3e Override sight checks when searching by name. 2015-04-16 22:28:53 +02:00
Erik Ogenvik
3456d3f30a Return Unseen if Sight fails.
This should fix an issue with flushing not working, as well as making
the protocol work in a more stringent manner.
2015-04-15 23:07:28 +02:00
Erik Ogenvik
610a3a5f91 Make creators always perceptive. 2014-09-10 21:49:19 +02:00
Erik Ogenvik
3b295ca0a1 Added concept of a default entity.
Instead of the root entity always being the default one (for new
entities being created etc.) we now can specify another entity which is
the default one.
2014-08-27 22:17:09 +02:00
Erik Ogenvik
a6c4f7927c Fix issue with world internal refno sent to client
When an Update op is generated it will contain a refno as generated by
the server.
However, when connected as a Creator client _all_ operations sent to the
entity will also be sent to the mind. The Update ops will thus collide
with the serialno/refno pairs as created by the client. To avoid this we
need to remove the refno.
Perhaps Update should use something else than refno/serialno for
matching?
2013-09-05 00:05:39 +02:00
Erik Ogenvik
2c2ac52f54 Enable relayed ops for all entities.
When a relayed op is sent to an entity it's handled like any other
operation. As a relayed response a Sight of the original operation is
sent back.
2013-09-03 14:09:13 +02:00
Erik Ogenvik
a0227fa1de Set relay timeout to five seconds.
That ought to be enough.
2013-08-21 20:55:14 +02:00
Erik Ogenvik
cb238bd5b3 Added a relay mechanism for operations.
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.
2013-08-16 00:03:09 +02:00
Olek Wojnar
7f9ff2246d Remove CVS $Id tags
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Erik Ogenvik
9c19758bf0 Set transient property rather than just flag.
This way external clients can see that the creator is transient, and
exlude it from any exports.
2013-04-23 22:38:31 +02:00
Erik Ogenvik
73f43184cf Mark creators as transient.
Instead of just setting the epheremal flag. That way they can be ignored
when the world is exported.
2013-04-23 22:19:02 +02:00
Alistair Riddoch
e9cb84388a Stop using OpNo here too 2013-02-28 15:39:59 +00:00
Alistair Riddoch
4a9c7078f7 Refactor to use LocatedEntity as base class
All IG code should use the interface of LocatedEntity when dealing
with any entity, rather than sometimes requiring Entity. Add virtual
functions to the interface where required, and modify all other interfaces
to stop them using Entity. This makes the code way cleaner, and much better
de-coupled.
2013-01-17 10:17:07 +00:00
Alistair Riddoch
6f03a09cc6 Remove Creator_parent typedef 2012-12-04 23:40:54 +00:00
Alistair Riddoch
71cbcdcfc1 Modify externalOperation to include Link
The Link reference provided is the object allowing direct communication
back to the external source of the operation. This allows us to handle
things more cleanly in some cases.
2012-12-04 20:39:35 +00:00
Alistair Riddoch
56173f3ffe Add filterExternalOperation to avoid externalOperation
externalOperation should only be called from code getting operations from
the outside world.
2012-12-03 15:37:40 +00:00
Alistair Riddoch
1decf884a1 Add explicit destructor
Allowing the compiler to create a default destructor confuses gprof, and
causes it to report bad coverage data.
2012-08-06 18:32:01 +01:00
Alistair Riddoch
0d8ccf7fea When creator sends a puppet op, give it an acknowledgement. 2009-12-26 12:52:56 +00:00
Alistair Riddoch
5d2b6d8f81 Add Talk to the set of operations Creator will handle normally. 2009-12-13 16:01:10 +00:00
Al Riddoch
ab54d0fea2 2009-02-02 Al Riddoch <alriddoch@googlemail.com>
* common/Identified.cpp, common/Identified.h:
	  Flatten down the base classes into one called Router.

	* client/CharacterClient.cpp, client/CreatorClient.cpp,
	  rulesets/BaseMind.cpp, rulesets/Character.cpp,
	  rulesets/Creator.cpp, rulesets/Entity.cpp,
	  rulesets/LocatedEntity.cpp, rulesets/MemEntity.cpp,
	  rulesets/Plant.cpp, rulesets/Stackable.cpp,
	  rulesets/Thing.cpp, rulesets/World.cpp,
	  server/Account.cpp, server/Admin.cpp,
	  server/Connection.cpp, server/ExternalMind.cpp,
	  server/Lobby.cpp, server/Master.cpp,
	  server/Peer.cpp, server/Player.cpp,
	  server/ServerRouting.cpp, server/SlaveClientConnection.cpp,
	  server/TrustedConnection.cpp, tests/LocatedEntitytest.cpp,
	  tests/ThingupdatePropertiestest.cpp: Update all the operation
	  routing classes to use the modified base class correctly.
2009-02-02 02:28:45 +00:00
Al Riddoch
50bd1c02b1 2008-12-10 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Creator.h, rulesets/Creator.cpp: Remove the special
	  case for sending to the mind of Creator, as the difference
	  is now handled by ExternalMind itself in a more general way.
2008-12-10 02:26:40 +00:00
Al Riddoch
d40fcb0bd0 2008-12-09 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Creator.cpp: Remove code for removing Creators once
	  they've been disconnected, and simply mark them as ephemeral.

	* server/ExternalMind.h, server/ExternalMind.cpp: Change
	  the external mind so it stores a reference to the character it
	  is the mind for, and stores a pointer to the connection rather
	  than a reference so it can be nulled when the connection is
	  removed on unsubscribed. Implement removing an ephemeral avatar
	  character on disconnection.

	* server/Connection.cpp: Re-work the connection code to deal with
	  a character still having an external mind on connection, and not
	  removing the external mind at disconnection.
2008-12-09 04:07:14 +00:00
Al Riddoch
5fb0638c8c 2008-09-17 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Creator.cpp: Add a short path for the results of an
	  operation from an external mind to be returned to the external
	  mind, removing the need for remote admin clients to become
	  perceptive.
2008-09-17 15:17:25 +00:00
Al Riddoch
351058f34c 2008-09-13 Al Riddoch <alriddoch@googlemail.com>
* data/basic.xml, data/characters.xml, data/mason.xml: Add tick
	  properties to a bunch of entity classes so they no longer need
	  a setup operation to get them going.

	* rulesets/mason/world/objects/Weather.py,
	  rulesets/mason/world/objects/elements/Fire.py,
	  rulesets/mason/world/objects/plants/seeds/Apple.py: Remove setup
	  handlers from a bunch of scripts as it is now handled by
	  properties.

	* data/buildings.xml: Add setup property to entity classes which
	  really need a setup op at startup.

	* client/BaseClient.cpp: Send a look when creating the avatar, so
	  that notifications get back without the need for a special case.

	* common/op_switch.h, rulesets/Creator.cpp, rulesets/Entity.cpp,
	  rulesets/Entity.h, server/WorldRouter.cpp:
	  Remove the setup operation sent to all entities on startup by
	  default. Get rid of some special cases that depended on it.

	* rulesets/InternalProperties.cpp, rulesets/InternalProperties.h:
	  Make the tick property schedule the operation on apply(), and
	  use the property value as the time to schedule it.
2008-09-13 18:02:08 +00:00
Al Riddoch
187ef8fcd9 2008-08-22 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Entity.h: Move entity flags to the top of the header.
	  Replace destroyed and perceptive booleans with flag values,
	  and re-work check methods accordingly.

	* rulesets/Entity.cpp, rulesets/Creator.cpp, rulesets/Character.cpp:
	  Ensure that destroyed and perceptive flags are used correctly.
2008-08-22 03:00:38 +00:00
Al Riddoch
ccf8bebcb0 2008-01-26 Al Riddoch <alriddoch@googlemail.com>
* common/BaseEntity.cpp, common/BaseEntity.h: Remove the code that
	  handle ID, and just inherit from Identified.

	* client/CharacterClient.cpp, client/CreatorClient.cpp,
	  common/OOGThing.cpp, rulesets/BaseMind.cpp, rulesets/Character.cpp,
	  rulesets/Creator.cpp, rulesets/Entity.cpp,
	  rulesets/LocatedEntity.cpp, rulesets/MemEntity.cpp,
	  rulesets/Plant.cpp, rulesets/Stackable.cpp, rulesets/Structure.cpp,
	  rulesets/Thing.cpp, rulesets/World.cpp, server/Account.cpp,
	  server/Admin.cpp, server/ExternalMind.cpp, server/Lobby.cpp,
	  server/Peer.cpp, server/Player.cpp, server/ServerRouting.cpp,
	  server/SlaveClientConnection.cpp: Add calls to the virtually
	  inherited Identified constructor as required.
2008-01-26 17:43:20 +00:00
Al Riddoch
b4c79181c5 2008-01-12 Al Riddoch <alriddoch@googlemail.com>
* 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.
2008-01-12 22:41:10 +00:00
Al Riddoch
d460bc593d 2007-11-26 Al Riddoch <alriddoch@zepler.org>
* rulesets/Creator.cpp: Clean up some attribute checks.
2007-11-26 15:06:32 +00:00
Al Riddoch
2069f3dd4c 2007-07-29 Al Riddoch <alriddoch@zepler.org>
* common/log.cpp, common/log.h: Switch to taking a C++ string reference
	  rather than a char *, as it is not really an optimisation, and it
	  makes the code simpler to read and write.

	* client/BaseClient.cpp, client/ClientConnection.cpp,
	  common/AtlasFileLoader.cpp, common/BaseEntity.cpp,
	  common/Database.cpp, common/globals.cpp, common/id.cpp,
	  common/inheritance.cpp, common/log.cpp, common/log.h,
	  rulesets/Character.cpp, rulesets/Creator.cpp, rulesets/Entity.cpp,
	  rulesets/MemMap.cpp, rulesets/Motion.cpp, rulesets/Pedestrian.cpp,
	  rulesets/Py_Object.cpp, rulesets/Py_RootEntity.cpp,
	  rulesets/PythonMindScript.cpp, rulesets/PythonThingScript.cpp,
	  rulesets/Python_API.cpp, rulesets/Thing.cpp, server/Account.cpp,
	  server/Admin.cpp, server/ArithmeticFactory.cpp,
	  server/CommClient.cpp, server/CommListener.cpp,
	  server/CommMDNSPublisher.cpp, server/CommServer.cpp,
	  server/Connection.cpp, server/EntityFactory.cpp,
	  server/Persistance.cpp, server/Restoration.cpp,
	  server/ScriptFactory.cpp, server/TaskFactory.cpp,
	  server/WorldRouter.cpp, server/server.cpp: Convert over to using
	  new API correctly.

	* data/mason.xml: Add biomass and transient to fircone, making its
	  script obsolete:
2007-07-29 03:33:33 +00:00
Al Riddoch
23851b3fd0 2007-01-01 Al Riddoch <alriddoch@zepler.org>
* rulesets/Character.cpp, rulesets/Creator.cpp, rulesets/Entity.cpp,
	  rulesets/Entity.h, rulesets/Pedestrian.cpp, rulesets/Py_Thing.cpp,
	  rulesets/Stackable.cpp, rulesets/Thing.cpp, rulesets/World.cpp:
	  Remove m_world member variable from all Entity classes, and
	  access the world manager object as a singleton.
2007-01-01 17:57:06 +00:00
Al Riddoch
9a56dac06c 2006-10-26 Al Riddoch <alriddoch@zepler.org>
* Add RCS Id keywords to every file, for better version tracking.
2006-10-26 00:48:00 +00:00
Al Riddoch
d9962b3bd0 2006-07-11 Al Riddoch <alriddoch@zepler.org>
* common/BaseEntity.cpp, common/BaseEntity.h: Remove opEnumerate
	  method as its now a trivila call to another method.

	* rulesets/BaseMind.cpp, rulesets/Character.cpp, rulesets/Creator.cpp:
	  Replace calls to opEnumerate with direct calls to getClassNo().
2006-07-11 14:24:26 +00:00
Al Riddoch
d8b6d32803 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* rulesets/Creator.cpp, server/WorldRouter.cpp,
	  server/WorldRouter.h: Remove obsolete code to handle omnipresent
	  entities.

	* common/const.h: Remove obsolete flag enabling omnipresent
	  entities.

	* tests/consttest.cpp: Remove test for omnipresent flag.
2006-07-08 21:05:34 +00:00
Al Riddoch
07da807b3b 2006-06-06 Al Riddoch <alriddoch@zepler.org>
* common/BaseEntity.cpp, rulesets/Character.cpp, rulesets/Creator.cpp,
	  server/Account.cpp, server/Admin.cpp, server/Connection.cpp,
	  server/Lobby.cpp, server/WorldRouter.cpp: Don't bother with serial
	  numbers on ops generated inside the server. They just leak and upset
	  clients.
2006-06-07 00:13:39 +00:00
Al Riddoch
7b9625335e 2006-06-06 Al Riddoch <alriddoch@zepler.org>
* rulesets/Entity.cpp, rulesets/Creator.cpp, common/BaseEntity.cpp:
	  Catch the last few places, and ensure refno is only set if
	  serialno is set on the causing op.
2006-06-07 00:02:05 +00:00
Al Riddoch
5f9ea66bcc 2006-05-18 Al Riddoch <alriddoch@zepler.org>
* common/BaseWorld.h, rulesets/Creator.cpp, rulesets/World.cpp,
	  server/WorldRouter.cpp, server/WorldRouter.h, tests/TestWorld.h:
	  Pass perceptive entities to the world by pointer rather than
	  by ID, avoiding a lookup in the dictionary.
2006-05-18 01:43:09 +00:00
Al Riddoch
9ae6210282 2006-05-15 Al Riddoch <alriddoch@zepler.org>
* rulesets/Creator.cpp: Send an unseen op if admin attempts to
	  puppet something that does not exist. Add some comments and
	  a FIXME.

	* TODO: Add a note about the lack of crossover between ops used
	  by OOG code and IG code.
2006-05-15 01:31:13 +00:00
Al Riddoch
fac57eee73 2006-01-19 Al Riddoch <alriddoch@zepler.org>
* aiclient/ClientAccount.cpp, aiclient/ClientAccount.h,
	  aiclient/ClientConnection.cpp, aiclient/ClientConnection.h,
	  aiclient/client.cpp, aiclient/client.h, client/BaseClient.cpp,
	  client/BaseClient.h, client/CharacterClient.cpp,
	  client/CharacterClient.h, client/ClientConnection.cpp,
	  client/ClientConnection.h, client/CreatorClient.cpp,
	  client/CreatorClient.h, client/ObserverClient.cpp,
	  client/ObserverClient.h, client/Py_CreatorClient.cpp,
	  client/Py_CreatorClient.h, client/client.cpp,
	  client/define_world.cpp, client/define_world.h, common/Add.h,
	  common/Affect.h, common/AtlasFileLoader.cpp,
	  common/AtlasFileLoader.h, common/Attack.h, common/BaseEntity.cpp,
	  common/BaseEntity.h, common/BaseWorld.cpp, common/BaseWorld.h,
	  common/Burn.h, common/Chop.h, common/Connect.h, common/CustomOp.cpp,
	  common/CustomOp.h, common/CustomOp_impl.h, common/Cut.h,
	  common/Database.cpp, common/Database.h, common/Delve.h, common/Dig.h,
	  common/Eat.h, common/FormattedXMLWriter.cpp,
	  common/FormattedXMLWriter.h, common/Generic.h, common/Load.h,
	  common/Monitor.h, common/Mow.h, common/Nourish.h,
	  common/OOGThing.cpp, common/OOGThing.h, common/Property.cpp,
	  common/Property.h, common/Property_impl.h, common/Save.h,
	  common/Setup.h, common/Tick.h, common/Unseen.h, common/Update.h,
	  common/Use.h, common/Wield.h, common/accountbase.cpp,
	  common/accountbase.h, common/const.cpp, common/const.h,
	  common/custom.cpp, common/debug.h, common/globals.cpp,
	  common/globals.h, common/id.cpp, common/id.h, common/inheritance.cpp,
	  common/inheritance.h, common/inheritance_impl.h, common/log.cpp,
	  common/log.h, common/newid.cpp, common/nls.h, common/op_switch.h,
	  common/operations.cpp, common/operations.h, common/random.h,
	  common/refno.h, common/serialno.cpp, common/serialno.h,
	  common/system.cpp, common/system.h, common/terrain_utils.cpp,
	  common/terrain_utils.h, common/type_utils.h, common/types.h,
	  common/utility.cpp, common/utility.h, modules/DateTime.cpp,
	  modules/DateTime.h, modules/Location.cpp, modules/Location.h,
	  modules/WorldTime.cpp, modules/WorldTime.h, physics/BBox.cpp,
	  physics/BBox.h, physics/Collision.cpp, physics/Collision.h,
	  physics/Quaternion.cpp, physics/Quaternion.h, physics/Vector3D.cpp,
	  physics/Vector3D.h, physics/VectorPol.h, rulesets/Area.cpp,
	  rulesets/Area.h, rulesets/AreaProperty.cpp, rulesets/AreaProperty.h,
	  rulesets/ArithmeticScript.cpp, rulesets/ArithmeticScript.h,
	  rulesets/BaseMind.cpp, rulesets/BaseMind.h,
	  rulesets/CalendarProperty.cpp, rulesets/CalendarProperty.h,
	  rulesets/Character.cpp, rulesets/Character.h, rulesets/Combat.cpp,
	  rulesets/Combat.h, rulesets/Container.cpp, rulesets/Container.h,
	  rulesets/Creator.cpp, rulesets/Creator.h, rulesets/Entity.cpp,
	  rulesets/Entity.h, rulesets/EntityProperties.cpp,
	  rulesets/Entity_getLocation.h, rulesets/Fell.cpp, rulesets/Fell.h,
	  rulesets/Food.cpp, rulesets/Food.h, rulesets/Line.cpp,
	  rulesets/Line.h, rulesets/LineProperty.cpp, rulesets/LineProperty.h,
	  rulesets/MemEntity.cpp, rulesets/MemEntity.h, rulesets/MemMap.cpp,
	  rulesets/MemMap.h, rulesets/MemMap_methods.h,
	  rulesets/MindFactory.cpp, rulesets/MindFactory.h, rulesets/Missile.h,
	  rulesets/Motion.cpp, rulesets/Motion.h, rulesets/Movement.cpp,
	  rulesets/Movement.h, rulesets/Pedestrian.cpp, rulesets/Pedestrian.h,
	  rulesets/Plant.cpp, rulesets/Plant.h, rulesets/Py_BBox.cpp,
	  rulesets/Py_BBox.h, rulesets/Py_EntityWrapper.h,
	  rulesets/Py_Location.cpp, rulesets/Py_Location.h,
	  rulesets/Py_Map.cpp, rulesets/Py_Map.h, rulesets/Py_Mind.cpp,
	  rulesets/Py_Mind.h, rulesets/Py_Object.cpp, rulesets/Py_Object.h,
	  rulesets/Py_Operation.cpp, rulesets/Py_Operation.h,
	  rulesets/Py_Oplist.cpp, rulesets/Py_Oplist.h, rulesets/Py_Optime.cpp,
	  rulesets/Py_Optime.h, rulesets/Py_Point3D.cpp, rulesets/Py_Point3D.h,
	  rulesets/Py_Property.cpp, rulesets/Py_Property.h,
	  rulesets/Py_Quaternion.cpp, rulesets/Py_Quaternion.h,
	  rulesets/Py_RootEntity.cpp, rulesets/Py_RootEntity.h,
	  rulesets/Py_Statistics.cpp, rulesets/Py_Statistics.h,
	  rulesets/Py_Task.cpp, rulesets/Py_Task.h, rulesets/Py_Thing.cpp,
	  rulesets/Py_Thing.h, rulesets/Py_Vector3D.cpp,
	  rulesets/Py_Vector3D.h, rulesets/Py_World.cpp, rulesets/Py_World.h,
	  rulesets/Py_WorldTime.cpp, rulesets/Py_WorldTime.h,
	  rulesets/PythonArithmeticScript.cpp,
	  rulesets/PythonArithmeticScript.h, rulesets/PythonMindScript.cpp,
	  rulesets/PythonMindScript.h, rulesets/PythonScript.cpp,
	  rulesets/PythonScript.h, rulesets/PythonThingScript.cpp,
	  rulesets/PythonThingScript.h, rulesets/PythonWrapper.cpp,
	  rulesets/PythonWrapper.h, rulesets/Python_API.cpp,
	  rulesets/Python_API.h, rulesets/Python_Script_Utils.h,
	  rulesets/Script.cpp, rulesets/Script.h, rulesets/Stackable.cpp,
	  rulesets/Stackable.h, rulesets/Statistics.cpp, rulesets/Statistics.h,
	  rulesets/StatisticsProperty.cpp, rulesets/StatisticsProperty.h,
	  rulesets/Structure.cpp, rulesets/Structure.h, rulesets/Task.cpp,
	  rulesets/Task.h, rulesets/TaskScript.cpp, rulesets/TaskScript.h,
	  rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h,
	  rulesets/Thing.cpp, rulesets/Thing.h, rulesets/ThingFactory.cpp,
	  rulesets/ThingFactory.h, rulesets/World.cpp, rulesets/World.h,
	  rulesets/attributes.h, server/Account.cpp, server/Account.h,
	  server/Admin.cpp, server/Admin.h, server/ArithmeticFactory.cpp,
	  server/ArithmeticFactory.h, server/CommClient.cpp,
	  server/CommClient.h, server/CommIdleSocket.cpp,
	  server/CommIdleSocket.h, server/CommListener.cpp,
	  server/CommListener.h, server/CommLocalClient.cpp,
	  server/CommLocalClient.h, server/CommMDNSPublisher.cpp,
	  server/CommMDNSPublisher.h, server/CommMaster.cpp,
	  server/CommMaster.h, server/CommMetaClient.cpp,
	  server/CommMetaClient.h, server/CommPSQLSocket.cpp,
	  server/CommPSQLSocket.h, server/CommPeer.cpp,
	  server/CommPeer.h, server/CommPeerListener.cpp,
	  server/CommPeerListener.h, server/CommRemoteClient.cpp,
	  server/CommRemoteClient.h, server/CommServer.cpp,
	  server/CommServer.h, server/CommSlaveClient.cpp,
	  server/CommSlaveClient.h, server/CommSlaveListener.cpp,
	  server/CommSlaveListener.h, server/CommSocket.cpp,
	  server/CommSocket.h, server/CommUnixListener.cpp,
	  server/CommUnixListener.h, server/Connection.cpp,
	  server/Connection.h, server/Connection_methods.h,
	  server/EntityFactory.cpp, server/EntityFactory.h,
	  server/ExternalMind.cpp, server/ExternalMind.h,
	  server/Idle.cpp, server/Idle.h, server/Lobby.cpp, server/Lobby.h,
	  server/Master.cpp, server/Master.h, server/Peer.cpp, server/Peer.h,
	  server/Persistance.cpp, server/Persistance.h,
	  server/PersistantThingFactory.cpp, server/PersistantThingFactory.h,
	  server/PersistantThingFactory_impl.h, server/Persistor.cpp,
	  server/Persistor.h, server/Persistor_impl.h,
	  server/Player.cpp, server/Player.h, server/Restoration.cpp,
	  server/Restoration.h, server/Restorer.cpp, server/Restorer.h,
	  server/Restorer_impl.h, server/ScriptFactory.cpp,
	  server/ScriptFactory.h, server/ServerRouting.cpp,
	  server/ServerRouting.h, server/ServerRouting_methods.h,
	  server/SlaveClientConnection.cpp, server/SlaveClientConnection.h,
	  server/TaskFactory.cpp, server/TaskFactory.h,
	  server/TrustedConnection.cpp, server/TrustedConnection.h,
	  server/WorldRouter.cpp, server/WorldRouter.h,
	  server/server.cpp, server/server.h, server/slave.cpp,
	  tests/Areatest.cpp, tests/BaseEntitytest.cpp,
	  tests/Charactertest.cpp, tests/Containertest.cpp,
	  tests/Creatortest.cpp, tests/EntityExerciser.h,
	  tests/EntityFactorytest.cpp, tests/Entitytest.cpp,
	  tests/Foodtest.cpp, tests/IGEntityExerciser.h,
	  tests/Linetest.cpp, tests/Locationtest.cpp, tests/OOGThingtest.cpp,
	  tests/Planttest.cpp, tests/Propertytest.cpp, tests/Stackabletest.cpp,
	  tests/Structuretest.cpp, tests/Tasktest.cpp, tests/TestWorld.h,
	  tests/Thingtest.cpp, tests/WorldTimetest.cpp, tests/Worldtest.cpp,
	  tests/allOperations.h, tests/collisiontest.cpp, tests/consttest.cpp,
	  tests/distancetest.cpp, tests/emergencetest.cpp,
	  tests/inheritancetest.cpp, tests/logtest.cpp, tests/randomtest.cpp,
	  tests/systemtest.cpp, tests/transformtest.cpp,
	  tests/type_utilstest.cpp, tests/utilitytest.cpp,
	  tools/AdminClient.cpp, tools/AdminClient.h, tools/cyaddrules.cpp,
	  tools/cycmd.cpp, tools/cyconfig.cpp, tools/cyconvertrules.cpp,
	  tools/cyctrl.cpp, tools/cydbload.cpp, tools/cydumprules.cpp,
	  tools/cyisoload.cpp, tools/cyloadrules.cpp, tools/cypasswd.cpp,
	  tools/cywatchdog.cpp: Replace the copyright and license statements
	  with new versions that include disclaimer of warranty, and
	  permit distribution under later versions of the GPL.
2006-01-19 02:17:06 +00:00
Al Riddoch
f4e38c1c16 2005-12-13 Al Riddoch <alriddoch@zepler.org>
* rulesets/Creator.cpp: When an op is being source routed by an admin
	  client, find its target and insert it into the world using the
	  target so it appears to be from the target, rather than using
	  the "cheat" marker.

	* server/WorldRouter.cpp: Remove check for FROM=="cheat", and
	  simplify setting FROM on ops. Use flags to check for FUTURE_SECONDS.
2005-12-13 14:23:08 +00:00
Al Riddoch
7d02819dc0 2005-11-19 Al Riddoch <alriddoch@zepler.org>
* rulesets/Creator.cpp: Reply to client with Unseen op when client
	  looks for an IG entity by name or type which returns no results.

	* tools/cycmd.cpp: Add a cancel command to stop current running task.
	  Detect Unseen at the end of a flush task, and end the task.
	  Remove a bunch of debug output. Fix typo in add_agent output.
2005-11-19 17:50:08 +00:00
Al Riddoch
192c54dd1e 2005-11-19 Al Riddoch <alriddoch@zepler.org>
* tools/cycmd.cpp: Modify flusher so it uses tick ops to schedule
	  regular queries, until no more are found rather then attempting
	  to purge all entities asap, which caused race conditions. Check
	  the type of entities before deleting them.

	* rulesets/Creator.cpp: Improve debug output. Don't dispatch ops
	  from client to creator locally if the are scheduled to occur
	  in the future.
2005-11-19 12:27:06 +00:00
Al Riddoch
3acfacd1ef 2005-11-17 Al Riddoch <alriddoch@zepler.org>
* rulesets/Creator.cpp: Ensure Look returns nothing when client
	  is searching by name or type, and nothing is found.

	* tools/cycmd.cpp: Add help for some more commands. Ensure help is
	  formatted ok, no matter how long the commands are. Report an
	  error if commands that required an argument don't get one.
	  Ensure find_by_name and find_by_type still work ok if
	  nothing is seen.
2005-11-18 00:03:47 +00:00
Al Riddoch
75e9d3a546 2005-11-10 Al Riddoch <alriddoch@zepler.org>
* common/BaseEntity.h, common/BaseEntity.cpp: Add an integer ID
	  member variable, and accessor, and require it to be initialised
	  along with string ID in constructor.

	* common/const.cpp, common/const.h: Add a const for the integer value
	  of the world ID.

	* rulesets/Area.cpp, rulesets/Area.h, rulesets/BaseMind.cpp,
	  rulesets/BaseMind.h, rulesets/Character.cpp, rulesets/Character.h,
	  rulesets/Creator.cpp, rulesets/Creator.h, rulesets/Entity.cpp,
	  rulesets/Entity.h, rulesets/Food.cpp, rulesets/Food.h,
	  rulesets/Line.cpp, rulesets/Line.h, rulesets/MemEntity.cpp,
	  rulesets/MemEntity.h, rulesets/Plant.cpp, rulesets/Plant.h,
	  rulesets/Stackable.cpp, rulesets/Stackable.h, rulesets/Structure.cpp,
	  rulesets/Structure.h, rulesets/Thing.cpp, rulesets/Thing.h,
	  rulesets/World.cpp, rulesets/World.h: Add integer ID handling to
	  constructors of all in-game entity classes.

	* rulesets/MemMap.cpp: Initialise integer ID of entities in the mind
	  map.

	* rulesets/MindFactory.cpp, rulesets/MindFactory.h: Handle integer
	  ID when constructing mind objects.

	* server/EntityFactory.cpp, server/EntityFactory.h,
	  server/PersistantThingFactory_impl.h: Handle integer
	  ID when contructing entity objects.

	* server/Restoration.cpp, server/Restoration.h, server/Restorer.h,
	  server/Restorer_impl.h: Handle integer ID when restoring from
	  database.

	* server/WorldRouter.cpp: Assign integer ID when constructing the
	  world.
2005-11-11 00:06:48 +00:00
Al Riddoch
8c0a05b40b 2005-11-02 Al Riddoch <alriddoch@zepler.org>
* 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.
2005-11-02 02:06:38 +00:00
Al Riddoch
409060aec3 2005-10-20 Al Riddoch <alriddoch@zepler.org>
* rulesets/Character.cpp, rulesets/Creator.cpp: Modify operations
	  in place rather than copying first in the mind operation interface
	  as this should be much more efficient.
2005-10-20 21:47:51 +00:00
Al Riddoch
f3a20714ec 2005-09-26 Al Riddoch <alriddoch@zepler.org>
* 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.
2005-09-26 00:06:19 +00:00
Al Riddoch
19d808718a 2005-09-12 Al Riddoch <alriddoch@zepler.org>
* configure.ac: Increment version to development 0.5.x series.

	* aiclient/ClientAccount.cpp, client/BaseClient.cpp,
	  client/ClientConnection.cpp, common/BaseEntity.cpp,
	  common/Database.cpp, common/custom.cpp, common/inheritance.cpp,
	  common/operations.h, rulesets/BaseMind.cpp, rulesets/Creator.cpp,
	  rulesets/Food.cpp, rulesets/MemMap.cpp, rulesets/Pedestrian.cpp,
	  rulesets/Py_Operation.cpp, rulesets/Py_RootEntity.cpp,
	  rulesets/Python_API.cpp, rulesets/Stackable.cpp, rulesets/Thing.cpp,
	  rulesets/World.cpp, server/CommClient.cpp, server/Connection.cpp,
	  server/WorldRouter.cpp, tests/inheritancetest.cpp,
	  tools/AdminClient.h, tools/cyaddrules.cpp,
	  tools/cycmd.cpp, tools/cydumprules.cpp,
	  tools/cyloadrules.cpp, tools/cypasswd.cpp:
	  Remove unnecessary using directives.

	* common/utility.cpp, common/utility.h,
	  rulesets/BaseMind.cpp, rulesets/Py_Operation.cpp,
	  server/CommClient.cpp, tools/AdminClient.h, tools/cycmd.cpp:
	  Remove obsolete utility function from the build.

	* common/operations.h: Remove unused obsolete header from the
	  build.
2005-09-12 16:21:18 +00:00
Al Riddoch
fdd316b628 2005-08-27 Al Riddoch <alriddoch@zepler.org>
* Port whole code base to Atlas-C++ 0.6 series. Main server binary
	  now links.
2005-08-27 14:52:12 +00:00
Al Riddoch
3b7b1d413a 2005-04-11 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp, server/Admin.cpp, server/CommClient.cpp,
	  server/Connection.cpp: Don't set refno on unicast OOG ops,
	  instead set them at the interface with the client in one
	  place.

	* server/WorldRouter.cpp: Modify setting refno on IG ops so its
	  now only set on unicast responses.

	* rulesets/Creator.cpp: Set refno on responses direct ops from creator
	  clients more manually.

	* common/BaseEntity.cpp: Only set refno on unicast error ops.

	* common/refno.h: Disable as this file is no longer used.
2005-04-11 21:51:41 +00:00