This is now on by default whenever the persistence is also enabled. It's
not clear why it wasn't on before though.
As a result Account has also been changed to be able to report whether
it should be persisted or not.
* common/const.h: Add a constant for the name length limit of
rule IDs and property names.
* common/Database.cpp: Use the name length constant for database
fields that will store the name.
* rulesets/Character.h: Fix broken doc comments on constants for
metabolism.
* rulesets/Character.cpp: Switch metabolism code over to use the
update mechanism, to remove race conditions. Re-write the
math so that nothing can stay alive for ages by consuming all their
mass. Tune constants so a well fed character will take a month.
* data/mason.xml: Set up goblin and settler class so that by
default they will starve to death in a few hours, and need to find
food to avoid this.
* common/const.h: Oops. Database got disabled again by accident.
Turn it back on.
* rulesets/Py_Operation.cpp: Fix formatting of comments.
* rulesets/Py_Oplist.cpp: Adapt sequence methods to be compatible
with the new interface typedefs in Python 2.5
* common/const.h: Add declaration for buildid, an incrementing
build number to give finer version tracking of development code.
* server/ServerRouting.cpp: Add buildid to the server status
made available to all clients. Fix entity count in server status
as it wasn't fully added in the last change.
* server/Makefile.am, scripts/gen_buildid.py: Implement buildid
by pulling the RCS revision number out of ChangeLog from its
embedded RCS $Id$ entry.
* index.dox, common/BaseWorld.cpp, common/BaseWorld.h,
common/PropertyFactory.h, common/PropertyManager.h, common/const.h,
rulesets/ActivePropertyFactory.h, rulesets/Entity.h,
rulesets/Py_Vector3D.h, rulesets/Py_World.h, rulesets/Py_WorldTime.h,
rulesets/PythonMindScript.cpp, rulesets/PythonMindScript.h,
rulesets/PythonScript.h,
rulesets/PythonThingScript.h, rulesets/PythonWrapper.cpp,
rulesets/PythonWrapper.h, rulesets/Script.cpp, rulesets/Script.h,
server/ArithmeticFactory.h, server/CommServer.h, server/CommSocket.h,
server/ScriptFactory.cpp, server/TaskFactory.cpp,
server/TaskFactory.h, server/WorldRouter.cpp, tools/AdminClient.h,
tools/cyaddrules.cpp, tools/cycmd.cpp, tools/cyconfig.cpp,
tools/cydumprules.cpp, tools/cyloadrules.cpp:
Add a truck load of inline docs.
* tools/cywatchdog.cpp: Mark obsolete file as removed from the build.
* tools/cyloadrules.cpp, tools/cyconfig.cpp, tools/cyaddrules.cpp:
Rename some overly generic types so they have more indicative
and unique names.
* FIXME, server/ScriptFactory.cpp, server/TaskFactory.h: Add a couple
of formal FIXMEs to sort out the code for loading modules and
classes.
* rulesets/PythonThingScript.h: Remove some commented out code.
* 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.
* OperationExerciser.cpp, OperationExerciser.h: Template class to
exercise and test custom operation classes.
* Attacktest.cpp, Burntest.cpp, Choptest.cpp, Connecttest.cpp,
Cuttest.cpp, Delvetest.cpp, Digtest.cpp, Droptest.cpp,
Eattest.cpp, Monitortest.cpp, Mowtest.cpp, Nourishtest.cpp,
Pickuptest.cpp, Setuptest.cpp, Ticktest.cpp, Unseentest.cpp,
Updatetest.cpp: Use OperationExerciser on all current custom op
classes.
* common/const.h: Remove obsolete config option to disable
range checks and calculations.
* client/ObserverClient.cpp, rulesets/Movement.cpp,
server/Admin.cpp, tools/AdminClient.h, tools/cycmd.cpp:
Remove const.h from files which no longer require it.
* rulesets/Python_API.cpp: Remove python bindings for obsolete
constants.
* rulesets/Thing.cpp, rulesets/World.cpp, server/WorldRouter.cpp:
Remove obsolete rotten code for handling sight without ranges.
* tests/consttest.cpp: Remove tests for removed constants.
* common/const.h: Add new constant for period between movement updates.
* rulesets/Pedestrian.cpp: Don't update entity movement timestamp
here.
* rulesets/Thing.cpp: Add comments about movement code. Update
movement timestamp when move op is handled. Use movement update
interval for update ops.
* common/const.h: Add a second const for the non-squared default
box size for visibility calculations.
* modules/Location.cpp: Initialise cached box size members with
defaults from consts.
* rulesets/basic/mind/goals/common/move.py: Don't remove focus
knowledge about item just because it has been picked up. This
fixes eating acorns.
* rulesets/basic/mind/goals/common/misc_goal.py: Remove focus knowledge
when something is eaten.
* 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.
* common/const.cpp, common/const.h: Git rid of bizare scheme
where each constant appears twice, debug and non-debug versions.
* rulesets/Pedestrian.cpp, rulesets/Thing.cpp,
server/WorldRouter.cpp: Fix problem where an essential call
was inside an assert, so did not happen when built in non-debug
mode.
* common/Database.cpp: Improve error reporting for query errors.
* common/const.cpp, common/const.h: Add full details and comments
for enable_database option.
* common/id.h, common/id.cpp: New ID generator for use when we
are not using the Database.
* common/AtlasFileLoader.cpp, common/AtlasFileLoader.h: Generic
class for loading Atlas data from a file.
* server/Connection.cpp, server/EntityFactory.h,
server/EntityFactory.cpp, server/Persistor.cpp,
server/WorldRouter.cpp, server/server.cpp:
Implement the enable_database option by wrapping all use of database
in if statements. Rules are loaded from files instead.
* common/const.h: Make the coments doxygen compatable.
* rulesets/Character.cpp: Add comments to document tool use.
* rulesets/Fell.cpp, rulesets/Fell.h, rulesets/Task.cpp,
rulesets/Task.h: Add reference to Character to base Task class,
and setup() method for task initiation.
* tests/Tasktest.cpp: Update task test for new changes.
* tests/randomtest.cpp, tests/consttest.cpp: New tests for random
and const headers.
* common/const.cpp, common/const.h: Add constants for handling
size based visibility calculations.
* rulesets/World.cpp, server/WorldRouter.cpp: Convert op broadcast
and viewing distance to being handled by a visibility calculation
based on size and distance, rather than distance alone. Movement
appearance and disappearance is yet to be done.
* common/const.h: Make constants static for efficiency.
* common/const.cpp, common/const.h: Add constant minimum size for
entities without boxes.
* physics/BBox.cpp, physics/BBox.h: Move box size function into
.cpp file, and make sure of minimum size if box is not valid.
* common/const.cpp, common/const.h, common/random.h,
physics/BBox.h, physics/Collision.cpp, physics/Collision.h,
physics/Quaternion.cpp, physics/Quaternion.h, physics/Vector3D.h,
rulesets/Movement.cpp, rulesets/Plant.cpp, rulesets/Python_API.cpp,
tests/collisiontest.cpp: Update variables relating to geometry
from double to float as this is the type used internall by
WFMath.
* physics/Vector3D.cpp, physics/Quaternion.cpp, physics/Quaternion.h:
Remove legacy code.
* server/CommPSQLSocket.cpp: Reformatting.
* common/const.cpp, common/const.h: Add a const for the default
admin password hash, with a view to removing the plain text
default admin password.
* server/Persistance.cpp: Ensure that the database contains an
admin account on startup.
* common/Database.cpp: Move the call to register the ID generating
sequence out of the code for creating IG entity tables, as it is
also required by OOG entities, in particular the admin account
bootstrap.
* client/ObserverClient.cpp, client/ObserverClient.h,
client/client.cpp: Modify client so that it no longer attempts to
get account details from the database, or from a hard coded default.
It will now attempt a trusted login, or rely on password provided
by config option.
* common/Database.cpp, common/Database.h: Implement methods
to query database results.
* common/const.cpp, common/const.h: Add a const for the root
id.
* server/Restoration.cpp, server/Restoration.h: Start implementing
code to restore world from database.
* common/const.cpp, common/const.h, rulesets/Creator.cpp,
rulesets/Entity.cpp, rulesets/Entity.h, server/WorldRouter.cpp:
Re-work omnipresent flag so it can only work in a debug build,
and has no performance impact on the production code.
* server/ServerRouting.cpp, common/const.h, common/const.cpp: Put all
the build dependant code in const.cpp, so no other file is
dependant on config.h.
* Add a cyphesis-config script, so other programs can tell where its
installed.
* Rework many of the build files so they are cleaner.
* Fix the readline C++ sanity check.
* common/const.cpp, common/const.h: Make consts modifiable in
the debug build.
* common/op_switch.h, rulesets/Character.cpp, rulesets/Character.h:
Fix missing logout op in op switchers.
* server/Account.cpp, server/Connection.cpp: Handle logouts
a bit differently, and return the info response process
expects.
* server/CommClient.cpp: Set connection id to client ip and port.
* server/CommServer.cpp: Tighten up the way eof is handled.
* server/ServerRouting.cpp: Set lobby id.
* common/const.h: Increase the sight range.
* server/WorldRouter.cpp: Put in some warnings, as I want to
know when ops are getting broadcast.
* server/server.cpp: Ensure stdout is not used when in daemon mode.
* tools/cydbload.cpp: Rename the daftly named class WorldBase
to WorldAccessor.
* mason.xml, cyphesis.vconf: Stop using the Acorn ruleset in Mason,
as it contains strange stuff, and remove the playable farmer
class from basic. Now games themselves define the only
playable types, and mason contains its own copies of classes
it has in common with acorn.
* server/WorldRouter.cpp: Eliminate unnecessary call to opEnumerate()
and enhance debugging output.
* server/Player.cpp: Correct the use of string.compare() in older
versions of libstdc++.
* common/types.h: Added enumeration for other operations, not
handled by the core, but considered valid. Added new type
for storing mapping between operation parents and their
enumerated type.
* common/op_switch.h: Separate handling of operations known to
be invalid from operations which are valid, but not explicitly
added to the core.
* common/inheritance.h, common/inheritance.cpp, common/custom.cpp:
Provide global operation mapping where enumeration of operations
can be looked up. Install all types handled by the core, and
types known to be used in scripts.
* common/BaseEntity.h, common/BaseEntity.cpp: Add object specific
operation mapping where operation types each object is subscribed
to can be enumerated, and others are rejected. Add mechanism
so that objects can add to the mapping, this subscribing to
operations. This makes enumerating operations much cheaper, and
eliminates the overhead of handling ops an object has no interest
in.
* rulesets/Thing.h, rulesets/Thing.cpp: Add mechanism so scripts
can subscribe to operations.
* rulesets/Character.h, rulesets/Character.cpp:
Add subscription mechanism for ops going to and from
the mind.
* rulesets/BaseMind.h, rulesets/BaseMind.cpp:
Add subscription mechanism for sight and sound perception
operations sub operations, and provide an interface to it
for scripts.
* server/Connection.cpp, server/Admin.cpp, server/Account.cpp,
rulesets/World.cpp, rulesets/World.h, rulesets/Thing.cpp,
rulesets/Stackable.cpp, rulesets/Plant.cpp, rulesets/Food.cpp,
rulesets/Character.cpp, rulesets/BaseMind.cpp:
Add subscriptions to operations for all core base classes.
* rulesets/Python_API.cpp: When script is created, go through
methods, and subscribe to the operations which are handled by
them.
* rulesets/Character.cpp: When calculating orientation of a walking
character, assume it is standing upright.
* physics/Vector3D.h: Add versions of mag() and distance() which
omit the square root calculations, so that when their values
are only used for comparison, the expensive square root
calculations can be ommited. Add new version of collision
and range checking functions which provide the optimal
interface to the application. Add versions of methods which
modify this rather than creating a new operation to eliminate
wasted copies.
* physics/Quaternion.cpp: Make use of faster interface provided
by Vector3D.
* physics/BBox.h: Add new version of collision checking function
which provides optimal interface to the application.
* modules/Location.h, modules/Location.cpp: Add new functions
to optimally calculate the distance between any two entities.
* modules/Location.h: Re-write collision and range functions to
make much more optimal use of Vector3D, BBox and distance
functionality.
* rulesets/Py_Vector3D.cpp, rulesets/Pedestrian.cpp,
rulesets/Movement.cpp, rulesets/Entity.cpp, rulesets/Character.cpp:
Eliminate implicit copies from vector arithmetic.
* rulesets/Pedestrian.cpp, rulesets/MemMap.cpp, common/const.h:
Re-write code which uses magnitude of vectors to use the square
of the magnitude instead, as it is much cheaper to calculate.