Commit graph

437 commits

Author SHA1 Message Date
Erik Ogenvik
664988645e Make all properties define type and optional name. 2018-04-27 23:12:15 +02:00
Erik Ogenvik
d7900bebfb Added property for perception of sights.
Instead of having it determined by sending looks ops.
It's a float value since there's a possibility to apply is as a factor
of the default view distance.
2018-04-25 20:15:28 +02:00
Erik Ogenvik
c23b322ead Use "add" and "remove" for flags.
Since it's more descriptive.
2018-04-25 20:15:28 +02:00
Erik Ogenvik
197c373402 Moved to more correct place. 2018-04-21 10:02:08 +02:00
Erik Ogenvik
ca2abb94b5 Refactor how movement is handled and sent.
We've introduced the properties "speed-ground", "speed-water" and
"speed-flight" which specifies the top speed in m/s for each medium.

The "propel" attribute is now normalized, since it's multiplied with the
applicable top speed (depending on the medium, although currently we
only use the ground speed, TODO).
2018-02-11 23:22:20 +01:00
Erik Ogenvik
a3560c817f Use "propel" property for movement.
Clients shouldn't set the "velocity", instead setting the "propel"
property.
2018-02-11 21:15:35 +01:00
Erik Ogenvik
6508097306 Use C++ string converters, and clean up code. 2018-02-08 21:47:22 +01:00
Erik Ogenvik
e7fa53214b Use nullptr instead of NULL. 2018-02-06 13:45:11 +01:00
Erik Ogenvik
4d530e25e4 Move domain property Entity.
And rename and fixup smaller things.
2017-07-25 23:40:39 +02:00
Erik Ogenvik
0286bcd47d Replace "parents" with "parent". 2017-07-24 15:05:18 +02:00
Erik Ogenvik
6e6fe3b9b6 Handle (dis)appear ops when moving between locs. 2017-06-27 21:06:07 +02:00
Erik Ogenvik
b2f6291c8b Make Delete op more correct. 2017-06-03 19:50:46 +02:00
Erik Ogenvik
7aaa9b9ba7 Optimize includes. 2017-03-19 21:36:52 +01:00
Erik Ogenvik
17e9d4b695 Don't send on pos.
Since this is used by entities to move themselves to a position.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
8bea81fa21 Toggle perception in domain when it changes.
Though for now we'll never remove it once an entity becomes perceptive.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
894a8389b0 Added signal emitted when property is updated.
Used to let other components listen to properties being altered.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
d056a48513 Only send changed props in Move ops. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
380d93ade6 Remove transient entities when disconnecting.
These are entities such as creators and admin agent which
should be removed when not being used.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
5754a5dfa1 Initial work on Bullet powered physical domains. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
2d644311cc Describe entities better in log messages. 2016-06-08 21:46:37 +02:00
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