* rulesets/Entity.h, rulesets/Entity.cpp: Add a override of
BaseEntities operation() method which handles calling
script operation handlers directly, rather than relying
on the C++ handlers to check for them later.
* rulesets/Character.cpp, rulesets/BaseMind.cpp: Check for script
operation handlers centrally in Character and BaseMind too.
* rulesets/Entity.cpp, rulesets/Thing.cpp, rulesets/Thing.h:
Move Look and Create handlers into Thing from Entity, so Entity is
a more abstract for all IG entities.
* client/ClientPropertyManager.cpp, client/ClientPropertyManager.h:
A new class as a dummy property manager for the client side.
Never creates property objects.
* client/client.cpp: Instantiate the client property manager
during client initialisation.
* server/EntityFactory.cpp: Instatiate the server property manager
during server intialisation.
* common/PropertyManager.h: Add the singletons accessor, and
make the addProperty member return a pointer to the property.
* server/CorePropertyManager.h, server/CorePropertyManager.cpp:
Implement creating properties for server side entity objects.
* rulesets/Entity.cpp: Use the property manager singleton to
create properties if a new attribute is set which is not already
a property, and its also not already a soft attribute.
* rulesets/Entity.cpp, server/Account.cpp, server/Admin.cpp,
server/Connection.cpp, server/EntityFactory.h,
server/Persistor_impl.h, tools/cycmd.cpp:
Switch from using deprecated sigc++ 1.2 headers to the right
sigc++ 2.0 equivalents.
* rulesets/Entity.cpp, rulesets/Creator.cpp, common/BaseEntity.cpp:
Catch the last few places, and ensure refno is only set if
serialno is set on the causing op.
* rulesets/Entity.h, rulesets/Entity.cpp: Add a function to handle
all the changes required when the LOC or container of an entity
changes.
* rulesets/Motion.cpp, rulesets/Thing.cpp: Use changeContainer()
rather than repeating the code in three places.
* 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/Database.cpp, common/newid.cpp, server/server.cpp:
Modify new ID checks so that code still runs when database is
unavailable, and events requiring new IDs fail cleanly.
* server/Connection.cpp: Report a failure to create a player
account if no ID available.
* rulesets/BaseMind.cpp: When processing appearance ops, handle
stamp more efficiently, report an error if ID is missing
from argument.
* server/IdlePSQLConnector.cpp, server/IdlePSQLConnector.h:
Implement re-connecting to the Database if connection is lost.
* rulesets/Character.cpp, rulesets/Entity.cpp, rulesets/Thing.cpp:
Ensure STAMP is present on appearance op args.
* server/CommListener.cpp, server/CommListener.h,
server/CommPeerListener.cpp, server/CommPeerListener.h,
server/CommSlaveListener.cpp, server/CommSlaveListener.h,
server/CommUnixListener.cpp, server/CommUnixListener.h:
Add a return value to method for creating new client socket
objects, and use it to return failure if no ID is available
from the database for a new object.
* rulesets/Py_Point3D.cpp, rulesets/Py_Vector3D.cpp,
rulesets/Python_API.cpp: Add "new" method for class wrappers, and
call the in place constructor from new rather than init. Re-write
internal function for creating new instances so it uses the "new"
method.
* rulesets/Py_Statistics.cpp: Remove some obsolete code inadvertedly
copied from another file. Comment out some unused code to get rid
of a warning.
* server/CommPSQLSocket.cpp: Clear the database connection from
destructor.
* tests/python_class.cpp: A new test for experimenting with new
Python wrappers.
* 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.
* rulesets/World.cpp: Re-write look handling to use existing
addToEntity() to create an atlas representation of the entity
rather than doing most by hand. This ensures that properties
and attributes now work on the world.
* rulesets/Entity.cpp: Ensure that the best use is made of static
attributes on RootEntity.
* rulesets/Script.h, rulesets/Script.cpp: Add a default Script
instance for entities that don't have a script.
* rulesets/Entity.cpp: Assign a pointer to the default script
object in constructor, and check for it when deleting scripts.
* rulesets/Entity.h, rulesets/Entity.cpp: Add getProperty method
which allows the property object of an attribute to be accessed.
* tests/IGEntityExerciser.h, tests/Entitytest.cpp: Add tests for
getProperty() basic functionality.
* rulesets/Entity.cpp: Switch to using SignalProperty for BBOX.
* rulesets/Area.cpp, rulesets/Character.cpp, rulesets/Line.cpp,
rulesets/Plant.cpp, rulesets/Py_Location.cpp:
Update bbox on location using setBBox(), so cached values are
updated.
* 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/BaseEntity.h, common/BaseEntity.cpp: Add an integer ID
member variable, and accessor, and require it to be initialised
along with string ID in constructor.
* common/const.cpp, common/const.h: Add a const for the integer value
of the world ID.
* rulesets/Area.cpp, rulesets/Area.h, rulesets/BaseMind.cpp,
rulesets/BaseMind.h, rulesets/Character.cpp, rulesets/Character.h,
rulesets/Creator.cpp, rulesets/Creator.h, rulesets/Entity.cpp,
rulesets/Entity.h, rulesets/Food.cpp, rulesets/Food.h,
rulesets/Line.cpp, rulesets/Line.h, rulesets/MemEntity.cpp,
rulesets/MemEntity.h, rulesets/Plant.cpp, rulesets/Plant.h,
rulesets/Stackable.cpp, rulesets/Stackable.h, rulesets/Structure.cpp,
rulesets/Structure.h, rulesets/Thing.cpp, rulesets/Thing.h,
rulesets/World.cpp, rulesets/World.h: Add integer ID handling to
constructors of all in-game entity classes.
* rulesets/MemMap.cpp: Initialise integer ID of entities in the mind
map.
* rulesets/MindFactory.cpp, rulesets/MindFactory.h: Handle integer
ID when constructing mind objects.
* server/EntityFactory.cpp, server/EntityFactory.h,
server/PersistantThingFactory_impl.h: Handle integer
ID when contructing entity objects.
* server/Restoration.cpp, server/Restoration.h, server/Restorer.h,
server/Restorer_impl.h: Handle integer ID when restoring from
database.
* server/WorldRouter.cpp: Assign integer ID when constructing the
world.
* rulesets/Character.cpp: Audit all mindFooOperation() methods, to
ensure operations from the mind or client code are handled in
a correct and consistant manner. Improve comments documenting
the mind operation interface.
* rulesets/Entity.cpp: Add comments documenting how externalOperation
should be used.
* modules/Location.cpp, modules/Location.h:
Add const accessors for location data, in preparation for
adding cached collision data which must be updated every
time data is modified.
* physics/Collision.cpp, rulesets/Character.cpp, rulesets/Entity.cpp,
rulesets/Entity.h, rulesets/MemMap.cpp, rulesets/Movement.cpp,
rulesets/Pedestrian.cpp, rulesets/Plant.cpp,
rulesets/Py_Location.cpp, rulesets/Thing.cpp, rulesets/World.cpp,
server/Account.cpp, server/EntityFactory.cpp, server/Persistor.cpp,
server/Persistor_impl.h, server/Restorer_impl.h,
server/WorldRouter.cpp, tests/Locationtest.cpp:
Use the const accessors whenver reading data from Location.
* common/BaseEntity.cpp, common/BaseEntity.h, common/inheritance.cpp,
common/inheritance.h, rulesets/BaseMind.cpp, rulesets/BaseMind.h,
rulesets/Character.cpp, rulesets/Character.h, rulesets/Entity.cpp,
rulesets/Food.cpp, rulesets/Plant.cpp, rulesets/Stackable.cpp,
rulesets/Thing.cpp, rulesets/World.cpp, server/Account.cpp,
server/Admin.cpp, server/Connection.cpp, server/server.cpp:
Remove the subscription mechanism as it is no longer necessary
now that operations have class numbers.
* rulesets/Container.h, rulesets/Container.cpp,
rulesets/EntityProperties.cpp: Implement add(Entity) for common
poperties, and containers.
* rulesets/Entity.cpp: Use add(Entity) instead of get() on properties,
ensuring that unset properties aren't copied. Fixes problem with
bboxes appearing on all entities.
* rulesets/Entity.h, rulesets/Entity.cpp: Add default script
only handler for Attack ops.
* rulesets/Character.cpp: When Attack op comes from mind,
move it on to the target entity.
* client/ClientConnection.cpp: Improve error reporting when
unexpected object arrives from server.
* rulesets/Character.cpp: Invert test so that tool use op arguments
are now set correctly.
* rulesets/Entity.cpp: Use proper entities to handle responses to
Create and Look ops.
* server/Connection.cpp, server/EntityFactory.cpp: Improve error
reporting using String::compose.
* server/EntityFactory.cpp: Invert test so that all custom ops
now don't fail to get installed. Ensure that custom ops that
need to wait for their parent a properly inserted into the
waiting queue.
* rulesets/Entity.cpp: Update copyright date.
* rulesets/BaseMind.cpp, rulesets/Entity_getLocation.h,
rulesets/Entity.h, rulesets/MemMap.cpp, rulesets/MemMap.h,
rulesets/Py_Map.cpp, server/EntityFactory.cpp,
server/EntityFactory.h, server/WorldRouter.cpp,
client/BaseClient.cpp, client/CreatorClient.cpp:
Change various methods to pass entity information
around as RootEntity rather than MapType.
* rulesets/Entity.cpp, rulesets/Thing.cpp: Use static LOC and POS
members in RootEntity.
* rulesets/Entity_getLocation.h: Add some slightly more thorough
checking for location data.
* rulesets/Entity.cpp, rulesets/Thing.cpp: Move Create op subscription
into Entity, as that is where the method is.
* rulesets/World.cpp: Create a boulder entity when the pickaxe
is used on rocky terain.
* client/CharacterClient.cpp: Don't process ops from the server in
* common/BaseWorld.h, rulesets/Character.cpp, rulesets/Py_World.cpp,
rulesets/PythonThingScript.cpp, rulesets/Stackable.cpp,
rulesets/Thing.cpp, rulesets/World.cpp, server/Account.cpp,
server/Admin.cpp, server/Connection.cpp, server/EntityFactory.cpp,
server/Restoration.cpp, server/WorldRouter.cpp, server/WorldRouter.h:
Rename some functions in the World interface so they make more
sense.
* rulesets/Entity.cpp, rulesets/Entity.h: Add destroyed flag to
Entity so we can tell if its no longer in the world.
* server/WorldRouter.cpp: Cut down the special case handling of
delete ops as we can now broadcast ops from entities that
have been removed from the world.
* rulesets/Entity.cpp: Call decRef() on parent from the destructor
so that entities removed from the world can still have a reference
to their parent safely.
* rulesets/BaseMind.cpp, rulesets/MemMap.cpp, tests/distancetest.cpp:
Make sure parent is 0 before deleting, as reference counting is not
implemented in the mind yet.
* rulesets/Entity.cpp, rulesets/Entity.h, rulesets/Thing.cpp,
server/WorldRouter.cpp: Increment reference count on parent
entity when a child has a reference to it.
* 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.
* rulesets/Entity.cpp, rulesets/Entity.h: Add has() method
to query if an entity has an attribute with a given name.
* rulesets/Character.cpp, rulesets/Character.h: Implement tool
wield and use operations.
* data/mason.xml: Add operations list to the cleaver.
* rulesets/mason/world/objects/tools/Cleaver.py: Simplify the chop
operation the cleaver expects to get from its user.
* tools/cyloadrules.cpp: Remove some commented out cruft and
debugging output.
* rulesets/Entity.cpp, rulesets/Entity.h: Make get(), set(), and
addToMessage() non-virtual, and convert them to using new property
mechanism. Add the necessary properties in the constructor.
* rulesets/Area.cpp, rulesets/Area.h, rulesets/Character.cpp,
rulesets/Character.h, rulesets/Line.cpp, rulesets/Line.h,
rulesets/Plant.cpp, rulesets/Plant.h, rulesets/Stackable.cpp,
rulesets/Stackable.h, rulesets/World.cpp, rulesets/World.h:
Remove virtual get() set() and addToMessage() methods. These
are now entirely in Entity.
* rulesets/World.cpp, rulesets/World.h: Remove some functions
for handling terrain data now handled by properties.
Clean up Set code to get rid of nasty unnecessary exception
try / catch block.
* modules/Location.cpp, physics/Collision.cpp, rulesets/Character.cpp,
rulesets/Entity.cpp, rulesets/Movement.cpp, rulesets/Movement.h,
rulesets/Pedestrian.cpp: Make sure orientation is not used if it
is not valid.
* rulesets/Entity.cpp: Added comment about transforming velocity and
orientation.
* tests/transformtest.cpp: Add more tests for quaternion manipulation.
* physics/Vector3D.h, physics/Vector3D.cpp, modules/Location.h,
modules/Location.cpp: Convert to using WFMath::Point instead of
WFMath::Vector for position.
* physics/Collision.h, physics/Collision.cpp: Update collision code
to use new pos type.
* rulesets/Py_Point3D.h, rulesets/Py_Point3D.cpp: New python
wrappers for WFMath::Point.
* rulesets/Py_Location.cpp, rulesets/Py_Vector3D.cpp,
rulesets/Python_API.cpp:
Update python wrappers to take into account new pos type.
Ensure that only apropriate functionality is available for
point and vector.
* rulesets/Character.cpp, rulesets/Entity.cpp, rulesets/Entity.h,
rulesets/Line.cpp, rulesets/Movement.cpp, rulesets/Movement.h,
rulesets/Pedestrian.cpp, rulesets/Pedestrian.h,
rulesets/Plant.cpp, rulesets/Thing.cpp, rulesets/World.cpp,
server/EntityFactory.cpp, server/WorldRouter.cpp,
server/WorldRouter.h: Update the rest of the code for new pos
type, converting all places where entity parenting is changed
to use WFMath toParentCoords() and toLocalCoords() methods,
so that orientation is handled correctly.
* tests/transformtest.cpp: New test to ensure that toParentCoords()
and toLocalCoords() perform as expected.
* tests/Creatortest.cpp, tests/Locationtest.cpp, tests/Worldtest.cpp,
tests/collisiontest.cpp, tests/emergencetest.cpp:
Update the rest of the tests.
* rulesets/Entity.cpp, rulesets/MemMap.cpp: Modify FIXME text so
its clearer which ones are part of the same problem.
* rulesets/Thing.cpp: Use a Delete pointer for a Delete operation.
* server/CommServer.cpp, server/CommServer.h: Change references
to clients into sockets. Remove unused version of removeSocket()
which takes an error message.