Commit graph

437 commits

Author SHA1 Message Date
Alistair Riddoch
16cab73889 Move the character hookup code into Character
It's way more efficient there.
2012-12-04 21:19:34 +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
387de43138 Remove obsolete error message. 2012-11-29 23:06:34 +00:00
Alistair Riddoch
b9f1ed6d9f Avoid a check when it is not required 2012-11-27 23:45:49 +00:00
Alistair Riddoch
442643db48 Report different error if character is linked to something else 2012-11-27 19:22:11 +00:00
Alistair Riddoch
6057d60ff7 Add a return code to (un)linkExternalMind calls 2012-11-27 10:15:45 +00:00
Alistair Riddoch
a1dccd4767 Add a new method to handle unlinked a character 2012-11-26 21:23:33 +00:00
Alistair Riddoch
b8f46401b3 Add Character method to link avatar to client 2012-11-26 00:21:40 +00:00
Alistair Riddoch
b9a2667e35 Change m_externalMind to ExternalMind
This gets rid of the need for dynamic casts, and makes code cleaner.
2012-11-24 16:36:37 +00:00
Alistair Riddoch
50046bc649 Remove useless warning 2012-07-02 23:37:31 -07:00
Alistair Riddoch
c6a9be99de Pass info ops to the task if there is one 2012-07-02 23:36:20 -07:00
Alistair Riddoch
558301a836 Add an Info handler to Character 2012-07-02 20:05:18 -07:00
Alistair Riddoch
8a64641b6d Remove unnecessary conditionals 2012-05-14 15:41:37 +01:00
Alistair Riddoch
68bd0c6e25 Refactor TaskFactory for more flexible activation matching
We can now match the target based on different critea by configuring the
factory to do different checks
2011-12-06 10:07:25 +00:00
Alistair Riddoch
c13ccca0b3 Remove obsolete includes 2011-12-02 03:35:00 +00:00
Alistair Riddoch
7025431b94 Clean up startup logic, and fix error
The code was not previously sending out the Sight(Action) op, as it was
returning after task startup
2011-12-02 03:25:42 +00:00
Alistair Riddoch
111581e56a Remove obsolete m_task in Character
This pointer is made obsolete now that TasksProperty holds it
2011-12-02 02:37:42 +00:00
Alistair Riddoch
6269203f68 Remove reference to m_task 2011-12-02 01:25:13 +00:00
Alistair Riddoch
bdf3de3cd6 Cut down direct use of m_task 2011-11-30 18:52:29 +00:00
Alistair Riddoch
82cde74867 Remove unrequired reference to m_task 2011-11-25 23:39:51 +00:00
Alistair Riddoch
490d812683 Move task stopping into TasksProperty 2011-11-21 11:42:47 +00:00
Alistair Riddoch
8c52d6a1f3 Move tick processing into TasksProperty 2011-11-19 23:19:45 +00:00
Alistair Riddoch
c38a8945dd Move clearTask into TasksProperty 2011-11-18 16:26:24 +00:00
Alistair Riddoch
0a37a97e26 Move startTask functionality into TasksProperty 2011-11-17 10:41:47 +00:00
Alistair Riddoch
63b8d85f7a Ensure tasks get cleaned up on deletion
In two cases tasks were not getting cleaned up. The first was on shutdown
and the second was if the Character deleted while performing a task. The
latte is fixed by hooking into Entity::destroy. The former by decRef()ing
from the destructor
2011-10-03 19:23:55 +01:00
Alistair Riddoch
ac37383d8a Convery all the property get functions 2011-09-29 17:36:26 +01:00
Alistair Riddoch
f752240995 Use WFMath type for spatial calculations 2011-04-27 19:55:52 +01:00
Alistair Riddoch
020a4370fc Process actuate ops in main dispatch, not in mind filter 2010-11-23 16:02:12 +00:00
Alistair Riddoch
85cce5e15e Add Actuate to those ops handled by Character 2010-11-23 14:00:38 +00:00
Alistair Riddoch
0a209b3250 Add a warning check if a task seems to do nothing. 2009-08-12 11:45:05 +01:00
Alistair Riddoch
76558ef3b6 Remove obsolete setTask member function. 2009-07-29 13:03:40 +01:00
Alistair Riddoch
57f3c92477 Use a single updateTask method whenever task data needs to be updated. 2009-07-28 19:04:49 +01:00
Alistair Riddoch
f21b2a597c Initiate combat tasks using startTask(). 2009-07-28 18:41:03 +01:00
Alistair Riddoch
65ff81f59c Replace call to many task related functions to a single call to startTask(). 2009-07-28 18:27:51 +01:00
Alistair Riddoch
70f25af6c8 Add a new unused method which handles all the steps of setting up a task. 2009-07-28 16:53:00 +01:00
Alistair Riddoch
188b6ecc5f Add handler for Use ops, and don't process them in the mind filter. 2009-07-24 20:18:11 +01:00
Alexey Torkhov
75b62e6925 Typo. 2009-07-14 19:33:07 +04:00
Alistair Riddoch
d291124470 Add handlers for thought and goal_info operation handlers. 2009-07-05 19:04:35 +01:00
Alistair Riddoch
45b2904865 Fix a typo in the debug output. 2009-06-29 23:14:55 +01:00
Alistair Riddoch
e336c47821 Add some comments. 2009-06-18 01:17:30 +01:00
Alistair Riddoch
247499f34d Ensure that a TasksProperty is installed whenever tasks are updated. 2009-06-18 01:15:53 +01: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
4d37d77dd7 2008-12-01 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Character.cpp, rulesets/Character.h: Remove an unused flag
	  used to signal a character is dead.
