Commit graph

241 commits

Author SHA1 Message Date
Erik Ogenvik
e85f0831b2 Restructure rule classes.
Classes under "rulesets" have been moved to "rules", and split up into
futher subdirectories matching their library. As a result we can now
better separate the python bindings, so that things that belongs to the
simulation are separeted from things that belongs to the ai.
2018-10-31 21:38:35 +01:00
Erik Ogenvik
800d6f3d2c Put operations in separate directory. 2018-10-30 20:12:45 +01:00
Erik Ogenvik
e0b45800ef Fix broken tests. 2018-10-29 21:11:23 +01:00
Erik Ogenvik
31dda13acb Remove minds when deleted. 2018-10-03 22:26:54 +02:00
Erik Ogenvik
b9ee7e850f Initial work adapting ai client for new protocol. 2018-09-16 20:52:16 +02:00
Erik Ogenvik
6a3ec31b7e Remove Character class.
This is crucial since it now means that any entity can be controlled by
a mind. This makes the world much more versatile.
2018-08-14 22:25:56 +02:00
Erik Ogenvik
d567141071 Reimplement Relay functionality.
The main change is that the client now sends and received Relay ops.
This will make things much safer, since it's no longer up to the client
to check that any received normal operation is relayed. Instead it just
has to check for Relay ops and handle them separately.
2018-08-11 09:38:52 +02:00
Erik Ogenvik
ddab8046de Work on removing Character. 2018-08-09 21:30:10 +02:00
Erik Ogenvik
0592987f84 Remove Creator and add AdminMind.
The mind is instead responsible for allowing extra editing capabilities.
This makes the entity hierarchy smaller.
2018-08-08 22:27:43 +02:00
Erik Ogenvik
d744ae4660 Removed "playable" concept.
The only way to create entities in a world is to create spawn points for
them.
2018-08-08 20:55:48 +02:00
Erik Ogenvik
803fe96949 Handle connection shut down better. 2018-08-08 16:41:16 +02:00
Erik Ogenvik
fbf50d9974 Fixed logout process. 2018-08-08 15:42:45 +02:00
Erik Ogenvik
1f4af43fd3 Refactor handling of minds. 2018-08-07 23:19:16 +02:00
Erik Ogenvik
c771163071 Started moving minds code into Minds property. 2018-08-07 20:33:51 +02:00
Erik Ogenvik
147e353aa4 Refactor possession and thoughts.
* A character is no "taken" by sending a Possess op.
* External minds communicate with the entity through Thought ops. These
can be intercepted by scripts etc.

This would allow scripts to intercept thoughts from the mind, and act on
them. Another goal is to allow for an account to possess multiple
entities.
For example an admin account which would be able to possess other
entities. Or just to have it part of the gameplay.
2018-08-06 21:07:31 +02:00
Erik Ogenvik
c84f5fe926 Don't implicitly convert from Ref to ptr.
Since it's too easy to introduce subtle bugs.
2018-08-05 20:47:09 +02:00
Erik Ogenvik
04fe84821e Use proper singletons everywhere.
I.e. ones where the lifespan is fully controlled.
The only exception is Options, since it's accessed during static
initialization.
2018-08-04 18:01:20 +02:00
Erik Ogenvik
3e61f57bd0 Better log output. 2018-07-30 10:22:43 +02:00
Erik Ogenvik
4d1dc775b0 Moved BaseWorld to rulesets.
Since it better belongs there.
2018-07-25 00:16:09 +02:00
Erik Ogenvik
86318d5f6e Make database persistence standard.
We now use sqlite to persist the world by default.
Postgresql support is provided as an option.
2018-05-19 23:33:58 +02:00
Erik Ogenvik
66baf9c9dc Stor all rules as files only.
We should only store entities and accounts in the database.
2018-05-16 11:22:09 +02:00
Erik Ogenvik
705b691ff5 Make "Account::operation" send directly to link. 2018-04-25 21:05:59 +02:00
Erik Ogenvik
b77dc19d92 Allow sex to be set when creating character. 2018-02-20 22:26:27 +01:00
Erik Ogenvik
1e95d956b9 Player characters should never be AI controlled. 2018-02-08 21:47:22 +01:00
Erik Ogenvik
6508097306 Use C++ string converters, and clean up code. 2018-02-08 21:47:22 +01:00
Erik Ogenvik
7127d39f13 More work on moving to left hand coord system. 2018-02-06 13:45:10 +01:00
Erik Ogenvik
0286bcd47d Replace "parents" with "parent". 2017-07-24 15:05:18 +02:00
Erik Ogenvik
7aaa9b9ba7 Optimize includes. 2017-03-19 21:36:52 +01:00
Erik Ogenvik
ef0b2228a4 Provide batch send method.
Which flushes the socket after all ops have been serializes.
2016-12-15 18:27:42 +01: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
5f4923e456 Provide better log output. 2015-05-24 11:25:06 +02:00
Erik Ogenvik
f8932858fd Enable aiclient.
The idea is that the aiclient runs in a separate process and handles all
AI functionality.
This is done by having a "possession" client which recieves possession
requests from the server, and spawns new AI clients for each request.
2015-05-24 11:25:06 +02:00
Erik Ogenvik
f5dae1fba7 Rename Teleport* to Possess*
So that the functionality can be used in more general situations.
2015-05-24 11:25:06 +02:00
Erik Ogenvik
6bcfcb2c11 Moved spawn filtering to Account. 2014-01-24 12:29:25 +01:00
Erik Ogenvik
46c4b2c8bf Allow for admins to create any entity in spawns.
This is useful when an admin character want to enter the world near a
common spawn (rather at the default origo).
2014-01-23 22:21:36 +01:00
Erik Ogenvik
f5dccec387 Move initial status to archetype.
Rather than having it hard coded. Makes it more flexible.
2014-01-23 22:20:58 +01: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
91d3cf60c2 Enable persistence of account entities.
This is now on by default whenever the persistence is also enabled. It's
not clear why it wasn't on before though.
As a result Account has also been changed to be able to report whether
it should be persisted or not.
2013-06-25 21:42:24 +02:00
Alistair Riddoch
e9cb84388a Stop using OpNo here too 2013-02-28 15:39:59 +00:00
Alistair Riddoch
e89ae282f6 Stop using OpNo typedef 2013-02-28 15:27:54 +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
f920bdb919 Fix up return values for characterError 2012-12-11 08:47:45 +00:00
Alistair Riddoch
0f627d4e71 Rename methods to be more generic. 2012-12-05 09:45:16 +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
d463b861af Replace connectAvatar entirely with linkExternalMind 2012-11-26 00:35:55 +00:00
Alistair Riddoch
e7d238e91f Move ExternalMind into rulesets 2012-11-23 16:11:21 +00:00
Alistair Riddoch
bbaa8c3f2a Route Connectable ops through externalOperation 2012-11-19 13:42:03 +00:00
Alistair Riddoch
23ebd9d6f5 Add externalOperation to the Router interface 2012-11-19 13:42:02 +00:00
Alistair Riddoch
6998d59ecd Rename ConnectedRouter to ConnectableRouter
Objects using this base class are all long lived, so while they are
often associated with a connection, they most commonly will outlive
that connection, and be unconnected.
2012-11-13 00:09:05 +00:00
Alistair Riddoch
9002f599e1 Set IDs to the right type
The ids (which are numeric) were being added as integers, but Atlas
uses string representations of numbers.
2012-09-13 15:28:28 +01:00