* common/system.cpp, common/system.h: Add security_init(), a
function to initialise any security or crypto related libraries
used. This is required by recent version of libgcrypt when
using hash functions.
* server/server.cpp, tests/systemtest.cpp, tools/cypasswd.cpp:
Call security_init() in all programs that use security related
functions.
* common/globals.cpp, common/globals.h: Modify the loadConfig
function so it takes usage hints, and checks the options in known
sections against those in the usage help.
* client/client.cpp, server/server.cpp, tools/cyaddrules.cpp,
tools/cycmd.cpp, tools/cydumprules.cpp, tools/cyloadrules.cpp,
tools/cypasswd.cpp: Convert all calls to loadConfig to provide
the right hints.
* common/globals.cpp, common/globals.h: Add interfact and mechanism
for showing usage data for all the programs given one central
location for the data.
* server/server.cpp: Test out the usage function.
* tools/cypasswd.cpp: Display usage using the old mechanism.
* commong/globals.h, common/globals.cpp: Add definitions for different
error codes from reading the config file, in particular codes that
indicate that the user has requested version, help or usage
information. Add a function for reporting the version of tools.
* server/server.cpp: Add support for version or usage arguments,
including specific reporting of the server build number, which is
does not apply when reporting the version of other components.
* tools/Makefile.am: Fix the globals modules dependency on consts.
* tools/cypasswd.cpp: Add support for version or usage arguments.
* tools/cypasswd.cpp: Improve the usage documentation.
* common/globals.cpp: Add a varconf parameter lookup to allow
shorthand arguments to be used to request usage information.
* client/CharacterClient.cpp, client/ClientConnection.h,
rulesets/Character.cpp, rulesets/Character.h, tools/cyaddrules.cpp,
tools/cyconfig.cpp, tools/cyconvertrules.cpp, tools/cyctrl.cpp,
tools/cydumprules.cpp, tools/cyloadrules.cpp, tools/cypasswd.cpp:
Add inline documentation.
* client/CharacterClient.h, client/CharacterClient.cpp: Remove
overriden sight operation handlers, as they are no longer
present in the base class, and will never be called.
* client/ClientConnection.h: Remove obsolete unimplemented template
declaration.
* rulesets/Entity.cpp: Remove documentation for an argument that was
never there.
* tools/cyctrl.cpp: Mark as removed from the build.
* Add a FIXME about removing hard coded gender property
* Require varconf 0.6.2 for its superior command line handling.
* client/client.cpp, common/globals.cpp, server/server.cpp,
server/slave.cpp, tools/cycmd.cpp, tools/cyloadrules.cpp,
tools/cypasswd.cpp: loadConfig() now returns the index of
the first non-option commandline arg.
* client/client.cpp: Use new config feature to allow user to
specify the client function to use on the command line far
more easily.
* tests/Areatest.cpp, tests/Entitytest.cpp, tests/Foodtest.cpp,
tests/Linetest.cpp, tests/Planttest.cpp, tests/Stackabletest.cpp,
tests/Structuretest.cpp, tests/Thingtest.cpp, tests/Worldtest.cpp,
tests/inheritancetest.cpp, tests/utilitytest.cpp, tools/cycmd.cpp,
tools/cyconvertrules.cpp, tools/cydbload.cpp, tools/cyisoload.cpp,
tools/cyloadrules.cpp, tools/cypasswd.cpp: Convert code to using
Atlas Message typedefs as found in Atlas-C++ 0.6 to aid
conversion later.
* tools/cypasswd.cpp, tools/cyloadrules.cpp, tools/cycmd.cpp: Fix
usage functions to output to standard error.
* server/Admin.cpp: Add quick code to install new types.
* tools/cyconvertrules.cpp: Add placeholder for tool to convert
old format rules files into a new format to be common with
indri.
* tools/cypasswd.cpp: Remove an obsolete comment.
* common/Database.h, common/Database.cpp: Add the method required
to update a row of a simle database table.
* common/accountbase.h, common/accountbase.cpp: Re-implement
accountbase to use the new style accounts table.
* server/Lobby.cpp: Add some debugging messages.
* server/CommServer.cpp: Tweak select loop so that closed connections
are cleaned up as soon as they are detected.
* rulesets/World.cpp: Make demo terrain a bit more mountainous.
* Convert entire codebase over to using Atlas-C++ 0.4.90, as
start of transition to 0.6 API.
* Use " instead of < when including application headers.
* Re-work the interface between server and worldrouter objects
so that the are less tied together, and more flexible.
* common/Database.cpp, common/Database.h, common/accountbase.h,
server/Persistance.cpp, server/Persistance.h,
tools/cydbload.cpp, tools/cyloadrules.cpp, tools/cypasswd.cpp:
Modified class structure of database related classes to get
rid on nasty inheritance based idea. Add functionality
to handle updating a row as distinct from inserting. Made
id column the primary key. Updated tools to make propper use
of update functionality.
* client/client.cpp, server/server.cpp, common/globals.cpp,
common/globals.h, tools/cycmd.cpp, tools/cydbload.cpp,
tools/cypasswd.cpp: Move code for handling loading of config
from the command line, user config and global config, into
globals.cpp, and make use of it in all tools.
* tools/cycmd.cpp: Fix objtype on server set commands.
* common/Database.cpp, common/Database.h: Implemented new database
interface to PostgreSQL to replace inadequate db3 code.
* common/database.cpp, common/database.h: Old code removed from the
build.
* common/accountbase.h, server/Admin.cpp, server/Persistance.cpp,
server/server.cpp, tools/cydbload.cpp: Fixed for minor changes
in the low level database API.
* common/globals.h, common/globals.cpp, rulesets/EntityFactory.cpp,
server/Admin.cpp, server/CommServer.cpp,
Remove varconf header from globals.h, and put in .cpp files
where it belongs.
client/ClientConnection.cpp, common/database.h, common/globals.cpp,
common/persistance.cpp, common/stringstream.h, server/CommClient.cpp,
server/CommServer.cpp, server/Persistance.cpp, tools/cyctrl.cpp,
tools/cyctrl.cpp, tools/cydbload.cpp, tools/cyisoload.cpp,
tools/cypasswd.cpp: Removed unused config.h.
* client/ObserverClient.cpp, common/const.h, tools/cycmd.cpp:
Use default password if the admin account cannot be fetched from
the database.
* client/Py_CreatorClient.cpp, common/BaseEntity.cpp,
common/BaseEntity.h, rulesets/Character.cpp, rulesets/Creator.cpp,
rulesets/Entity.cpp, rulesets/Entity.h, rulesets/EntityFactory.cpp,
rulesets/MemMap.cpp, rulesets/Py_Mind.cpp, rulesets/Py_Thing.cpp,
rulesets/Py_World.cpp, rulesets/Thing.cpp, server/Account.cpp,
server/Admin.cpp, server/Connection.cpp, tools/cywatchdog.cpp:
Make many of the member variables of Entity protected, and add
the required accessors. Changed the name of the id attribute
to m_id.
* common/BaseWorld.h, common/database.cpp, common/persistance.cpp:
Removed unused includes.
* common/Chop.h, common/Cut.h, common/Eat.h, common/Fire.h,
common/Generic.h, common/Load.h, common/Nourish.h, common/Save.h,
common/Setup.h, common/Tick.h: Moved definition of virtual
functions into cpp file, to reduce wasted code.
* common/Makefile.am: Create cyphesis library, which can be used by
other applications to access cyphesis databases.
* common/config.h, common/database.h, server/Persistance.cpp,
tools/cydbload.cpp, tools/cyisoload.cpp, tools/cypasswd.cpp:
Remove conditional compilation of db code. db3 is now required.
* server/WorldRouter.h: Fixed getNewId() so it take const string.
* server/server.cpp: Removed python shutdown, so it does not
mess up the db if it causes a segfault.
Al Riddoch <alriddoch@zepler.org>
* tools/cypasswd.cpp, tools/cycmd.cpp, client/ObserverClient.cpp,
common/accountbase.h Added database delete method, which closes
the database, and make sure it is used.
* server/server.cpp: Moved the point where the server drops to
a daemon, as doing this after the db was open seems to corrupt
the db.
* common/database.cpp: If a db is opened but not created, then it
is read only.
Al Riddoch <alriddoch@zepler.org>
python.
* common/const.h, common/const.cpp, rulesets/Python_API.cpp:
Removed unused consts.
* common/globals.h, common/globals.cpp, server/server.cpp:
Enable running as a daemon in the background by default.
This improves usability by removing dependance on users
session. Install signal handlers so signals cause clean
shutdown.
* tools/cycmd.cpp: If adminning server on localhost, get admin
password directly from database, instead of asking user.
Allows cycmd to be used in scripts. Ensure that exit
status accuratly reveals whether the command was sent.
* tools/cypasswd.cpp: Switch to using common/accountbase.h.
Al Riddoch <alriddoch@zepler.org>
client/ObserverClient.cpp, client/ObserverClient.h,
client/ClientConnection.cpp, client/ClientConnection.h,
client/define_world.cpp, client define_world.h:
Started re-coding of python client code in C++.
* common/accountbase.h:
Database class used for simply accessing accounts.
* common/OOGThing.cpp, common/OOGThing.h, server/Account.h,
server/Routing.h:
Moved OOGThing class into common as it is not server specific.
* common/BaseWorld.cpp, common/BaseWorld.h,
server/WorldRouter.cpp, server/WorldRouter.h,
rulesets/Entity.h, rulesets/Py_World.cpp,
rulesets/PythonThingScript.cpp, rulesets/Python_API.h,
rulesets/Thing.cpp, rulesets/Thing.h:
Added base class for WorldRouter so that code that previously
used WorldRouter now used the interface defined by this
new class. This means that the code in rulesets no longer
has dependencies on code in server, so can be used in the client.
* server/ExternalMind.cpp, server/ExternalMind.h,
rulesets/Character.h, rulesets/Creator.cpp,
server/Account.cpp:
Moved ExternalMind class into server as it is server specific,
so that there is no dependancy on server in rulesets.
* server/Persistance.cpp. server/Persistance.h,
server/Admin.cpp, server/ServerRouting.cpp, server/server.cpp:
Moved high level server specific persistance class into
server, so there is no dependency on server in common.
* common/database.cpp, common/database.h, server/Admin.cpp,
tools/cydbload.cpp, tools/cyisoload.cpp, tools/cypasswd.cpp:
Increases efficiency of some interfaces by passing Object::MapType
instead of MapType, when the value must be a map.
* modules/WorldTime.cpp, modules/WorldTime.h,
rulesets/Py_WorldTime.cpp, rulesets/Python_API.cpp:
Brought the version of WorldTime in modules up to date, as this is
the version now used.
* rulesets/Character.cpp, server/WorldRouter.cpp, rulesets/Thing.cpp,
server/Admin.cpp:
Made world objects dictionary private.
* rulesets/EntityFactory.cpp, rulesets/EntityFactory.h:
Change newThing parameters so entity factory does not need to
know about WorldRouter.
* server/Lobby.cpp: Added support for people and rooms attributes
of OOG room class.
Al Riddoch <alriddoch@zepler.org>
atlas object inheritance tree.
* server/Connection.cpp: Added code to allow client to query
atlas object inheritance using get ops.
* example/client/InheritanceClient.*: Added example client which
queries the inheritance tree of the server.
* rulesets/MemMap.h, rulesets/Py_Map.cpp: Made hooks lists private,
and added methods to access them.
* server/Account.cpp, server/Lobby.h: Added correct handling of OOG
look ops when looking at own characters, other accounts, or the
lobby.
* server/ServerRouting.h: Added function to generate serial numbers
for operations.
* server/WorldRouter.cpp: Assign genuine serial number to all
in game operations as they are pulled off the queue.
* Cleaned up header file multiple inclusion checks for uniqueness,
and made sure of ISO compliant use of std::string.
Al Riddoch <alriddoch@zepler.org>
Sorted out random face direction.
* tools/cypasswd.c: Re-wrote tool to use database class, and thus
ensure it is trying to access the right database.
* common/database.cpp, common/database.h: Added function to remove
accounts from the account database.
Al Riddoch <alriddoch@zepler.org>
Added config check that looks for DB3's db_cxx.h on default
include path if it cannot be found in db3/. This fixes building
on Debian.
* server/server.cpp, server/WorldRouter.cpp, acorn.vconf,
globals.h, globals.cpp: Added inittime config option used to
influence the game time used at server startup.
* server/WorldTime.cpp: Added in new time of day descriptions for
more flexible goals.
* server/ServerRouting.cpp: Removed output used to debug memory
cleanup code.
* rulesets/basic/mind/goals/common/misc_goal.py: Added time
parameters to trading goals.
* rulesets/Thing.cpp: Fixed appearance/disappearance operations
which were not getting sent most of the time.
* client/define_world.py: Added in more NPC and modified behavoir.
Everyone now goes to the inn for lunch and in the evening, and
market traders only work during the day.
Al Riddoch <alriddoch@zepler.org>
make server operation customisable. Added comments.
* server/server.cpp, server/CommServer.h: Changed methods which
return int to returning bool if they are success/faul results.
* server/WorldRouter.cpp: Removed some unused debugging code.
Optimised heavily used code. Changed error message on
sending to a non-existant entity so that it is no longer
reported as a critical error.
* server/ServerRouting.h, server/Connection.h,
server/Connection_methods.h: inlined simple methods.
* server/Connection.cpp: Optimised frequently used code.
* server/CommClient.h: Simplified read method so it no
longer checks status redundantly.
* common/BaseEntity.h, rulesets/Thing.h, rulesets/Entity.h: Added
comments explaing purpose of classes.
* rulesets/Thing.cpp: Added detailed comments, and removed unnecessary
initialisation of some attributes.
* rulesets/PythonMindScript.cpp: Removed redundant NULL check.
* rulesets/MemMap.h: Added inlines for inlined methods.
* rulesets/Entity.h, common/BaseEntity.h: Moved seq from BaseEntity
to Entity as it does not apply to Out Of Game objects.
* rulesets/Entity.cpp: Added in stamp/seq attribute. Nade name
attribute optional.
* rulesets/Character.cpp: Simplified some op handling code
to make it more readable and hopefully faster. Added comments
explaining movement, removed unused commented out code, and
removed some unnecessary debugging code.
* common/operations.h: Explanatory comments.
* common/*.h: Re-wrote extended operations to fit in
with Atlas-C++ 0.4.2 conventions.
* common/log.*: Commented out unused logging code.
Al Riddoch <alriddoch@zepler.org>
This code will no longer build against the last release of Atlas-C++ 0.4
Please use cvs Atlas-C++ stable branch.
* Substantial re-work of object model. Moved many attributes out
of BaseEntity class. Changed WoldRouter so it now handles
objects in terms of Entity, rather than BaseEntity.
* Code cleanups, including removing reduntant includes, and
getting rid of C style comments.
* Fixed the way attributes are handled in Set operations and
when merging from an Atlas::Message::Object. This fixed
problem with setting gender of characters.
* rulesets/Pedestrian.*, rulesets/Movement.*: Re-named
Movement variables to make them clearer. Added in
separate handling for collisions from moving to
target position. Modified collision handling so
objects can slide next to each other.
* rulesets/Thing.cpp, rulesets/Character.cpp: Cleaned up and
rationalised movement code. Much shorter, faster and
more compact than before.
* Made better use of iterators throughout, eliminating unnecessary
lookups, and copying of data.
* Moved all virtual functions out of header files, making
less work for the linker.
* Made more use of const references to avoid the need to copy
data before being able to inspect it.
Al Riddoch <alriddoch@zepler.org>
when part of entity leaves box to when the whole entity leaves the
box.
* basic.vconf: Make tent use the structure base class.
* client/define_world.py: Add bounding box to tent.
* tools/cycmd.cpp: Added password entry.
* server/Admin.cpp: Added "stat" admin command, to get server
details.
* server/CommClient.h: Fixed include dependencies.
* common/persistance.cpp: Added findAccount() method for systems
without db3.
* rulesets/Thing.cpp: Added sending Apperance and Disappearance
operations to static entities when another entity moves out
of sight.
* rulesets/Character.cpp: Added check to make sure an entity does
not collide with itself.
* rulesets/Thing.cpp: Added check to make sure entity does not move
inside itself.
* rulesets/Py_Location.cpp: Modified python location.copy() method
so that only the position and velocity is copied. This should
bounding boxes getting set on things which should not have them.
* rulesets/Character.cpp: Added return statement to movement
handling, so move ops without arguments are not handled.
Al Riddoch (alriddoch@zepler.org)
and end encodings, which is <atlas>..</atlas> in the case of
XML-like codec.
* modules/Location.h: Added a flag which indicates whether the
bounding box of an entity is solid. If it is not solid, then
the entities contents much be checked for collisions rather
than the entity itself.
* rulesets/Character.h: Added target_ref attribute to MovementInfo
as a means to track character movement between entities.
* rulsets/Character.cpp: Modified collision code to handle
detecting of collisions with non-solid objects, and handling
movement when characters moves into a non-solid object but
does not collide with it.
* rulesets/Structure.h, StructFactory.*: Added base class for
buildings and other structure, which are not solid, and the
character can move in and out of freely.
* server/server.cpp: Made metaserver functionality optional, and
added a config option to the config file.
Al Riddoch (alriddoch@zepler.org)