* server/Account.cpp: Remove the hack that ensures players always
create a settler if they try and create a character that does not
exist. Handle setting initial attributes unique to player characters
here, rather than setting the defaults on the classes.
* data/mason.xml: Remove initialising status to a ery low value to
make settlers and goblins starve easily.
* data/basic.xml: Set the mass of a arrow to something sane.
* rulesets/Entity.h, rulesets/Entity.cpp: Set argument names on
some methods. Add a new method allowing a property to be set
externally.
* server/ExternalProperty.cpp, server/ExternalProperty.h: Add a new
property which reflects whether an entity is connected to the
outside world via an external mind.
* server/Connection.cpp, server/Connection.h: Add a new method which
hooks up an avatar to the connection, installing an ExternalProperty
if necessary.
* server/Account.cpp: Use the new Connection method to hook up
existing avatars.
* server/Account.cpp: Rename some variables to clearer meanings.
Only send confirmation of subscription on entity creation if
the entity created is a character. Otherwise it is still created,
and can be manipulated, but not directly controlled by the
client.
* 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.
* common/BaseEntity.cpp, rulesets/Character.cpp, rulesets/Creator.cpp,
server/Account.cpp, server/Admin.cpp, server/Connection.cpp,
server/Lobby.cpp, server/WorldRouter.cpp: Don't bother with serial
numbers on ops generated inside the server. They just leak and upset
clients.
* server/Connection.cpp, server/CommClient.cpp, server/Account.cpp:
Only set refnos on ops if the client has set a serial number.
* rulesets/Character.cpp: Simplify handling the transfer of
operations from client to in-game. Don't give new operations
serial numbers at this point.
* rulesets/Character.cpp: Be more severe about error messages if
client sends an action op. Remove obsolete comments.
Warn if client sends a Set op. Don't accept look ops with
an arg containing no ID - nothing sends this, and nothing should.
* rulesets/Thing.cpp: Add an error report if an explicit Action op
is received by an entity.
* 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.
* 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/log.cpp, server/Account.cpp, server/Connection.cpp,
server/server.cpp: Make server logs much more machine readable
by removing stray colons, standardising field semantics, and
cleaning up messages.
* server/Account.cpp: Re-order checks so that type is checked
for before checking to see if its legal. Add temporary code
to force settler if an unknown character type is specified.
* server/Player.cpp: Remove some tests no longer required
because they have already been checked in Account::CreateOperation.
* server/Account.cpp: Move character creation logging to a place
where the information is easier to get to.
* server/Connection.cpp: Add logging of taking existing character.
* common/log.h, common/log.cpp: Add logging function for logging
regular server activity, for statistics purposes, to a file.
* server/Account.cpp, server/Connection.cpp, server/server.cpp:
Add log calls to recall typical events.
* tools/cycmd.cpp: Set a name on the admin agent avatar.
* client/BaseClient.cpp, common/BaseWorld.cpp, common/id.cpp,
common/id.h, rulesets/MemMap.cpp, server/Account.cpp,
server/Admin.cpp, server/Connection.cpp, server/Persistance.cpp,
server/Restoration.cpp, server/WorldRouter.cpp, server/server.cpp:
Add intgerId() function to convert ID strings to integers, and
check the conversion went okay.
* common/types.h, server/Persistance.h, common/BaseWorld.h,
common/BaseWorld.cpp, server/WorldRouter.cpp:
Switch core world map to reference by integer ID rather than string.
Add version of getEntity() which converts from string to integer
automatically.
* rulesets/Character.cpp, rulesets/Thing.cpp, rulesets/World.cpp,
server/EntityFactory.cpp,
Use getEntity() when looking up an entity, so that conversion of
ID from string to integer is automatic.
* rulesets/BaseMind.cpp, rulesets/MemMap.cpp, rulesets/MemMap.h:
Switch to using integer IDs in MemMap's core mapping.
* server/Account.cpp, server/Account.h: Switch a few function
parameters to use integer ID values, making the code cleaner.
* server/Account.cpp, server/Admin.cpp, server/Persistance.cpp:
Handle string ID to integer conversions as required.
* 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.
* common/inheritance.h: Set the correct objtype on the Root meta class.
* rulesets/Character.cpp, rulesets/Food.cpp, rulesets/Plant.cpp,
rulesets/Stackable.cpp, rulesets/Thing.cpp, server/Account.cpp,
server/Admin.cpp, server/Connection.cpp, tools/AdminClient.cpp,
tools/cycmd.cpp: Switch to renamed copyAttr() method from
Atlas-C++.
* server/Account.cpp, rulesets/Thing.cpp, rulesets/Character.cpp:
Replace asserts with proper checks that arguments are of the
expected type.
* common/custom.cpp: Put ignite op installation back in.
* server/Account.cpp, server/Admin.cpp, server/CommClient.cpp,
server/Connection.cpp: Don't set refno on unicast OOG ops,
instead set them at the interface with the client in one
place.
* server/WorldRouter.cpp: Modify setting refno on IG ops so its
now only set on unicast responses.
* rulesets/Creator.cpp: Set refno on responses direct ops from creator
clients more manually.
* common/BaseEntity.cpp: Only set refno on unicast error ops.
* common/refno.h: Disable as this file is no longer used.
* rulesets/Thing.cpp: Remove obsolete commented out code.
* server/Account.cpp, server/Connection.cpp:
Add a note about serialno/refno handling when code sends ops
directly to the client.
* server/CommClient.cpp, server/CommClient.h: Clean up some debug
code, and method names.
* server/Lobby.cpp: Fix a case where a private message would fail
silently if account had logged on recenlty but was no longer.
* server/Account.cpp: Improve checks to make sure account is connected
when processing ops.
* server/Admin.cpp: Improve logout op handling so its cleaner, and
improve a couple of variable names.
* 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.
* common/BaseWorld.h, rulesets/Entity.h, rulesets/MemMap.cpp,
server/Account.cpp, server/WorldRouter.cpp, server/WorldRouter.h:
Use reference count functions to handle deleting entities.
Modify main op queue to hold a reference to the entity the op
is from. Fix up arg naming conventions in WorldRouter.
* common/BaseEntity.cpp, common/BaseWorld.h, common/refno.h,
common/serialno.h, rulesets/Character.cpp, rulesets/Creator.cpp,
rulesets/World.h, server/Account.cpp, server/Admin.cpp,
server/Connection.cpp, server/Lobby.cpp, server/ServerRouting.h,
server/WorldRouter.cpp, server/WorldRouter.h, tests/Creatortest.cpp,
tests/Worldtest.cpp: Simplify the way operation refnos and serialnos
are handled, getting rid of some unnecessary virtual methods and
functions.
* common/utility.cpp: Add a FIXME note about more correctly
converting a message to an op.
* server/CommClient.h, server/CommClient.cpp: Call new shutdown()
method in skstream instead of close when disconnecting or
timing out, so that the socket is still valid. Otherwise
there is no reliable way to detect that the socket is no longer
connected.
* server/CommClient.h, server/CommClient.cpp, server/Account.cpp,
server/Connection.h, server/Connection.cpp: Rename close() to
disconect() to more accuratly reflect its function.
* server/CommServer.h, server/CommServer.cpp: Add an implementation
based on epoll which is used if available. Much more efficient
and scalable.
* tools/cycmd.cpp: Fix a couple of memory leaks.
* rulesets/Character.cpp: Clarify error message on tool use.
* rulesets/Thing.cpp: Allow setting of mode attribute from args
of move op for efficiency.
* server/Player.cpp, server/Admin.cpp, server/Player.cpp:
Add TO to all accounts at the account level, so the client
can tell they are for the account.
* rulesets/Character.cpp, server/Account.cpp:
Add serialno assignments to character inventory creation ops,
and ops from builtin mind.
* server/WorldRouter.cpp: Remove an obsolete comment.
* rulesets/Character.cpp: Check if a Setup op is for the mind
before dispatching to script, and ensure that Appearance
is always broadcast.
* server/Account.cpp: No need to broadcase sight(create) when a
character is created by an account.
* common/BaseEntity.h, common/OOGThing.h, rulesets/Area.h,
rulesets/BaseMind.h, rulesets/Entity.h, rulesets/Food.h,
rulesets/Line.h, rulesets/MemEntity.h, rulesets/Missile.h,
rulesets/Plant.h, rulesets/Stackable.h, rulesets/Structure.h,
rulesets/Thing.h, rulesets/World.h, server/Account.h,
server/Connection.h, server/Lobby.h: Update the comments describing
the function of these classes.
* rulesets/Character.h, server/Account.cpp, server/Connection.cpp,
server/ExternalMind.cpp, server/ExternalMind.h: Make ExternalMind
inherit from BaseEntity, eliminating the need for the name argument
to the constructor and simplifying the class greatly by dropping
loads of unused inherited functionality.
* common/BaseWorld.h, server/CommSocket.h, server/CommIdleSocket.h:
Make constructors of some base classes protected.
* server/Account.cpp: Note a possible bug in the character
creation code.
* server/CommIdleSocket.cpp, server/CommIdleSocket.h,
server/CommListener.cpp, server/CommListener.h,
server/CommLocalClient.cpp, server/CommMetaClient.cpp,
server/CommMetaClient.h, server/CommPSQLSocket.cpp,
server/CommPSQLSocket.h, server/CommRemoteClient.cpp,
server/CommSocket.cpp, server/CommSocket.h,
server/CommUnixListener.cpp, server/CommUnixListener.h:
Clean up the Comm classes for consistancy and readability.