Commit graph

24 commits

Author SHA1 Message Date
Erik Ogenvik
8e24cbe413 Check mind existance through script and lang. 2015-05-24 11:25:07 +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
079b751bfc Don't request possession if no mind prop data. 2015-05-24 11:25:07 +02:00
Erik Ogenvik
ad4a65aaef Improve handling of already managed minds.
Though we need to alter the way the MindProperty requests possessions,
as we don't want to generate possession requests for anything that's
handled by a client anyway. Problem right now is that we won't know that
at the time of MindProperty being applied.
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
0c3aa34f2d For now just disable server minds.
What we want is instead some kind of "mind managing" instance which
keeps track of the thoughts sent to the entity, and makes sure that any
new mind gets these thoughts (so that it's possible to send thoughts to
entities which haven't yet had any minds attached to them).
2015-05-24 11:25:06 +02:00
Erik Ogenvik
715f099cea Request possession when mind is created. 2015-05-24 11:25:06 +02:00
Erik Ogenvik
6ef799c485 Allow all minds to be possessed. 2015-05-24 11:25:06 +02:00
Erik Ogenvik
4f771383e8 Expose mind properties.
So that authoring tools can recognize entities with minds.
This should of course not be sent to regular entities in SIGHT
operations, but that should be handled with the attribute visibility
feature (yet to be written) instead.
2013-11-11 20:23:34 +01:00
Erik Ogenvik
936c82b67e Prevent duplicate deletion of BaseMind instance.
If a Sight of a Delete operation of the BaseMind was received (i.e. the
character was deleted) it would result in the instance being deleted
twice. Avoid this by increasing the reference count by one.
2013-09-13 21:07:58 +02:00
Erik Ogenvik
efada4d5ea Only send thoughts to entities with minds. 2013-08-22 10:43:03 +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
Alistair Riddoch
09547422d6 Fix a memory leak in MindProperty 2013-01-28 13:17:23 +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
72c956d4b4 First pass at copy method for all property classes 2013-01-07 23:03:25 +00:00
Alistair Riddoch
1e7515bbd0 Remove a bunch of debug output 2011-12-16 16:49:35 +00:00
Alistair Riddoch
95cddcf243 Correctly ensure new mind has a type 2011-12-16 13:22:57 +00:00
Alistair Riddoch
610f575841 Cleanly return if the entity is not supposed to have a mind 2011-12-16 13:14:18 +00:00
Alistair Riddoch
a6ff04a36b Add stub integration test for MindProperty 2011-12-16 09:20:30 +00:00
Alistair Riddoch
b870f08592 Initialize member pointer 2011-12-15 20:10:57 +00:00
Alistair Riddoch
5a2c7b6d14 Add in the mind abstract functionaltiy, and use the new factory mechanism 2011-12-15 19:22:35 +00:00
Alistair Riddoch
be735604b3 Move mind creation to the property
Also clean up factory, make more flexible and use shared script factory
code.
2011-12-15 18:33:32 +00:00
Al Riddoch
81d192d891 2008-09-12 Al Riddoch <alriddoch@googlemail.com>
* rulesets/MindProperty.cpp, rulesets/MindProperty.h: Implement
	  adding a mind to a character entity when the property
	  is applied.
2008-09-12 13:59:09 +00:00
Al Riddoch
aa2651f0a8 2008-09-10 Al Riddoch <alriddoch@googlemail.com>
* rulesets/MindProperty.cpp, rulesets/MindProperty.h: A new
	  property class which will add a mind to an entity.
2008-09-10 14:12:04 +00:00