Commit graph

44 commits

Author SHA1 Message Date
Alistair Riddoch
028af001b6 Move to inheriting from the base template
This removes the need for our own implementations of standard
get/set methods.
2012-01-08 20:39:42 +00:00
Alistair Riddoch
5bc4c91361 Add abstract property for generic terrain functions 2012-01-07 16:32:19 +00:00
Alistair Riddoch
ac37383d8a Convery all the property get functions 2011-09-29 17:36:26 +01:00
Alistair Riddoch
cc04efa00e Fix bug in the terrain mod logic that left pointer uninitialised. 2011-01-11 13:09:23 +00:00
Alistair Riddoch
e97c0fd6df Rename file for TerrainModTranslator to match class name 2011-01-06 19:49:24 +00:00
Alistair Riddoch
7a1c8c9557 Rename InnerTerrainMod to TerrainModTranslator and update docs 2011-01-06 19:01:37 +00:00
Alistair Riddoch
ad1d04bb6c Remove obsolete commented out code. 2010-11-11 17:53:32 +00:00
Alistair Riddoch
fefeec7da8 Remove pos param as we couldn't make effective use of it. 2010-11-11 17:42:12 +00:00
Alistair Riddoch
86039d5f21 Re-write handling of terrain mods now that updating works. 2010-11-11 17:32:53 +00:00
Alistair Riddoch
e5ddb66ffa Move mod type parsing into the class compleiing the encapsulation 2010-11-11 12:00:31 +00:00
Alistair Riddoch
10e5dfca3e Make base constructor public as it's all we need now. 2010-11-10 17:52:01 +00:00
Alistair Riddoch
435420e16e Re-order parsing to make a bit more sense. 2010-11-10 16:11:21 +00:00
Alistair Riddoch
458a327eba Modify the interface of terrain mod helper classses to be independant of cyphesis. 2010-11-03 15:04:17 +00:00
Alistair Riddoch
4fc70bfbe1 Re-write how terrain mod data gets parsed to handle reparsing better 2010-10-28 19:21:53 +01:00
Alistair Riddoch
bf131b2fb7 Add TODO about a memory leak 2010-10-19 19:40:51 +01:00
Alistair Riddoch
bd3c89ed46 Clean up method for adding a terrain mod to be consistently named. 2010-10-05 22:53:52 +01:00
Alistair Riddoch
c36ed43431 Update for the changed mercator API 2010-09-29 16:47:14 +01:00
Alistair Riddoch
94a47009ac Add member functions to allow sub attributes to be changed. 2010-09-18 23:59:30 +01:00
Alistair Riddoch
85087db17e Use terrain mod contexts to store pointer to Entity with mod 2010-09-17 22:00:59 +01:00
Alistair Riddoch
0e31a907d5 Change local variable name for consistency. 2010-09-16 16:19:45 +01:00
Alistair Riddoch
4a4368138c Use using to improve brevity 2010-09-14 22:25:06 +01:00
Alistair Riddoch
73ecfbdf8d No need for InnerTerrainMod to have a ref to the property 2010-09-13 16:31:12 +01:00
Alistair Riddoch
9165ce1cc3 Cleanups, formatting and make accessor inlineable. 2010-09-13 15:36:01 +01:00
Alistair Riddoch
0853f4fd24 Move InnerTerrainMod classes into their own file for isolation 2010-09-13 02:09:26 +01:00
Alistair Riddoch
7131b6a441 Clean up some includes 2010-09-13 00:59:24 +01:00
Alistair Riddoch
3d99223721 Clean up the way terrain property is handled, now we can keep it const. 2010-09-13 00:16:01 +01:00
Alistair Riddoch
82a3f8d789 Refactor out entity mod owner. 2010-09-12 20:40:26 +01:00
Alistair Riddoch
3ece13592a Fix up TerrainModProperty to work more cleanly, and initialize properly. 2010-09-12 20:20:24 +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
27b36b6ad7 Retarded 2009-03-26 01:30:50 +00:00
Alistair Riddoch
8e521d8928 Update all the Ids 2009-03-24 15:09:42 +00:00
Erik Hjortsberg
b126729c94 Removed code which has been replaced by parsePosition. 2009-01-06 21:28:28 +01:00
Erik Hjortsberg
37b30128f1 Updated terrain parsing code to sync with changes in Eris. 2009-01-06 13:33:18 +01:00
Erik Hjortsberg
16f07ca527 Copies terrain mod parsing code from Eris. 2009-01-05 21:04:56 +01:00
Al Riddoch
a80f85e85a 2008-10-01 Al Riddoch <alriddoch@googlemail.com>
* rulesets/LocatedEntity.cpp, rulesets/LocatedEntity.h: Make all the
	  property access functions that should never be used to modify a
	  property const. Remove requirePropertyClass() as it pretty much
	  can't be const.

	* rulesets/Entity.cpp, rulesets/Entity.h: Make overriden
	  getProperty() const as it is in the base class. Add new
	  property access functions for code that needs to modify the
	  properties which ensures class properties never get modified
	  through the Entity interface.

	* rulesets/Character.cpp, rulesets/Plant.cpp, rulesets/Py_Thing.cpp,
	  rulesets/TerrainModProperty.cpp, server/CorePropertyManager.cpp:
	  Change all the code that accesses properties to use the right
	  functions.
