Commit graph

417 commits

Author SHA1 Message Date
Erik Ogenvik
773586f431 Provide an axis rotation fallback.
If the vectors are colinear.
2015-10-30 22:53:13 +01:00
Erik Ogenvik
3b70e9c3cb Regularly persist thoughts to database.
Instead as before only persisting at shutdown.
2015-05-26 22:27:39 +02:00
Erik Ogenvik
12ed15aa98 Allow Think ops from the mind. 2015-05-26 22:22:43 +02:00
Erik Ogenvik
5c5fca2d24 Rewrote how minds are interacted with.
Instead of using separate Commune and Think goals depending on
whether we're querying for or setting thoughts we now instead solely use
the Think op. This op wraps another op, which is then used to determine
what to do. The ops that are supported are: Set, Get, Delete and Look

Think(Set): sets new thoughts and updates existing ones, if an id is
supplied.
Think(Get): get all or specific thoughts (replaces Commune)
Think(Look): inspects a specific goal
Think(Delete): deletes all or a specific thoughts (i.e. both goals and
knowledge)
2015-05-24 11:25:08 +02:00
Erik Ogenvik
6bf5968fc8 Don't send relay ops to the proxy mind.
Instead send them only to the external mind.
2015-05-24 11:25:08 +02:00
Erik Ogenvik
1c55479467 Use new Thought and Commune ops. 2015-05-24 11:25:08 +02:00
Erik Ogenvik
c1f11be525 Make sure proxy mind is retained. 2015-05-24 11:25:08 +02:00
Erik Ogenvik
cbef9864ee Use a proxy mind on character.
This is a mind which only registers the world, and then is responsible
to send what it knows about the world to any external mind that's
connected to the character.

