Commit graph

203 commits

Author SHA1 Message Date
Alistair Riddoch
e9cb84388a Stop using OpNo here too 2013-02-28 15:39:59 +00:00
Alistair Riddoch
e89ae282f6 Stop using OpNo typedef 2013-02-28 15:27:54 +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
0f627d4e71 Rename methods to be more generic. 2012-12-05 09:45:16 +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
d463b861af Replace connectAvatar entirely with linkExternalMind 2012-11-26 00:35:55 +00:00
Alistair Riddoch
e7d238e91f Move ExternalMind into rulesets 2012-11-23 16:11:21 +00:00
Alistair Riddoch
bbaa8c3f2a Route Connectable ops through externalOperation 2012-11-19 13:42:03 +00:00
Alistair Riddoch
23ebd9d6f5 Add externalOperation to the Router interface 2012-11-19 13:42:02 +00:00
Alistair Riddoch
6998d59ecd Rename ConnectedRouter to ConnectableRouter
Objects using this base class are all long lived, so while they are
often associated with a connection, they most commonly will outlive
that connection, and be unconnected.
2012-11-13 00:09:05 +00:00
Alistair Riddoch
9002f599e1 Set IDs to the right type
The ids (which are numeric) were being added as integers, but Atlas
uses string representations of numbers.
2012-09-13 15:28:28 +01:00
Alistair Riddoch
f66bc4c7de Add some notes about shortcomings 2012-09-13 12:41:22 +01:00
Alistair Riddoch
e776106ae9 Move CommClient to being a template - final changes
This required cleaning up a bunch of other things:
  Expose functions to disconnect and flush sockets generally
  Make a new base class for objects that link a socket to the server
2012-07-31 20:21:58 +01:00
Alistair Riddoch
e0aa034396 Remove unneeded include 2011-12-20 15:45:53 +00:00
Alistair Riddoch
48e34ce80d Remove mind correctly from avatars 2011-12-16 13:12:58 +00:00
Alistair Riddoch
2c035d0505 Use ConnectedRouter as the base for all accounts 2010-12-13 14:15:54 +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
a311420a12 Remove obsolete check 2010-12-04 15:21:05 +00:00
Alistair Riddoch
45c817708e Remove unneeded dynamic cast. The arg doesn't need to be an entity. 2010-12-03 22:06:03 +00:00
Alistair Riddoch
6aa6599d67 Add logging of teleport related events 2010-11-30 21:38:29 +00:00
Alistair Riddoch
a615c0f80a Remove some code duplication 2010-11-26 22:36:23 +00:00
Manohar Vanga
e16e5c75a2 Added explanatory comments to server/Account.cpp 2010-08-17 11:58:21 +05:30
Manohar Vanga
eb68eac94a Look operation handler now checks only for additional attribute 2010-08-17 11:58:21 +05:30
Manohar Vanga
9318f9a4f9 Fixed removal of teleport authentication entry to include failed connectCharacter calls 2010-08-17 11:58:20 +05:30
Manohar Vanga
ed0965c13f Fixed return values to comply with standard conventions 2010-08-17 11:58:20 +05:30
Manohar Vanga
8dc6054753 Changed attribute name from "key" to "possess_key" 2010-08-17 11:58:20 +05:30
Manohar Vanga
2bd4ea418f Added to Account::LookOperation to add pending teleport characters 2010-08-17 11:58:20 +05:30
Manohar Vanga
bd12f6cb2b Added public function Account::connectCharacter() 2010-08-17 11:58:20 +05:30
Alistair Riddoch
4d68e72b95 Remove obsolete hacked in inventory. 2010-01-03 02:30:57 +00:00
Alistair Riddoch
42c8ce30d2 Remove a bunch of debug output. 2009-12-30 15:23:42 +00:00
Alistair Riddoch
53a611b198 Call the spawn code if one is specified. 2009-12-30 15:11:46 +00:00
Alistair Riddoch
4b64e0391d Add available spawn points to the Account representation. 2009-12-29 19:11:57 +00:00
Alistair Riddoch
3391530725 Add a virtual interface to Account making it responsible for its persistence. 2009-12-01 17:40:21 +00:00
Alistair Riddoch
2b9eeaacca Make username and password protected, and use accessors. 2009-11-24 13:13:54 +00:00
Alistair Riddoch
a7866c404a Ensure none of the operation handlers crash if they get called when disconnected 2009-11-18 17:49:34 +00:00
Alistair Riddoch
40bb3dc65b Add basic filtering of task data passed from client 2009-06-16 15:25:46 +01:00
Alistair Riddoch
27ea787c1f Add detection of client operations that will modify task attributes. 2009-06-16 13:43:50 +01:00
Alistair Riddoch
ffd019a744 Correct the spelling of persistence. 2009-03-24 03:08:45 +00:00
Alistair Riddoch
cd1f42c3f9 Rename Inheritance class files to match class name. 2009-03-20 15:31:38 +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
9fb512e031 2008-11-30 Al Riddoch <alriddoch@googlemail.com>
* server/Account.cpp: Don't give names to items in the default
	  inventory.

	* rulesets/mason/world/objects/buildings/House3.py: Don't give
	  names to the invisible wall objects.
