Commit graph

61 commits

Author SHA1 Message Date
Alistair Riddoch
9ebfefbea4 Modify interface to installFactory is available 2013-02-22 09:57:10 +00:00
Alistair Riddoch
5eceba40cf Remove unused handler mechanism 2013-02-14 10:01:20 +00:00
Alistair Riddoch
3d6f39cdee Modify Property install method to take name
This change also switches DecaysProperty to using delegates as a proof of
concept.
2013-02-13 00:45:36 +00:00
Alistair Riddoch
f15e945b62 Convert ExternalMind to use the base class 2013-01-18 19:21:46 +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
4e66987bad Consolidate flags into one place 2013-01-14 09:59:54 +00:00
Alistair Riddoch
1bbb936555 Fill in copy methods on remaining properties 2013-01-08 00:19:23 +00:00
Alistair Riddoch
72c956d4b4 First pass at copy method for all property classes 2013-01-07 23:03:25 +00:00
Alistair Riddoch
508a98bb49 Add an operation method to Property interface 2013-01-03 23:17:51 +00:00
Alistair Riddoch
3f943ec8bc Add checks that a move op is generated 2012-12-12 00:07:26 +00:00
Alistair Riddoch
8025fa73eb Ensure stub checks are reset 2012-12-11 22:40:16 +00:00
Alistair Riddoch
0f627d4e71 Rename methods to be more generic. 2012-12-05 09:45:16 +00:00
Alistair Riddoch
ec03a3b546 Remove Thing_parent typedef 2012-12-04 23:48:40 +00:00
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
e748f000cb Add a case if the Character is linked elsewhere 2012-11-27 19:22:41 +00:00
Alistair Riddoch
de12ff0c1e Add explicit test for another case.
This function can be called if the existing link is already in place.
2012-11-27 18:40:27 +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
d9fb87d2e0 Cover SetOperation 2012-09-11 22:53:15 +01:00
Alistair Riddoch
6537e5da79 Break out the TestWorld::addNewEntity method
This allows tests to cover the case where an Entity is created by this
function if necessary
2012-09-06 13:48:40 +01:00
Alistair Riddoch
f593dd13e7 Refactor tasks property to have generic op handling 2012-07-02 23:35:55 -07:00
Alistair Riddoch
f27f4e509e Simplify the Task interface to take any op 2012-07-02 23:19:59 -07:00
Alistair Riddoch
bc001bfe76 Add Get/Info to the IG op dispatch 2012-06-30 01:06:14 -07:00
Alistair Riddoch
66f9a77302 TasksProperty now has it's own unique Task* 2011-12-02 01:55:50 +00:00
Alistair Riddoch
1c82eabc1c Add required stub to test 2011-11-22 21:23:35 +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
a516f55197 Remove TaskScript subclass
This class really wasn't used. Task had pure virtual methods, and TaskScript
was the only subclass
2011-11-03 22:57:46 +00:00
Alistair Riddoch
0c1d689a3e Make Task::irrelevant non-virtual, now nothing overrides it. 2011-11-03 20:57:06 +00:00
Alistair Riddoch
85eebbb5b1 Clean out noScript from the tests 2011-10-13 15:19:18 +01:00
Alistair Riddoch
ac37383d8a Convery all the property get functions 2011-09-29 17:36:26 +01:00
Alistair Riddoch
fa4ae198b1 TypeNode takes a name on construction
One is always required, and it's just bloaty to set separately
2011-09-16 18:30:22 +01:00
Alistair Riddoch
5f785e79c8 Merge branch 'master' into bullet_physics
Conflicts:
	TODO
	configure.ac
2011-05-03 17:13:04 +01:00
Alistair Riddoch
72ea3c70e1 Fix up tests 2011-02-28 00:28:25 +00:00
Alistair Riddoch
5cb0ac6ae5 Force asserts on in all tests. 2011-02-15 09:30:46 +00:00
Alistair Riddoch
9955ed4c00 Merge branch 'master' into bullet_physics
Conflicts:
	TODO
	tests/Makefile.am
