res.append(attacker.mind2body(self.face(attacker, defender)))
This line fails because self.face return nothing if two characters are in
exactly the same place.
* server/Account.cpp: When allowing a character to create a character
even though it has specified a type that does not exist, install
a dummy type record for the non-existant type to keep Eris happy.
* common/globals.cpp, common/globals.h: Add global variable for
the local state directory.
* server/Account.cpp, server/Admin.cpp, server/Admin.h,
server/Player.cpp: Tighten up some operation checking and add Create
handler to Admin in preparation for handling creation of new OOG
things.
* server/CommLocalClient.cpp, server/CommLocalClient.h,
server/CommRemoteClient.cpp, server/CommRemoteClient.h,
server/CommUnixListener.cpp, server/CommUnixListener.h,
server/CommClient.cpp, server/CommClient.h,
server/CommListener.cpp, server/Connection.cpp,
server/Connection.h, server/server.cpp:
Create new listener and connection classes using unix sockets
to allow local trusted connections.
* client/ClientConnection.cpp, client/ClientConnection.h,
client/CommClient.h, client/CreatorClient.cpp,
client/ObserverClient.cpp: Add capability to connect over
unix socket.
* server/Restorer.h, server/Restorer_impl.h: Add method to allow
decoding of a complete atlas map from a database record.
* common/Database.cpp: Ensure failure is only returned if string
is not empty.
* Added various nifty bits of mason behavoir.
* rulesets/Py_Operation.cpp: Always return an error, if the script
does something invalid with the python API.
* rulesets/BaseMind.cpp: Implement operation triggers in
the mind scripts.
* Document some bugs, bring TODO up to date, and bump up version
to 0.1.92.
* tools/cyloadrules.cpp, server/server.cpp,
aiclient/ClientConnection.cpp, client/ClientConnection.cpp,
common/inheritance.h: Use const iterators and references
whenever possible.
* client/CommClient.cpp, client/CreatorClient.cpp,
client/ObserverClient.cpp, client/Py_CreatorClient.cpp,
common/BaseEntity.cpp, common/BaseEntity.h,
common/types.h, rulesets/Area.cpp, rulesets/BaseMind.cpp,
rulesets/Character.cpp, rulesets/Entity.cpp,
rulesets/Food.cpp, rulesets/Line.cpp,
rulesets/MemMap.cpp, rulesets/Pedestrian.cpp,
rulesets/Plant.cpp, rulesets/Py_Mind.cpp,
rulesets/Py_Object.cpp, rulesets/Py_Thing.cpp,
rulesets/Python_API.cpp, rulesets/Stackable.cpp,
rulesets/Thing.cpp, rulesets/World.cpp,
server/Account.cpp, server/Admin.cpp, server/CommClient.cpp,
server/CommServer.cpp, server/Connection.cpp,
server/EntityFactory.cpp, server/Lobby.cpp,
server/Persistance.cpp, server/Player.cpp,
server/ServerRouting.cpp, server/WorldRouter.cpp:
Switch to using Fragment as name for Atlas::Message::Object,
to avoid name clashes on Object.
* common/BaseEntity.h: Make BaseEntity inherit from SigC::Object,
so signals and callbacks can be used, and add destroyed
signal.
* common/accountbase.h, physics/BBox.h, physics/Quaternion.h,
physics/Vector3D.h, rulesets/MemMap_methods.h,
rulesets/Movement.cpp, rulesets/Plant.h,
rulesets/Py_Operation.cpp, rulesets/PythonMindScript.cpp,
rulesets/PythonThingScript.cpp, rulesets/Script.cpp,
common/inheritance.cpp: Cleaned up Atlas::Message::Object
use, and excessive use of "using ...".
* rulesets/Movement.h, rulesets/Pedestrian.h:
Use forward declarations rather than including Move.h
* server/Account.cpp, server/Account.h, server/Connection.cpp,
server/Connection.h: Use destroyed signal to ensure references
to in game entities are removed when those entities are
destroyed. Ensure Connection is only destroyed once.
* 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.
* client/CommClient.cpp, client/ClientConnection.cpp, tools/cycmd.cpp:
Ensure clients use username in login ops.
* common/BaseEntity.cpp, common/op_switch.h, rulesets/BaseMind.cpp:
Modify the way op switchers work so they can be used for functions
that return any type.
* rulesets/Character.cpp, rulesets/Character.h: Re-write world2mind
layer so that rather than copying ops that are to be sent to
the mind, the w2m functions returning a flag indicating whether
the op should be passed to the mind. Made w2m and mind op handlers
final, as they are never overridden.
* rulesets/Creator.cpp: Correct comments.
* rulesets/MemMap.cpp: Add comments clarifying behavoir, and remove
old pseudo-code.
* server/Account.cpp, server/Account.h: Ensure that an accounts
character dictionary only ever contains characters. Other entities
that the account chooses to create will no be stored here. Add
function to be called at login time to make sure that characters
stored here are still around.
* server/Connection.cpp, server/Connection.h, server/ExternalMind.cpp,
server/ExternalMind.h: When external mind of a character is
destroyed, ensure that the character is removed from the
connection's object reference store.
* server/Account.cpp, server/Connection.cpp: Switched to using
USERNAME of accounts rather that ID for login and account creation.
Toughened up the connection code, so invalid login/create ops
are handled.
* server/Connection.h: Removed unused getObject method.
* rulesets/Character.cpp, rulesets/Character.h: Get rid of
inefficiency handling ops from internal and external mind. Fix
leak of some ops.
* common/BaseWorld.h, server/WorldRouter.cpp, server/WorldRouter.h:
Add method for getting a new serialno.
* rulesets/Thing.cpp, rulesets/Thing.h, server/WorldRouter.cpp:
Set refno on ops as they come back from entities. Set serialnos
on same ops at the same time, but do not set serialnos
on ops that come in from elsewhere, as those are now handled at
source.
* rulesets/Creator.cpp, rulesets/Character.cpp:
Ensure that ops from external client preserve their serialno,
and assign new serialnos to other ops created at the same time.
* 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>
objects.
* modules/Location.cpp: Added bounding median to attributes sent
using Atlas.
* common/BaseEntity.cpp: Always set the id on an entity.
Al Riddoch <alriddoch@zepler.org>
all have the name Operation but are now called MoveOperation,
according to the type of operation they handle.
* modules/DateTime.cpp, modules/DataTime.h: Filled in functionality,
allowing initialisation and updating from a time values in seconds.
* modules/Location.h: Modified collision detection code so no
checking is done between two moving objects.
* rulesets/BaseMind.h, rulesets/BaseMind.cpp, rulesets/Entity.h,
rulesets/Entity.cpp: Removed virtual getMap() method and replaced
with a fixed method in BaseMind only. Added time member veriable
to BaseMind so each mind keeps track of time by itself.
* rulesets/Python_API.h, rulesets/Py_Mind.cpp, rulesets/Py_Mind.h:
Added specific python interface for mind objects, because if
increasing differences in the way this must be handled.
* rulesets/Character.h, rulesets/Character.cpp: Added isAlive flag
which is cleared if the character is dead. If this flag is cleared,
operations are no longer sent to the mind.
* rulesets/Movement.h, rulesets/Movement.cpp, rulesets/Pedestrian.h,
rulesets/Pedestrian.cpp: Cleaned up the code, made members more
distinctive, and make interface more general.
* rulesets/Py_Thing.cpp: Removed features used to support mind.
* rulesets/Py_WorldTime.cpp: Added support for comparison of
time with strings, to establish whether it matches descriptions
of time.
* rulesets/Python_API.cpp: Modified creating of scripts so mind
scripts use a slightly different interface from entity scripts,
to support the fact that a mind handles its own timekeeping,
has a memory map, and has no access to the world.
* server/WorldTime.cpp, server/WorldTime.h: Brought WorldTime into
the build. Used to track details of the time. Added support for
checking time descriptions such as "midday", "summer" against
DateTime.
Al Riddoch <alriddoch@zepler.org>
* 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)
location object to python wrappers.
* rulesets/Character.cpp: Added initialisation of bounding box
median for characters.
* modules/DateTime.*: Added configurability to date so that
each period of time has definable number of divisions. Default
is as per real world calendar restricted to 30 day months.
* Added Fire operation handling to Thing class, so that any entity
with a burn_speed attribute will burn.
* Added Food C++ base class, which implements cooking.
* Altered the semantics of the Eat/Fire/Nourish operations so
multiple arguments are no longer required. from is used to
determine the other entity involved.
* Added the beginnings of an astronomy system, but not yet used
anywhere.
* Added appearance handling to BaseMind and Memory.
* Added sequence no to all entities, which is incremented each time
a move or set operation is received. sequence no "seq" is included
in args of Appearance operations.
* Moved functionality from Animal python base class into Character
C++ base class. This much improves the performance of modelling
animals, and means that player characters, and NPCs get hungry and
need to eat. Reduced the speed at which animals consume energy
so they don't starve quite as quickly.
* Added collision prediction functions that handle both entities
having velocity.
* Added combine functionality to Stackable. Divide comes next.
Once functional, this will become the base class for any items
which will commonly be used as stacks.
Al