2008-10-01 18:20:57 +00:00
Al Riddoch
d57de81925 2008-09-10 Al Riddoch <alriddoch@googlemail.com>
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h,
	  server/CorePropertyManager.cpp: Re-work part of the way
	  terrain mod properties are set up, removing the need for
	  a setup handler, and using install instead.
2008-09-10 14:16:12 +00:00
Al Riddoch
fab8a833ff 2008-09-08 Al Riddoch <alriddoch@googlemail.com>
* rulesets/ActivePropertyFactory_impl.h: Re-work the active property
	  factories so they just pass handler information to the property
	  classes rather than installing it themselves, so the property
	  can now handle installing the handlers each time they are installed
	  on an entity, making class default properties work.

	* client/ClientPropertyManager.cpp, client/ClientPropertyManager.h,
	  common/PropertyFactory.h, common/PropertyFactory_impl.h,
	  common/PropertyManager.h, rulesets/ActivePropertyFactory.h,
	  server/CorePropertyManager.cpp, server/CorePropertyManager.h:
	  Modify the property manager and property factory interfaces so they
	  do not take a pointer to the owner, as this is never required any
	  more.

	* rulesets/Character.cpp, rulesets/Entity.cpp: Modify code that uses
	  property managers to use the new interface.

	* rulesets/SolidProperty.cpp, rulesets/SolidProperty.h: Make use of
	  the bool flag to implement this, preventing it from being tied to
	  having a pointer to the owner at creation time.

	* rulesets/StatusProperty.cpp, rulesets/StatusProperty.h: Remove
	  the need for an owner pointer at construction time by using the
	  apply method.

	* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h:
	  Use new MultiActivePropertyManager and install method to handle
	  installing handlers rather than relying on the factory to do it.

	* server/CorePropertyManager.cpp: Change many of the property
	  factories now that none get get an owner pointer.

	* server/EntityFactory.cpp: Set up default properties on all type
	  nodes when a new class is installed, and don't apply instance
	  properties based on class defaults, relying on class properties.

	* rulesets/Entity.cpp: Remove hard coded BBox property now that the
	  functionality is handled by a more special property.
2008-09-08 00:17:08 +00:00
Al Riddoch
dcc25e8e01 2008-08-18 Tamas Bates <rhymer@gmail.com>
* rulsets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Add a
	  function to easily remove a terrain mod from the terrain.

	* server/CorePropertyManager.cpp: Fix the delete handler for terrain
	  mods to correctly clear them from the terrain when their owning entity
	  is deleted.
2008-08-18 18:59:48 +00:00
Al Riddoch
e9bce650fe 2008-08-17 Tamas Bates <rhymer@gmail.com>
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Fixed
	  an improperly named variable.

2008-08-17  Tamas Bates  <rhymer@gmail.com>

	* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Fixed
	  a logic issue which would have prevented some types of terrain mods
	  from ever being parsed.

2008-08-17  Tamas Bates  <rhymer@gmail.com>

	* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Fixed
	  a number of inconsistent indentations. Avoid passing Point3D objects
	  by value in the terrain modifier parsing functions.
2008-08-17 22:57:20 +00:00
Al Riddoch
5f1c54e60c 2008-08-17 Tamas Bates <rhymer@gmail.com>
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Fix a
	  number of uninitialized variables that were causing warnings. Fix the
	  way that the position of a modifier is retrieved when parsing to avoid
	  copying it to more locations than necessary. Moved the parsing code for
	  specific modifiers into separate functions to make them easier to find
	  and to shorten the main parsing function.
2008-08-17 21:48:22 +00:00
Al Riddoch
e8fd1f757d 2008-08-17 Al Riddoch <alriddoch@googlemail.com>
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h:
	  Avoid passing Point3D objects by value, to make the code faster.
	  Fix a crash in getTerrain(). Clean up for 80 columns, in the
	  header.
2008-08-17 20:35:03 +00:00
Al Riddoch
b2223a6166 2008-08-17 Tamas Bates <rhymer@gmail.com>
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h: Clean
	  up some commented out code. Reorganize TerrainModProperty.h so that
	  methods specific to terrain mods are more easily distinguished from
	  those used by all properties. Change the way the terrain is searched
	  for to avoid iterating through the entire entity tree. Removed the
	  prototype for an unused function named set().
2008-08-17 20:22:39 +00:00
Al Riddoch
8cf9a1f05c 2008-08-17 Tamas Bates <rhymer@gmail.com>
* rulesets/TerrainModProperty.cpp, rulesetes/TerrainModProperty.h: Add
	  a member to store the pointer returned from Terrain::addMod(). Revise
	  set() to use this pointer.

	* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h: Update the
	  API for controlling modifiers to use the pointer returned by
	  Terrain::addMod() when adding or updating modifiers.

	* server/CorePropertyManager.cpp: Update the handler for Move Operations
	  on terrain modifiers so that it correctly uses the new position.
2008-08-17 18:12:09 +00:00
Al Riddoch
ff9edab26c 2008-08-14 Al Riddoch <alriddoch@googlemail.com>
Changes by Tamas Bates  <rhymer@gmail.com>

	* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h: Add an
	  API for controlling modifiers to the terrain.

	* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h:
	  Implement a new property for entities which affect the height
	  of the terrain.

	* server/CorePropertyManager.cpp: Add handlers to deal with
	  operations that manipulate the terrain when a terrain mod
	  property changes.

	* rulesets/mason/define_world.py: Add a test function for
	  terrain modification properties.
2008-08-14 00:03:12 +00:00