Commit graph

26 commits

Author SHA1 Message Date
Erik Ogenvik
8ce91c656f Merge remote-tracking branch 'ytaben/entity_filter' 2015-04-18 22:25:27 +02:00
Erik Ogenvik
a9dd40595d Expose data. 2014-09-15 21:11:35 +02:00
Yaroslav Taben
d8b3df6699 Added implementation of OutfitCase and test cases for it
Added accessor for entity in OutfitCase
2014-06-25 14:16:16 -04:00
Erik Ogenvik
67f36ebfbf Present entity references through a map.
This changes any entity references to not present the data as a regular
string. Instead any entity reference is presented as a map, with one
entry named "$eid".
This allows clients to know what values are references to other
entities, and act upon that. This wasn't possible previously when a
simple string was used instead.
Note that those properties that implicitly refer to other entities, i.e.
"contains" and "loc" still use strings. This is because these are known
by the entity as entity referring entities.
2013-11-18 15:40:29 +01: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
e234040300 Disconnect signals when item is removed. 2013-06-15 23:43:28 +02:00
Erik Ogenvik
835b9fadd6 Alter containered signal.
Make it not single shot. And supply the old location, as it was before
the container changed.
This is to make it more useful in general.
2013-06-15 22:53:50 +02:00
Alistair Riddoch
21d23d2a07 Remove unneeded Entity.h include 2013-01-18 19:00:57 +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
72c956d4b4 First pass at copy method for all property classes 2013-01-07 23:03:25 +00:00
Alistair Riddoch
044175f6fc Convert C cast to static_cast 2012-05-15 11:25:05 +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
Alistair Riddoch
665993f638 Update IDs 2009-04-09 12:42:44 +01:00
Al Riddoch
c362fd4e70 2008-01-06 Al Riddoch <alriddoch@googlemail.com>
* rulesets/LocatedEntity.cpp, rulesets/LocatedEntity.h: Add a virtual
	  function that is called when the location of an entity changes.

	* rulesets/Entity.cpp, rulesets/Entity.h: Implement the virtual
	  function called when location changes and use it to call the
	  containered signal. Remove the containered_oneshots list, and
	  make containered inherently one shot only.

	* rulesets/OutfitProperty.cpp: Remove the use of containered_oneshots
	  is this mechanism is obsolete and has been removed.
2008-01-07 00:06:18 +00:00
Al Riddoch
6aa8b71413 2007-01-13 Al Riddoch <alriddoch@zepler.org>
* rulesets/OutfitProperty.cpp: Remove debug output.

	* rulesets/Character.cpp: Remove debug output.
2007-01-13 13:54:24 +00:00
Al Riddoch
b13daa1ac4 2007-01-11 Al Riddoch <alriddoch@zepler.org>
* rulesets/OutfitProperty.cpp: Add the connection to the entities
	  deleted signal to those to be removed when the entity is containered
	  or a garment will be connected to its wearer forever, even after
	  it has been removed.
2007-01-11 20:53:51 +00:00
Al Riddoch
2277287397 2007-01-11 Al Riddoch <alriddoch@zepler.org>
* rulesets/OutfitProperty.h, rulesets/OutfitProperty.cpp: Add
	  arguments to methods, so the owner of this property is available
	  in important parts of the code. Trigger an Update when clothing
	  is removed, so the property change is propagated.

	* rulesets/Character.cpp: Call OutfitProperty with a pointer to
	  the Character, so it knows where to send the update.
2007-01-11 20:36:58 +00:00
Al Riddoch
e25322a3bf 2007-01-05 Al Riddoch <alriddoch@zepler.org>
* rulesets/Entity.h, rulesets/Entity.cpp: Add a mechanism to make
	  signal connection to Entity::containered single shot only.

	* rulesets/OutfitProperty.cpp: Make the connect to garments
	  containered signal single shot, to avoid having to disconnect it.
2007-01-05 17:19:25 +00:00
Al Riddoch
c7e1a0d736 2007-01-05 Al Riddoch <alriddoch@zepler.org>
* rulesets/OutfitProperty.cpp: Remove a FIXME comment fixed in the
	  previous commit.
2007-01-05 03:02:43 +00:00
Al Riddoch
0db8e92e35 2007-01-05 Al Riddoch <alriddoch@zepler.org>
* rulesets/OutfitProperty.cpp, rulesets/OutfitProperty.h:
	  Add a virtual destructor, for strict correctness.

	* rulesets/Entity.cpp: Clean up variable names in destroy().
	  Moving moving contents into LOC on destruction, remove the
	  ref counts to the destroyed entity held by its contents.
	  This means Characters can now get deleted.
2007-01-05 02:58:52 +00:00
Al Riddoch
c55a9f944c 2007-01-05 Al Riddoch <alriddoch@zepler.org>
* rulesets/OutfitProperty.cpp, rulesets/OutfitProperty.h: Make this
	  property sigc++ trackable, and add a method to handle signals
	  indicating that the entity has been removed from the outfit.

	* rulesets/mason/define_world.py: Add a test function for messing
	  with outfit.

	* rulesets/Character.cpp: Make sure the "outfit" property really is
	  an OutfitProperty.
2007-01-05 00:47:21 +00:00
Al Riddoch
2706d34eae 2007-01-03 Al Riddoch <alriddoch@zepler.org>
* rulesets/OutfitProperty.h, rulesets/OutfitProperty.cpp: Ensure that
	  removed garments or equipment get reported as empty IDs, and provide
	  a function to clean them up. Provide a direct function for adding
	  garments, without needing to go through the slower standard interface.

	* rulesets/mason/define_world.py: Add a quick hacked in test garment.

	* rulesets/Character.cpp: Implement adding OUTFIT property on demand,
	  and adding to it anything wielded that has a WORN attribute.
2007-01-03 02:06:50 +00:00
Al Riddoch
d89d57f6e6 2006-12-29 Al Riddoch <alriddoch@zepler.org>
* rulesets/OutfitProperty.cpp, rulesets/OutfitProperty.h:
	  Remove the flags constructor argument, as this type of property
	  doesn't work that way.

	* server/CorePropertyManager.cpp: Add OUTFIT property to the
	  dynamic properties handled by the property manager.
2006-12-29 00:41:18 +00:00
Al Riddoch
650a1b9e51 2006-12-28 Al Riddoch <alriddoch@zepler.org>
* rulesets/GuiseProperty.h, rulesets/GuiseProperty.cpp,
	  rulesets/OutfitProperty.h, rulesets/OutfitProperty.cpp,
	  rulesets/Makefile.am: Rename "guise" to "outfit" as had
	  been agreed quite a while ago on irc, but I forgot. History
	  preserved using cvs repository hackery.
2006-12-29 00:02:31 +00:00
Al Riddoch
bf1e9a5a15 2006-12-27 Al Riddoch <alriddoch@zepler.org>
* rulesets/GuiseProperty.cpp, rulesets/GuiseProperty.h:
	  New property class to handle guise data. I think we had decided
	  to call this property something else, but I can't remember what.

	* common/Property.h, rulesets/EntityProperty.h,
	  rulesets/LineProperty.h: Regularise argument names in property
	  classes, to make checking easier and reduce chance of mimatched
	  overriding.
2006-12-27 00:32:32 +00:00