Commit graph

161 commits

Author SHA1 Message Date
Erik Ogenvik
c4f44bb277 Deregister possessive clients correctly. 2015-05-24 11:25:07 +02:00
Erik Ogenvik
af5c4df216 Send possession requests to the connected account. 2015-05-24 11:25:07 +02:00
Erik Ogenvik
5d11e1cbb8 Store Link instances rather than Router.
Note that I'm still not sure how this is done in a canonical way; I'm
learning as I go along.
2015-05-24 11:25:06 +02:00
Erik Ogenvik
ea3f12b07b Allow clients to register as AI handlers.
This is done by setting the account attribute "possessive" to 1.
2015-05-24 11:25:06 +02:00
Erik Ogenvik
46c4b2c8bf Allow for admins to create any entity in spawns.
This is useful when an admin character want to enter the world near a
common spawn (rather at the default origo).
2014-01-23 22:21:36 +01:00
Erik Ogenvik
d65e47c660 Use "commune" for goal info. 2013-08-22 09:54:46 +02:00
Erik Ogenvik
fb5050e784 Fixed incorrect "return". 2013-08-15 16:22:21 +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
e63b4e9708 Removed old code.
Setting thoughts now happen through Creator.
2013-04-17 21:14:11 +02:00
Erik Ogenvik
4d982173bb Allow admin client to query goals.
This is done in a way similar to how thoughts are queries. A Get op is
sent, containing a Goal_info op. The mind code is then responsible for
composing data about the goals, which is sent back to the client.
2013-04-01 22:18:40 +02:00
Erik Ogenvik
415a977e6c Merge branch 'world_suspend' into authoring_improvements
Conflicts:
	server/Admin.cpp
2013-03-31 21:08:57 +02:00
Erik Ogenvik
c1f96a0fc6 Handle correct thought ops. 2013-02-10 11:47:46 +01:00
Erik Ogenvik
e6cd3bf643 Allow setting of thoughts. 2013-02-10 11:47:46 +01:00
Erik Ogenvik
f18b0c717b Provide ability to ask entities for their thoughts.
This is meant to be used for authoring. It allows admin clients to
inspect and persist the relevant parts of the minds of any NPC.
2013-02-04 20:15:29 +01:00
Alistair Riddoch
32d71ce6b8 Remove unneeded Entity.h 2013-01-18 19:41:16 +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
f920bdb919 Fix up return values for characterError 2012-12-11 08:47:45 +00:00
Alistair Riddoch
52446052a4 Move check to as late as it can be
This check broke the case where an Admin account was forcing the logout of
another admin account in tests
2012-09-18 11:36:31 +01:00
Alistair Riddoch
fa386125cb Return after calling parent method
If this return isn't here, LogoutOperation gets called potentially in a loop
2012-09-18 09:16:31 +01:00
Alistair Riddoch
68494ba520 Use the ruleset global less often, making code more isolated 2012-01-19 19:34:20 +00:00
Alistair Riddoch
9709784a63 Remove now obsolete Connect op handler 2010-12-09 16:10:38 +00:00
Alistair Riddoch
db5d30f8ce Remove obsolete connecting code. 2010-12-09 15:57:33 +00:00
Alistair Riddoch
3e6f99aca0 Add a connection pointer to Juncture, and patch in connect and login code 2010-12-07 15:48:26 +00:00
Alistair Riddoch
6b16973a9e Add code to handle creating new Juncture objects by an admin account 2010-12-06 22:26:31 +00:00
Alistair Riddoch
21086ca150 Refactor Create in Accounts to have a common handler, with a new virtual detail 2010-12-06 00:02:21 +00:00
Alistair Riddoch
b87968537d Converge the create code in account classes 2010-12-05 18:47:04 +00:00
Alistair Riddoch
d5fa9bf68b Simplify the fingerprint of characterError to make it easier to use 2010-12-03 21:57:39 +00:00
Alistair Riddoch
38f87c8657 Reply to connection creation ops with info containing connection data 2010-12-01 13:10:18 +00:00
Alistair Riddoch
306e2c8ebe Remove more debug output 2010-11-30 21:53:53 +00:00
Alistair Riddoch
217459c9ef Always pass in integer ID when creating objects. 2010-11-26 16:07:29 +00:00
Alistair Riddoch
27a0d26f8b Correctly fix up the peer connection so it can be used. 2010-11-24 16:53:37 +00:00
Alistair Riddoch
6234b98b0e Extend admin accounts to create more customised peer connections. 2010-11-24 16:38:17 +00:00
Alistair Riddoch
756f84fb48 Don't report an error server side when a client requests a non-existent object 2009-12-26 17:02:04 +00:00
Alistair Riddoch
99bb31f557 Ensure operation handlers don't crash if they get called when disconnected. 2009-11-18 17:50:01 +00:00
Alistair Riddoch
208f553f04 Move the functionality for loading rule data, and configuring into Ruleset. 2009-08-19 02:47:15 +01:00
Alistair Riddoch
cd1f42c3f9 Rename Inheritance class files to match class name. 2009-03-20 15:31:38 +00:00
Al Riddoch
84c1a94412 Rename files for EntityBuilder from EntityFactory to match the class rename. 2009-03-12 00:50:25 +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
61415545d8 2009-01-28 Al Riddoch <alriddoch@googlemail.com>
* server/CommPeer.h, server/CommPeer.cpp: Re-factor CommPeer to
	  only be used for initiating peer connections.

	* server/Admin.cpp: Use the modified CommPeer constructor.

	* server/CommClient.h, server/CommClient.cpp: Make the connection
	  a pointer rather than a reference, and pass it in during setup.

	* server/CommClientFactory.h, server/CommClientFactory.cpp: Re-factor
	  the commclient factory to take connection type as a template param,
	  and create the client and connection objects separately.

	* server/server.cpp: Use the modified CommClientFactory parameter.

	* server/Makefile.am: Remove the different kinds of client class
	  from the build.