2010-09-22 04:40:17 +01:00
Alistair Riddoch
45c5e4f151 Initialise Location.loc in all tests 2010-09-16 05:14:35 +01:00
Alistair Riddoch
158ca108e8 Extend Domain stubs to cover additions to interface. 2010-08-16 00:20:36 +01:00
Alistair Riddoch
de90c4dc39 Isolate Character and Creator unit tests. 2010-04-04 22:49:39 +01:00
Alistair Riddoch
19a263f9c2 Test other users to use non templated IGEntityExerciser 2010-03-31 01:35:57 +01:00
Al Riddoch
4dde75493a 2008-09-08 Al Riddoch <alriddoch@googlemail.com>
* common/inheritance.cpp: Set the instance pointer to null on
	  deletion, so it can be cleanly instanced again.
2008-09-08 11:49:22 +00:00
Al Riddoch
42d9e65a12 2008-01-07 Al Riddoch <alriddoch@googlemail.com>
* Charactertest.cpp, Creatortest.cpp, Planttest.cpp,
	  Stackabletest.cpp, Structuretest.cpp, Thingtest.cpp,
	  Worldtest.cpp: Update tests so they no longer expect the
	  contains property to be set by default.
2008-01-07 14:35:48 +00:00
Al Riddoch
a6cda7cc69 2007-12-31 Al Riddoch <alriddoch@googlemail.com>
* tests/Charactertest.cpp, tests/Creatortest.cpp,
	  tests/Stackabletest.cpp, tests/Structuretest.cpp,
	  tests/Thingtest.cpp, tests/Worldtest.cpp: Add TypeNode.h include.
2007-12-31 18:31:26 +00:00
Al Riddoch
bf266000aa 2007-12-03 Al Riddoch <alriddoch@zepler.org>
* tests/Areatest.cpp, tests/Charactertest.cpp, tests/Creatortest.cpp,
	  tests/Entitytest.cpp, tests/Foodtest.cpp, tests/Linetest.cpp,
	  tests/Planttest.cpp, tests/Stackabletest.cpp, tests/Structuretest.cpp,
	  tests/Thingtest.cpp, tests/Worldtest.cpp: Remove mass from the
	  attribute names assumed in the entity tests.
2007-12-03 23:29:19 +00:00
Al Riddoch
401ca327ca 2007-11-29 Al Riddoch <alriddoch@zepler.org>
* tests/Areatest.cpp, tests/Charactertest.cpp, tests/Creatortest.cpp,
	  tests/Entitytest.cpp, tests/Foodtest.cpp, tests/Linetest.cpp,
	  tests/Planttest.cpp, tests/Stackabletest.cpp,
	  tests/Structuretest.cpp, tests/Thingtest.cpp,
	  tests/Worldtest.cpp: Remove the STATUS and NAME properties
	  from those expected to be on all entities.

	* tests/ThingupdatePropertiestest.cpp: Comment out all the code
	  as it depends on the NAME property being hard coded.
2007-11-29 01:30:04 +00:00
Al Riddoch
12e5d50b5b 2007-11-26 Al Riddoch <alriddoch@zepler.org>
* common/inheritance.cpp, common/inheritance.h: Introduce a type
	  node class as a carrier for all information, including default
	  values for a type.

	* rulesets/Entity.h, rulesets/Entity.cpp, rulesets/Character.cpp:
	  Use a TypeNode pointer rather than a string giving the type
	  of an entity.

	* client/Py_CreatorClient.cpp, rulesets/MemMap.cpp, rulesets/MemMap.h,
	  rulesets/MindFactory.cpp, rulesets/MindFactory.h,
	  rulesets/Py_Mind.cpp, rulesets/Py_Thing.cpp, rulesets/Stackable.cpp,
	  rulesets/World.cpp, server/PersistantThingFactory.h,
	  server/Restorer_impl.h, server/WorldRouter.cpp:
	  Adapt all the code that deals with types. Set the type pointer
	  up correctly in BaseMind.

	* server/EntityFactory.cpp: Initialise the TypeNode pointer on new
	  entities.

	* tests/inheritancetest.cpp: Adapt the test to cope with TypeNode.
2007-11-26 02:57:04 +00:00