Commit graph

11 commits

Author SHA1 Message Date
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
72c956d4b4 First pass at copy method for all property classes 2013-01-07 23:03:25 +00:00
Alistair Riddoch
c323854aad Convert C cast to static_cast 2012-05-15 11:23:35 +01:00
Alistair Riddoch
ac37383d8a Convery all the property get functions 2011-09-29 17:36:26 +01:00
Alistair Riddoch
3d094a892f Remove all the cases where value was passed to PropertyBase constructor 2009-05-14 00:20:09 +01: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
46e7161ff1 2008-01-06 Al Riddoch <alriddoch@googlemail.com>
* rulesets/EntityProperty.h, rulesets/EntityProperty.cpp:
	  Refactor so this property is always dynamic, and add an accessor.

	* rulesets/Character.cpp, rulesets/Character.h: Remove the hard
	  coded entity references used for wield tool, and replace with
	  a dynamic property.
2008-01-06 21:17:19 +00:00
Al Riddoch
e147182d47 2006-12-29 Al Riddoch <alriddoch@zepler.org>
* rulesets/EntityProperty.cpp: Modify EntityProperty so it
	  shows its value as an empty ID if it is not set to anything,
	  and clears its reference if it is set to an empty string.

	* rulesets/Character.cpp: Fix the code that handles an empty wield
	  argument, so it clears the wielded entity correctly and efficiently.
2006-12-30 16:45:01 +00:00
Al Riddoch
4471772ce7 2006-12-29 Al Riddoch <alriddoch@zepler.org>
* rulesets/attributes.h, server/Persistor_impl.h,
	  server/Restorer.cpp: Remove right_hand_wield from the
	  persistence layer, pending its complete removal.

	* rulesets/EntityProperty.h, rulesets/EntityProperty.cpp:
	  Make EntityProperty a more normal property by making it hold
	  a reference to its value, not the value itself.

	* rulesets/Character.cpp, rulesets/Character.h: Use EntityProperty
	  for right_hand_wield attribute, so it stores the value long term
	  which I think is more efficient.
2006-12-30 03:55:37 +00:00
Al Riddoch
d52e6f0fb4 2006-12-05 Al Riddoch <alriddoch@zepler.org>
* tests/EntityPropertytest.cpp: Add a complete set of unit tests for
	  EntityProperty.

	* rulesets/EntityProperty.cpp: Fix and instrument the code based
	  on the findings from the unit test.
2006-12-05 06:48:57 +00:00
Al Riddoch
97f4bc108a 2006-12-04 Al Riddoch <alriddoch@zepler.org>
* rulesets/EntityProperty.cpp, rulesets/EntityProperty.h: Add a
	  property class that handles a weak reference to another entity.
2006-12-04 23:06:57 +00:00