2009-01-28 02:21:29 +00:00
Al Riddoch
40a3bd1018 2008-12-10 Al Riddoch <alriddoch@googlemail.com>
* common/Identified.cpp, common/Identified.h, rulesets/Character.h,
	  rulesets/LocatedEntity.h, server/Account.h, server/Admin.cpp,
	  server/CommClient.cpp, server/CommClient.h, server/Connection.cpp,
	  server/Connection.h, server/ExternalMind.h,
	  server/ExternalProperty.cpp, server/ExternalProperty.h,
	  server/Lobby.h, server/Master.h, server/Peer.h,
	  server/ServerRouting.h, server/SlaveClientConnection.h:
	  Rename IdentifiedRouter to Router as it's the base class
	  for pretty much all routers.
2008-12-10 01:16:37 +00:00
Al Riddoch
adc64c3ced 2008-01-28 Al Riddoch <alriddoch@googlemail.com>
* client/BaseClient.cpp, common/BaseEntity.cpp, common/BaseEntity.h,
	  common/Identified.cpp, common/Identified.h, common/Makefile.am,
	  common/OOGThing.cpp, common/OOGThing.h, common/OperationRouter.cpp,
	  common/OperationRouter.h, rulesets/Character.h, rulesets/Entity.h,
	  rulesets/LocatedEntity.cpp, rulesets/LocatedEntity.h,
	  server/Account.cpp, server/Account.h, server/Admin.cpp,
	  server/CommClient.cpp, server/CommClient.h, server/Connection.cpp,
	  server/Connection.h, server/ExternalMind.cpp, server/ExternalMind.h,
	  server/ExternalProperty.cpp, server/ExternalProperty.h,
	  server/Lobby.cpp, server/Lobby.h, server/Master.cpp, server/Master.h,
	  server/Peer.cpp, server/Peer.h, server/ServerRouting.cpp,
	  server/ServerRouting.h, server/SlaveClientConnection.cpp,
	  server/SlaveClientConnection.h: Factor out the more pointless base
	  classes, in favor of simple interface. Move destroyed signal to
	  Entity, which is the only place it is needed.
2008-01-28 23:48:30 +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
8169e158d2 2008-01-17 Al Riddoch <alriddoch@googlemail.com>
* server/Admin.cpp, server/Connection.cpp, server/Connection.h,
	  server/ServerRouting.cpp, server/ServerRouting.h: Use the much
	  simpler OperationRouter interface when handling routing operations
	  round the server.