2008-12-07 03:51:06 +00:00
Al Riddoch
233b8bedd2 2008-11-29 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Character.cpp, rulesets/Character.h: Remove all traces
	  of the hard coded statistics property from Character.

	* rulesets/Py_Property.cpp: Don't use Py_StatisticsProperty as the
	  default wrapper for a statistics property because it will no
	  longer work this way.

	* rulesets/Python_API.cpp: Remove the setup for the Statistics
	  wrapper.

	* rulesets/StatisticsProperty.cpp, rulesets/StatisticsProperty.h:
	  Change the footprint of this class so it is no longer hooked
	  into part of the Character class, and instead handles looking
	  up values from the script directly, and owns the script itself.

	* server/ArithmeticFactory.cpp, server/ArithmeticFactory.h,
	  server/EntityFactory.cpp, server/EntityFactory.h,
	  server/PersistantThingFactory.cpp: Remove setup of hard coded
	  statistics property.

	* rulesets/Statistics.h, rulesets/Statistics.cpp,
	  rulesets/Py_Statistics.h, rulesets/Py_Statistics.cpp,
	  rulesets/Makefile.am: Remove clases that are no longer used.
2008-11-29 23:17:38 +00:00
Al Riddoch
065d3873f2 2008-11-24 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Character.cpp: Remove the hard coded property for wielding
	  as it will always be handled dynamically as required.
2008-11-24 15:56:21 +00:00
Al Riddoch
7eec7e2b5f 2008-11-21 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Character.cpp: Use std::strings rather the literals for
	  property names.
2008-11-21 15:53:11 +00:00
Al Riddoch
b8bd2e75e4 2008-11-13 Al Riddoch <alriddoch@googlemail.com>
* rulesets/BaseMind.cpp, rulesets/Character.cpp,
	  rulesets/EntityProperty.cpp, rulesets/Stackable.cpp:
	  Remove a bunch of stray debug output.
2008-11-13 02:33:04 +00:00
Al Riddoch
bdc7c2b12b 2008-11-11 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Character.cpp: Back off a change which was intended
	  to suppress a warning, but did not work.
2008-11-11 00:52:11 +00:00
Al Riddoch
497377be43 2008-11-11 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Character.cpp: Clean up some unused declarations and
	  headers.

	* rulesets/Plant.cpp, rulesets/Thing.cpp: Remove some unused
	  includes.
2008-11-11 00:45:52 +00:00