Classes under "rulesets" have been moved to "rules", and split up into
futher subdirectories matching their library. As a result we can now
better separate the python bindings, so that things that belongs to the
simulation are separeted from things that belongs to the ai.
* client/BaseClient.h, client/ClientConnection.cpp,
client/ClientConnection.h, client/ObserverClient.cpp,
client/client.cpp: Clean up the way sockets are handled and errors
are reported.
* 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.
* client/ClientConnection.cpp: Remove debug output.
* client/BaseClient.h, client/BaseClient.cpp: Add a logout method
so that the client can be disconnected.
* client/client.cpp: Once the client is complete, call logout to
ensure all messages sent to the server have been processed.
Logout waits for the server to acknowledge that the connection is
is complete.
* client/client.cpp: Delete the observer client once it is
is finished with.
* client/ClientConnection.cpp, client/ClientConnection.h: Add
a method to make the socket stay around for plenty of time
on close to ensure all the data is sent.
* common/globals.h, common/globals.cpp: Flag the usage data for
cycmd and database tools. Add an additional argument to the
usage function for programs which take additional non-varconf
arguments.
* tools/cyaddrules.cpp, tools/cycmd.cpp, tools/cydumprules.cpp,
tools/cyloadrules.cpp: Add usage to the rest of the tools.
* client/client.cpp: Add additional argument usage information.
* common/globals.h, common/globals.cpp: Break option data down into
sections, fix scoping, and fill out most of the options used.
* client/client.cpp: Add version and usage reporting calls.
* 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.
* configure.ac: Require latest varconf for its new features.
* common/globals.cpp, tools/cyconfig.cpp: Use new varconf scope for
settings to more suitably handle user overidden config settings.
* aiclient/ClientConnection.cpp, aiclient/client.cpp,
client/client.cpp, common/Database.cpp, server/server.cpp,
server/slave.cpp, tools/AdminClient.h, tools/cyaddrules.cpp,
tools/cycmd.cpp: Use new varconf/config.h header.
* TODO: Note about bug in cyaddrules when adding rules from scratch.
* client/ObserverClient.cpp, client/ObserverClient.h,
client/client.cpp: Add option to allow cyclient to connect to a
remote server.
* tools/AdminClient.cpp, tools/AdminClient.h: Add a timeout so
cyaddrules still works against older servers that don't send an
info op when new types are uploaded.
* tools/cyaddrules.cpp: Add option to allow cyaddrules to connect to
a remote server.
* 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.
* server/server.cpp, common/globals.cpp, client/client.cpp:
Workaround C++s nasty implicit conversion behavoir.
* common/system.cpp: Be smarted about POSIX signal handling for
segfaults and aborts.
* Update TODO.
* 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.
* 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/globals.cpp: Only persist this sessions command line
options if the user is overriding the installation directory.
* cyphesis.vconf, client/Py_CreatorClient.cpp,
client/Py_CreatorClient.h, client/client.cpp:
Add client functionality to allow diferent scripts to be run to
perform different functions on the server.
* client/CharacterClient.cpp: Add debug option.
* rulesets/Character.h: Make mind operation functions virtual,
so they can be overridden.
* common/BaseWorld.h, server/WorldRouter.cpp,
server/WorldRouter.h: Add server functions to search for
entities by name or type.
* rulesets/Creator.h, rulesets/Creator.cpp: Allow creator to
specify a look without an id to search for entities with
a given name or type.
* client/CreatorClient.cpp, client/CreatorClient.h,
client/ObserverClient.cpp, client/ObserverClient.h,
client/Py_CreatorClient.cpp, rulesets/basic/editor.py,
rulesets/mason/define_world.py:
Add support for looking for entities in the world by name or
type from client script, so client scripts can modify existing
world.
* rulesets/Entity.cpp, rulesets/Movement.cpp,
rulesets/Py_Object.cpp, rulesets/Py_Operation.cpp,
rulesets/Py_Oplist.cpp, rulesets/Python_API.cpp,
rulesets/Stackable.cpp, rulesets/Thing.cpp,
rulesets/World.cpp, server/Account.cpp,
server/CommServer.cpp, server/Connection.cpp,
server/Player.cpp, server/ServerRouting.cpp,
server/server.cpp, tools/cycmd.cpp,
tools/cywatchdog.cpp: Code formatting cleanups.
* rulesets/basic/world/objects/tools/Bow.py: Fix up bow so it now
fires correctly.
* server/server.cpp, client/client.cpp, common/globals.cpp:
Move loading of ruleset list from config file into the
generic loadConfig function.
* server/EntityFactory.cpp, server/EntityFactory.h:
Add support for reading mind data from rules database. Remove
old code for installing classes from varconf. Clean up debugging
output.
* server/Admin.cpp: Remove setting of varconf class when new
type is installed from client.
* rulesets/MindFactory.h, rulesets/MindFactory.h: Get MindFactory
working, and set it up so EntityFactory installs info here
as it reads the rules from the database.
* rulesets/Character.cpp: Use MindFactory to create minds.
* common/Database.cpp: Clean up some obsolete comments.
* aiclient/client.cpp: Get rid of invalid setup of varconf.
* 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.
tools/cycmd.cpp: Switched to using skstream to completely handle
client socket connections.
* client/ClientConnection.cpp, client/ClientConnection.h,
common/log.cpp, rulesets/EntityFactory.h, rulesets/MemMap.h,
server/server.cpp, tools/cycmd.cpp: Removed unused includes.
* client/Py_CreatorClient.cpp, client/client.cpp,
client/define_world.cpp, rulesets/Py_Location.cpp,
rulesets/Py_Location.h, rulesets/Py_Map.cpp,
rulesets/Py_Map.h, rulesets/Py_Mind.cpp, rulesets/Py_Mind.h,
rulesets/Py_Object.cpp, rulesets/Py_Object.h,
rulesets/Py_Operation.cpp, rulesets/Py_Operation.h,
rulesets/Py_Oplist.cpp, rulesets/Py_Oplist.h,
rulesets/Py_Optime.cpp, rulesets/Py_Optime.h,
rulesets/Py_Thing.cpp, rulesets/Py_Thing.h,
rulesets/Py_Vector3D.cpp, rulesets/Py_Vector3D.h,
rulesets/Py_World.cpp, rulesets/Py_World.h,
rulesets/Py_WorldTime.cpp, rulesets/Py_WorldTime.h,
rulesets/PythonMindScript.cpp, rulesets/PythonThingScript.cpp,
rulesets/PythonThingScript.h, rulesets/Python_API.cpp,
rulesets/Python_API.h, server/server.cpp:
Reorganised python header files so that each header includes
all the code relevant for a particular type. Tidied up
the type implementations. Added prototypes to init_python_api()
to the Python_API.h header, and removed other dependencies from
it.
Al Riddoch <alriddoch@zepler.org>
* TODO: Update on important issues which allow easy DOS attacks.
* client/ClientConnection.cpp, client/ClientConnection.h:
Cleaned up unused code from ClientConnection class.
* client/client.cpp: Removed monitoring section of client
so it simply exits once the world is initialised.
* rulesets/basic/mind/goals/humanoid/werewolf.py:
Started work on dynamic goals for playing werewolf.
* rulesets/werewolf/define_world.py: Added in the mayor, who runs
werewolf games.
* common/BaseEntity.h: Made id of entity private, and implemented
accessors.
Al Riddoch <alriddoch@zepler.org>
* client/CreatorClient.cpp: Fixed processing the response
to a create operation, and cleaned up debugging output.
* client/ObjserverClient.cpp, client/ObserverClient.h,
client/client.cpp: Added setup method, which which handles
connecting, negotiation, logging in and creating character.
* client/Py_CreatorClient.cpp: Added check if make() failed.
* rulesets/Python_API.cpp: Fixed setting the import hooks
list properlly to include the ruleset list in use, instead
of hardcoding it.
* rulesets/acorn/define_world.py: Copied define_world.py script
from client directory for Acorn.
* rulesets/basic/editor.py: Modified to be used from C++ core.
* rulesets/basic/mind/goals/__init__.py,
rulesets/basic/mind/goals/humanoid/werewolf.py:
Added in goals file to contain goals related to werewolf.
* rulesets/basic/mind/panlingua/interlinguish.py:
Added in vote and execute verbs for werewolf.
* rulesets/werewolf: Added in new ruleset for werewolf.
Al Riddoch <alriddoch@zepler.org>
* server/Player.cpp: Arg order of std::string.compare() is
incompatable between recent libstdc++ versions. Switch
back to old version, still in most common use.
* rulesets/Thing.cpp: Set refno on ops handled in game.
* rulesets/Python_API.cpp: Modify Entity() python constructor
so that commonly used attributes from old atlas are translated
to their modern equivalents.
* rulesets/Py_Thing.cpp, rulesets/Py_Mind.cpp: Differentiate
between previously identical error messages in several places.
* rulesets/Py_Object.cpp: Rework conversion of python dict to
Atlas map to be more efficient and clean.
* rulesets/Py_Location.cpp: Rework setting of vector parts of
location so that it can accept vectors from python in more
formats, including lists and tuples.
* rulesets/Creator.h, rulesets/Character.h, common/BaseEntity.h:
Re-order virtual methods declarations to fit a convention.
* common/stringstream.h: Hardcode use of local stringstream class,
as the version provided with older libstdc++ seems to be broken.
* common/database.cpp: Use the common header to pick the right
stringstream implementation.
* common/BaseWorld.cpp, server/Persistance.cpp: Removed unused
stringstream include.
* rulesets/Creator.cpp: Added extra debug output.
* client/define_world.h, client/define_world.cpp, client/CommClient.h:
Use CreatorClient to store Creators mind, instead of BaseMind.
* client/client.cpp,
client/ObserverClient.h, client/ObserverClient.cpp,
client/CreatorClient.h, client/CommClient.h, client/CommClient.cpp:
Modify method names to fit capitalisation conventions.
* client/CreatorClient.cpp: Implement creation of in-game entities,
using creator entity.
* client/CommClient.cpp: Added correct client side monitoring of
creator entity.
* client/ClientConnection.h, client/ClientConnection.cpp: Added
pending method to establish if ops are in the queue. Switched send()
method so we only send ops. Add setting of serialno of sent
ops, starting with an offset of 512.
* client/CharacterClient.h: Removed unused member, opFound.
* client/CharacterClient.cpp: Debugged sendAndWait() method.
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>