Erik Ogenvik
80afd7ce96
Supply default value when modifying.
2018-12-18 23:38:31 +01:00
Erik Ogenvik
b509b8b11d
Don't load server rules in client.
2018-12-16 23:20:33 +01:00
Erik Ogenvik
02afb7fb73
Fixed Location imports.
2018-12-16 22:51:36 +01:00
Erik Ogenvik
2eeab96efa
Separate BBox property from Density property.
2018-12-16 20:40:48 +01:00
Erik Ogenvik
164816f646
Adapt tests to changed structure.
2018-11-03 17:17:50 +01:00
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
038437bcaf
Escape ' characters for SQLite.
2018-10-30 19:50:09 +01:00
Erik Ogenvik
f87233cd53
Clean up code.
2018-10-30 19:35:57 +01:00
Erik Ogenvik
d39a1a461a
Fixed incorrect signature.
2018-10-29 21:38:19 +01:00
Erik Ogenvik
e0b45800ef
Fix broken tests.
2018-10-29 21:11:23 +01:00
Erik Ogenvik
dd22925d31
Load any user supplied files at startup.
...
At startup any python file contained in
~/.local/share/cyphesis/cyphesis.d or ~/.local/share/cyphesis/cyaiclient.d are executed.
This provides a method by which for example debugging can be setup.
2018-10-11 22:35:00 +02:00
Erik Ogenvik
92f44c0df2
Fixed issue with admin property.
...
Needs to be is_admin to not collide with "admin" type.
2018-10-06 13:42:06 +02:00
Erik Ogenvik
31dda13acb
Remove minds when deleted.
2018-10-03 22:26:54 +02:00
Erik Ogenvik
86f4820a38
Refactor aiclient main loop.
...
We now use a totally boost::asio based loop. As a result the client
now plays along with other asio based components. Other clients are
broken currently though, needs to be fixed.
2018-09-25 23:30:03 +02:00
Erik Ogenvik
6459ae4818
Separate main loop code into own class.
...
To be shared between server and client.
2018-09-22 23:11:22 +02:00
Erik Ogenvik
b9ee7e850f
Initial work adapting ai client for new protocol.
2018-09-16 20:52:16 +02:00
Erik Ogenvik
d3e45c6d27
Register both usaged and _usages.
2018-09-08 21:50:53 +02:00
Erik Ogenvik
599095bfd4
Improve handling of visibility for types.
2018-08-19 17:15:30 +02:00
Erik Ogenvik
7e064963c6
Remove Plant and replace it with scripts.
2018-08-19 00:00:46 +02:00
Erik Ogenvik
139d229f80
Sync Python method names with C++.
2018-08-17 22:04:07 +02:00
Erik Ogenvik
048e68d7ac
Removed implicit conversion to bool.
2018-08-14 22:31:50 +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
bc6d15ee74
Remove outfit property.
...
This is now handled by the AttachmentsProperty.
2018-08-14 22:05:51 +02:00
Erik Ogenvik
127793e8a2
Implement an "attachments" property.
...
This is put on entities that can have other entities attached to them.
With this property both "right_hand_wield" and "outfit" are deprecated.
2018-08-14 21:32:06 +02:00
Erik Ogenvik
cf29a1607d
Improve logging.
2018-08-11 23:25:38 +02:00
Erik Ogenvik
87cec626d3
Update creatures for new metabolizing system.
2018-08-11 20:19:07 +02:00
Erik Ogenvik
983e9d4e0f
Don't broadcast all ops.
2018-08-11 15:23:09 +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
a12b1a00a3
Delete when refs go to zero.
...
This changes how entities are dereferenced to work more like you would
expect.
2018-08-05 14:36:21 +02:00
Erik Ogenvik
a95cb467a2
Use std::move where possible.
2018-08-04 18:01:20 +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
7634969eef
Removed TaskFactory classes.
...
Since we always create Tasks from scripts.
Also fixed a lot of tests.
2018-08-04 18:01:20 +02:00
Erik Ogenvik
3f534b0b4a
Use a Map for the Tasks property.
2018-08-04 18:01:20 +02:00
Erik Ogenvik
f895054d68
Make scripts private.
2018-08-04 18:01:20 +02:00
Erik Ogenvik
200494e70f
Tie Tasks to Usage.
...
So that it's easy to verify that a Task is still valid.
2018-08-01 22:23:28 +02:00
Erik Ogenvik
3b19555fd7
Don't use hyphens in property names.
2018-07-30 13:35:51 +02:00
Erik Ogenvik
092d122be2
Separate flags into own class.
...
Also allow broadcast to respect visibility.
2018-07-30 13:07:43 +02:00
Erik Ogenvik
712fd7a741
Introduce protected and private properties.
...
This is defined by the naming of the property.
Properties that starts with "__" are private. Only visible to the
simulation and admins.
Properties that starts with "_" are protected. Like private but also
visible to the owning entity.
All other are public.
2018-07-30 10:24:33 +02:00
Erik Ogenvik
3e61f57bd0
Better log output.
2018-07-30 10:22:43 +02:00
Erik Ogenvik
8842d65e08
Implement cool downs.
2018-07-29 23:20:42 +02:00