Currently it only sends the thoughts that's been sent to the character.
2015-05-24 11:25:07 +02:00
Erik Ogenvik
945a2dd3fe Improve external minds management.
We now register a an external mind with the ExternalMindsManager and
then let the manager make sure that there's an external mind connected.
When the external client is disconnected the manager will try to find a
new client to handle the mind.
2015-05-24 11:25:07 +02:00
Erik Ogenvik
707285bb31 Make flow more canonical. 2015-05-24 11:25:06 +02:00
Erik Ogenvik
e721e43068 Filter the results from the mind.
The result op needs to be filtered; they can't be sent to the world
directly.
2014-09-24 22:00:04 +02:00
Erik Ogenvik
9433992096 Initial work on putting entities in limbo.
The idea is that entities which aren't externally controlled at the
moment of death are put in limbo. Once they become externally controlled
again (i.e. the user logs in) they are respawned. This ought to fix the
issue with the graveyard being full of abandoned characters.
2014-09-18 21:45:35 +02:00
Erik Ogenvik
419c547930 Various housekeeping tasks. 2014-09-18 21:45:35 +02:00
Erik Ogenvik
0419d43e70 Look ops without args should go to location. 2014-09-15 21:11:35 +02:00
Erik Ogenvik
3b295ca0a1 Added concept of a default entity.
Instead of the root entity always being the default one (for new
entities being created etc.) we now can specify another entity which is
the default one.
2014-08-27 22:17:09 +02:00
Erik Ogenvik
4d3baa3d06 Added missing calls to Property::apply.
Else the changes won't take effect.
2014-01-19 22:46:45 +01:00
Erik Ogenvik
cb66644160 Fix segfault.
If a character a wielded an entity b, and then was destroyed, and then b
was re-containered, it would result in segfault due to a lingering
connection. This fixes it, but it's a temporary fix until we've
transferred to using "outfit" for wielding.
2013-10-25 16:39:00 +02:00
Erik Ogenvik
2c2ac52f54 Enable relayed ops for all entities.
When a relayed op is sent to an entity it's handled like any other
operation. As a relayed response a Sight of the original operation is
sent back.
2013-09-03 14:09:13 +02:00
Erik Ogenvik
37929e7ec6 Fixed incorrect refno setting. 2013-08-22 20:32:58 +02:00
Erik Ogenvik
a0227fa1de Set relay timeout to five seconds.
That ought to be enough.
2013-08-21 20:55:14 +02:00
Erik Ogenvik
cb238bd5b3 Added a relay mechanism for operations.
The relay mechanism, through the new internal Relay operation, allows
one external client to relay an operation to another external client,
and get the response back.
This can currently only be used by Creator clients. It's main use is for
mind introspection.
2013-08-16 00:03:09 +02:00
Olek Wojnar
7f9ff2246d Remove CVS $Id tags
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Erik Ogenvik
835b9fadd6 Alter containered signal.
Make it not single shot. And supply the old location, as it was before
the container changed.
This is to make it more useful in general.
2013-06-15 22:53:50 +02:00
Erik Ogenvik
46df7fdaae Provide better error messages. 2013-06-01 23:17:16 +02:00
Erik Ogenvik
9beee13a21 Send thoughts as "Thought" op.
Instead of wrapping it in a "Set" op. This is more idiomatic.
2013-04-13 23:25:16 +02:00
Alistair Riddoch
21ed4a778f Remove unused variable 2013-03-03 14:00:56 +00:00
Alistair Riddoch
e9cb84388a Stop using OpNo here too 2013-02-28 15:39:59 +00:00
Alistair Riddoch
4a9c7078f7 Refactor to use LocatedEntity as base class
All IG code should use the interface of LocatedEntity when dealing
with any entity, rather than sometimes requiring Entity. Add virtual
functions to the interface where required, and modify all other interfaces
to stop them using Entity. This makes the code way cleaner, and much better
de-coupled.
2013-01-17 10:17:07 +00:00
Alistair Riddoch
0f627d4e71 Rename methods to be more generic. 2012-12-05 09:45:16 +00:00
Alistair Riddoch
73b81a6ff7 Remove Character_parent typedef 2012-12-04 23:39:22 +00:00
Alistair Riddoch
16cab73889 Move the character hookup code into Character
It's way more efficient there.
2012-12-04 21:19:34 +00:00
Alistair Riddoch
71cbcdcfc1 Modify externalOperation to include Link
The Link reference provided is the object allowing direct communication
back to the external source of the operation. This allows us to handle
things more cleanly in some cases.
2012-12-04 20:39:35 +00:00
Alistair Riddoch
56173f3ffe Add filterExternalOperation to avoid externalOperation
externalOperation should only be called from code getting operations from
the outside world.
2012-12-03 15:37:40 +00:00
Alistair Riddoch
387de43138 Remove obsolete error message. 2012-11-29 23:06:34 +00:00
Alistair Riddoch
b9f1ed6d9f Avoid a check when it is not required 2012-11-27 23:45:49 +00:00
Alistair Riddoch
442643db48 Report different error if character is linked to something else 2012-11-27 19:22:11 +00:00
Alistair Riddoch
6057d60ff7 Add a return code to (un)linkExternalMind calls 2012-11-27 10:15:45 +00:00
Alistair Riddoch
a1dccd4767 Add a new method to handle unlinked a character 2012-11-26 21:23:33 +00:00
Alistair Riddoch
b8f46401b3 Add Character method to link avatar to client 2012-11-26 00:21:40 +00:00
Alistair Riddoch
b9a2667e35 Change m_externalMind to ExternalMind
This gets rid of the need for dynamic casts, and makes code cleaner.
2012-11-24 16:36:37 +00:00
Alistair Riddoch
50046bc649 Remove useless warning 2012-07-02 23:37:31 -07:00
Alistair Riddoch
c6a9be99de Pass info ops to the task if there is one 2012-07-02 23:36:20 -07:00
Alistair Riddoch
558301a836 Add an Info handler to Character 2012-07-02 20:05:18 -07:00
Alistair Riddoch
8a64641b6d Remove unnecessary conditionals 2012-05-14 15:41:37 +01:00
Alistair Riddoch
68bd0c6e25 Refactor TaskFactory for more flexible activation matching
We can now match the target based on different critea by configuring the
factory to do different checks
2011-12-06 10:07:25 +00:00
Alistair Riddoch
c13ccca0b3 Remove obsolete includes 2011-12-02 03:35:00 +00:00
Alistair Riddoch
7025431b94 Clean up startup logic, and fix error
The code was not previously sending out the Sight(Action) op, as it was
returning after task startup
2011-12-02 03:25:42 +00:00
Alistair Riddoch
111581e56a Remove obsolete m_task in Character
This pointer is made obsolete now that TasksProperty holds it
2011-12-02 02:37:42 +00:00
Alistair Riddoch
6269203f68 Remove reference to m_task 2011-12-02 01:25:13 +00:00
Alistair Riddoch
bdf3de3cd6 Cut down direct use of m_task 2011-11-30 18:52:29 +00:00