Since some properties are class properties without any state we need to
add a "remove" method to call, rather than putting cleanup logic in the
destructor.
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.
* common/Property.h, common/Property_impl.h, common/Property.cpp:
Re-write the core property classes to embed their own data,
rather than refer to it. This makes DynamicProperty obsolete.
* common/Property.h: Add a flag to indicate a properties value
has been changed, but the new value has not been broadcast.
* rulesets/Thing.cpp: Re-write the Update handler to ignore the
operation arguments, and broadcast an update for all properties
marked as unsent.
* rulesets/Character.cpp: Update all code which sent an update
operation so that it sets the flags rather than naming them
in the argument.
* common/Property.h: Add two more flags, one to indicate a property
is stored in the class, and one used to implement boolean
properties very efficiently.
* common/Property.h: Add helper functions to make it easy and clear
to manipulate flags.
* common/Database.cpp, common/Database.h: Expand the entity database
table to include LOC and update sequence number. Implement new
functions that insert test entity data into entity and property
tables.
* rulesets/LocatedEntity.h: Add an accessor providing direct access to
the properties dictionary for persistence.
* server/Persistance.cpp: Remove the bounding box chunk from the
entity table schema.
* server/StorageManager.cpp: Implement inserting and updating rows
into the Entity and Propertiy tables.
* common/Property.h: Make property flags writable so they can be
used for more versatile things. Add constants defining some flags
and masks.
* tests/Propertytest.cpp: Add assertions to ensure the flags and
masks work as intended.
* common/Property.h, common/Property.cpp: Add a soft property class,
which can take values of any type.
* rulesets/Entity.cpp: Use soft property for any values for which
there is no assigned property factory, and avoid using raw atlas
attributes completely.
* 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.
* Doxyfile: Add tools to the documented code.
* index.dox: Update documentation index.
* tools/cycmd.cpp: Add a document page for this tool.
* common/DynamicProperty.h, common/Property.cpp, common/Property.h,
rulesets/AreaProperty.h, rulesets/CalendarProperty.h,
rulesets/EntityProperty.h, rulesets/LineProperty.h,
rulesets/StatisticsProperty.h, rulesets/TerrainProperty.h:
Add all property classes into a property group.
* configure.ac: Increment version.
* common/const.h: Declare a doxygen group for all the consts.
* common/operations.cpp, common/Add.h, common/Attack.h, common/Burn.h,
common/Chop.h, common/Connect.h, common/Cut.h, common/Delve.h,
common/Dig.h, common/Drop.h, common/Eat.h, common/Monitor.h,
common/Mow.h, common/Nourish.h, common/Pickup.h, common/Setup.h,
common/Tick.h, common/Unseen.h, common/Update.h:
Declare a doxygen group for all custom operations.
* rulesets/Area.h, rulesets/Character.h, rulesets/Creator.h,
rulesets/Entity.h, rulesets/Food.h, rulesets/Line.h,
rulesets/Missile.h, rulesets/Plant.h, rulesets/Stackable.h,
rulesets/Structure.h, rulesets/World.h: Declare a doxygen group
for in game entity classses.
* common/Property.h, common/Property_impl.h, server/ScriptFactory.cpp,
server/ScriptFactory.h, server/SlaveClientConnection.cpp,
server/SlaveClientConnection.h: Add some more inlined documentation.
* common/Property.h, common/Property_impl.h,
rulesets/AreaProperty.cpp, rulesets/AreaProperty.h,
rulesets/CalendarProperty.cpp, rulesets/CalendarProperty.h,
rulesets/Entity.cpp, rulesets/EntityProperties.cpp,
rulesets/LineProperty.cpp, rulesets/LineProperty.h,
rulesets/Py_Thing.cpp, rulesets/StatisticsProperty.cpp,
rulesets/StatisticsProperty.h, rulesets/TerrainProperty.cpp,
rulesets/TerrainProperty.h: Change return value of Property::get
to bool, and use it to indicate if the property has a value.
* common/BaseEntity.h, common/BaseWorld.h, common/Property.h,
modules/Location.h, rulesets/Entity.cpp, rulesets/Entity.h,
server/Account.cpp, server/Account.h, server/Admin.cpp,
server/Admin.h, server/Connection.cpp, server/Connection.h,
server/Persistor.cpp, server/Persistor.h, server/Persistor_impl.h,
tools/cycmd.cpp: Update usage of sigc++ to the native 2.0 API
rather than the deprecated compatability API. Eleminate the
manual disconnection code for deleted objects, as this is now
handled automatically by sigc::trackable.
* modules/Location.h, modules/Location.cpp: Add methods to modify
bbox, and to report if it has been modifed so that cached values
can be computed.
* common/Property.h, common/Property_impl.h: Add a new type of
Property which emits a signal when modified.
* rulesets/EntityProperties.cpp, rulesets/Entity.cpp: Implement
signal Property and use it for bbox, so linking its signal
to Location so that the necessary values can be computed after
modification.
* common/OOGThing.cpp, common/Property.cpp, common/Property.h,
common/Property_impl.h, common/inheritance.h, common/operations.cpp,
rulesets/World.cpp: Update some comments.
* rulesets/Task.h, rulesets/Task.cpp, tests/Tasktest.cpp,
rulesets/Fell.h, rulesets/Fell.cpp: New Task interface for
tasks which take a while to complete. Sample implentation provided
in the form of a Fell task for felling trees.
* rulesets/Character.cpp, rulesets/Character.h: Try out Task
implementation with Fell.
* common/Property.h, rulesets/Thing.cpp: Clean up some comments.
* rulesets/EntityProperties.cpp: Remove specialisation of
ImmutableProperty::set for EntitySet, as its the same as the
default.
* rulesets/Script.h: Update the copyright date, and clean up some
comments.
* rulesets/Container.cpp, rulesets/Container.h,
tests/Containertest.cpp: New virtualised classes for handling
entity containership, with API that mimics STL set. To be used to
allow entities to handle containership differently.
* rulesets/EntityProperties.cpp: Add specialisation of
ImmutableProperty for Container class.
* common/Property.cpp, common/Property.h, common/Property_impl.h:
Add a default add() method to the Property base class, as its
often the same in derived classes.
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h:
Remove add() method, as its now covered by the default in
the base class.
* rulesets/Entity.cpp: Fix for loop not to create temporary for
end() on every iteration.
* common/Property.cpp, common/Property.h, common/Property_impl.h:
Add new ImmutableProperty for properties that cannot be
modified, and hold a const reference.
* rulesets/EntityProperties.cpp: Add some specialisations of
Property to handle attributes of Entity.
* rulesets/LineProperty.h, rulesets/LineProperty.cpp:
Property class for handling linear list of coordinates.
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h:
Property class for handling Mercator terrain.
* common/Property.cpp, common/Property.h, common/Property_impl.h:
New class to automate and simplify handled of hard coded
proerties.
* tests/Propertytest.cpp: Test for new Property class.