2008-01-17 16:42:23 +00:00
Al Riddoch
3a2bc079e9 2007-12-20 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp, server/EntityFactory.h, server/Admin.cpp,
	  server/PersistantThingFactory.cpp, server/WorldRouter.cpp,
	  server/server.cpp: Rename EntityFactory to EntityBuilder, to make
	  it's function clearer.
2007-12-20 19:27:12 +00:00
Al Riddoch
ffdb9e14ab 2007-11-15 Al Riddoch <alriddoch@zepler.org>
* common/AtlasFileLoader.cpp, common/AtlasFileLoader.h: Switch to
	  loading and storing the file using the Atlas Objects Decoder.

	* server/EntityFactory.cpp, server/EntityFactory.h: Switch to using
	  Atlas Objects rather than Messages in most places. Makes much of
	  the code cleaner, and allows storage of richer class data.

	* server/Admin.cpp: Update to match the modified EntityFactory API.
2007-11-15 02:07:04 +00:00
Al Riddoch
87ecdcad4b 2007-07-30 Al Riddoch <alriddoch@zepler.org>
* client/Py_CreatorClient.cpp, common/Database.cpp,
	  common/accountbase.cpp, common/system.cpp, rulesets/Character.cpp,
	  rulesets/Motion.cpp, rulesets/Plant.cpp, rulesets/Py_Location.cpp,
	  rulesets/Py_Mind.cpp, rulesets/Py_Operation.cpp,
	  rulesets/Py_Point3D.cpp, rulesets/Py_Statistics.cpp,
	  rulesets/Py_Task.cpp, rulesets/Py_TerrainProperty.cpp,
	  rulesets/Py_Thing.cpp, rulesets/Py_Vector3D.cpp,
	  rulesets/Py_WorldTime.cpp, rulesets/Python_API.cpp,
	  rulesets/TerrainProperty.cpp, server/Admin.cpp,
	  server/CommServer.cpp, server/Connection.cpp,
	  server/EntityFactory.cpp, server/WorldRouter.cpp,
	  tools/cycmd.cpp, tools/cyconvertrules.cpp, tools/cyctrl.cpp:
	  Remove unnecessary () from conditional expressions, where operator
	  binding is clear.
2007-07-30 18:12:50 +00:00
Al Riddoch
e7d031876e 2007-07-29 Al Riddoch <alriddoch@zepler.org>
* common/log.cpp, common/log.h, common/BaseEntity.cpp,
	  common/BaseEntity.h: Switch to taking a C++ string reference rather
	  than a char *, for the rest of the logging and error related
	  calls.

	* common/Database.cpp, common/log.cpp, common/log.h,
	  rulesets/PythonMindScript.cpp, server/Account.cpp,
	  server/Admin.cpp, server/Connection.cpp, server/Player.cpp,
	  tools/cyisoload.cpp: Convert over to using the new API correctly.
2007-07-29 12:22:58 +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
0f44eff410 2006-12-26 Al Riddoch <alriddoch@zepler.org>
* client/BaseClient.cpp, client/BaseClient.h,
	  client/ClientConnection.cpp, common/AtlasFileLoader.cpp,
	  common/AtlasFileLoader.h, common/BaseEntity.cpp, common/BaseEntity.h,
	  common/Property.h, common/accountbase.cpp, common/accountbase.h,
	  rulesets/ActivePropertyFactory.h,
	  rulesets/ActivePropertyFactory_impl.h, rulesets/Area.cpp,
	  rulesets/Area.h, rulesets/AreaProperty.cpp, rulesets/AreaProperty.h,
	  rulesets/BaseMind.cpp, rulesets/BaseMind.h, server/Account.cpp,
	  server/Admin.cpp, server/Admin.h, server/ArithmeticFactory.h,
	  tests/Makefile.am, tools/AdminClient.cpp, tools/AdminClient.h,
	  tools/cycmd.cpp: Add inline documentation.

	* rulesets/ActivePropertyFactory.h: Use handler function pointer
	  typedef for readability.

	* rulesets/AreaProperty.cpp, rulesets/AreaProperty.h: Fix PropertyBase
	  overriding by adding const to the right methods.
2006-12-26 14:30:42 +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