2008-11-30 04:58:18 +00:00
Al Riddoch
e4a641a9c3 2008-09-12 Al Riddoch <alriddoch@googlemail.com>
* server/Account.cpp: Set the mind property to empty on character
	  entities controlled by remote clients.
2008-09-12 14:02:52 +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
ef88f10e33 2008-01-17 Al Riddoch <alriddoch@googlemail.com>
* common/BaseEntity.cpp, common/BaseEntity.h: Remove generic operation
	  routing code.

	* common/op_switch.h: Remove all OOG operations from the standard
	  op switch.

	* rulesets/Entity.cpp, rulesets/Entity.h: Replace generic operation
	  routing with a more specific IG routing implementation.

	* rulesets/BaseMind.cpp: Add a mind specific operation router
	  implementation.

	* server/Account.cpp, server/Account.h: Remove handling of Login,
	  which should never got to Account. Add base handler for Get,
	  as it needs to be overriden in Admin.
2008-01-17 18:54:04 +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
41ce55e11e 2008-01-12 Al Riddoch <alriddoch@googlemail.com>
* common/OperationRouter.cpp, common/OperationRouter.h: Interface
	  class for objects when can handle or route operations.

	* common/BaseEntity.h, common/BaseEntity.cpp: Remove standard
	  implementation of operation handler, forcing class to provide
	  more specific implementations.

	* rulesets/LocatedEntity.h, rulesets/LocatedEntity.cpp: Add an
	  implementation of the OperationRouter interface, suitable for
	  IG operations.

	* server/ServerRouting.h, server/Peer.cpp, server/Peer.h,
	  rulesets/MemEntity.h: Add placeholder OperationRouter
	  implementations.

	* server/Connection.cpp: Update OperationRouter implementation to
	  be better suited.

	* server/Account.cpp, server/Account.h: Implement OperationRouter
	  for accounts.
2008-01-12 18:08:03 +00:00
Al Riddoch
bd3a9e153c 2007-11-28 Al Riddoch <alriddoch@zepler.org>
* client/BaseClient.cpp, client/CharacterClient.cpp,
	  client/CharacterClient.h, client/CreatorClient.cpp,
	  client/CreatorClient.h, rulesets/BaseMind.cpp, rulesets/BaseMind.h,
	  rulesets/Character.cpp, rulesets/Entity.cpp, rulesets/Entity.h,
	  rulesets/MindFactory.cpp, rulesets/MindFactory.h, rulesets/Thing.cpp,
	  rulesets/World.cpp, server/Account.cpp, server/Connection.cpp,
	  server/EntityFactory.cpp, server/Persistor.cpp,
	  server/Persistor_impl.h, server/Restorer_impl.h,
	  server/WorldRouter.cpp: Remove the hard name attribute, now that
	  most entities don't set it.
2007-11-28 20:22:42 +00:00