Commit graph

8152 commits

Author SHA1 Message Date
Erik Ogenvik
ce3d82329a Handle "extragoal". 2018-12-20 14:51:25 +01:00
Erik Ogenvik
3d6abf574b Check for null. 2018-12-20 14:50:39 +01:00
Erik Ogenvik
81d19d35fa Wait with creating script until entity resolved. 2018-12-20 14:50:11 +01:00
Erik Ogenvik
0e2841db2a Chicken pecks by default. 2018-12-19 23:18:55 +01:00
Erik Ogenvik
55275c74dc Handle type data in MemEntities in the ai client. 2018-12-19 23:17:50 +01:00
Erik Ogenvik
8b28566e77 Get private type information by default. 2018-12-19 23:17:15 +01:00
Erik Ogenvik
373e8c4731 Automatically add "origin" location.
This is where the entity if first created. Useful for goals.
2018-12-18 23:42:55 +01:00
Erik Ogenvik
c47a62f9ff Warn when wrapping null entity.
This should never happen.
2018-12-18 23:42:28 +01:00
Erik Ogenvik
1be96de686 Print entity description on errors. 2018-12-18 23:41:38 +01:00
Erik Ogenvik
3ab981dcc1 Allow for checking if a map contains key. 2018-12-18 23:39:17 +01:00
Erik Ogenvik
80afd7ce96 Supply default value when modifying. 2018-12-18 23:38:31 +01:00
Erik Ogenvik
fce82e6bbd Fixed bug with relays. 2018-12-18 12:35:42 +01:00
Erik Ogenvik
278ab64dc1 Clean up goals code. 2018-12-18 12:35:34 +01:00
Erik Ogenvik
ceb2277a8e Add the new goal as a subgoal.
This changes how the dynamic goals behave, by instead adding them as
subgoals to the dynamic goal itself.
One reason is that we want to sync the _goals property with the actual
goals.
2018-12-18 11:40:01 +01:00
Erik Ogenvik
49c071c702 Handle knowledge in "_knowledge" property.
Although this might be changed going forward. Perhaps we should store
mind data in a separate object, separated from the physical entity
instead.
2018-12-17 21:26:17 +01:00
Erik Ogenvik
60c262b1cb Allow better iteration of maps and lists.
And also expose the get_prop_* and has_prop_* methods.
2018-12-17 21:18:53 +01:00
Erik Ogenvik
97229afd95 Make things deletable when status is zero. 2018-12-17 14:15:40 +01:00
Erik Ogenvik
7219d4fd44 Handle element map and lists. 2018-12-17 14:15:30 +01:00
Erik Ogenvik
df88332a09 Fixed a couple of smaller bugs. 2018-12-16 23:42:13 +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
a10de0db7d Expose root object as Python class.
To make it possible to always call get_name on a sub operation.
2018-12-16 22:08:51 +01:00
Erik Ogenvik
2eeab96efa Separate BBox property from Density property. 2018-12-16 20:40:48 +01:00
Erik Ogenvik
e1ab2f5f85 Handle native Python types instead of Message.
When handling properties and attributes in the Python code we now use
native types, together with ElementMap and ElementList.
2018-12-16 17:31:35 +01:00
Erik Ogenvik
c70085fd60 Return zero length for invalid vector. 2018-12-16 11:43:29 +01:00
Erik Ogenvik
48b4c5775a Removed obsolete files. 2018-11-03 20:43:34 +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
62c644b8c5 Don't use Inheritance in mind code.
Instead use the TypeStore. This also alters how filters are used.
2018-10-21 20:40:50 +02:00
Erik Ogenvik
35677a9904 Use a simpler type store for the client.
We only use the Inheritance class for the server.
2018-10-15 22:06:53 +02:00
Erik Ogenvik
05cad0c525 Initial work on new goals handling.
The goals are defined through the "_goals" property.
2018-10-15 17:46:45 +02:00
Erik Ogenvik
ca80d2602a Fix tests. 2018-10-15 17:40:35 +02:00
Erik Ogenvik
bfc4e18b29 Improve Python types. 2018-10-15 17:40:08 +02:00
Erik Ogenvik
3fe05cd2f3 Conform to c++ names. 2018-10-15 17:39:29 +02:00
Erik Ogenvik
c5f74d17aa Make types lookups dynamic.
So they work on unknown types.
2018-10-15 17:38:38 +02:00
Erik Ogenvik
f08267a786 Handle steering being null. 2018-10-15 17:37:22 +02:00
Erik Ogenvik
2c334b0960 Improve error messages. 2018-10-15 17:36:38 +02:00
Erik Ogenvik
a43120ab29 Conform to PEP8. 2018-10-11 23:02:05 +02:00
Erik Ogenvik
22a8288013 Conform to PEP8. 2018-10-11 22:42:59 +02: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
939dd93678 Adapt to changed API. 2018-10-11 22:35:00 +02:00
Erik Ogenvik
f8c7230891 Call hooks when new script is assigned. 2018-10-11 22:35:00 +02:00
Erik Ogenvik
4e3ad7d292 Don't send orientation if stopping. 2018-10-11 22:35:00 +02:00
Erik Ogenvik
31e3e7cf96 Properly set up move ticks. 2018-10-11 22:35:00 +02:00
Erik Ogenvik
9166c109a9 Allow iteration over lists.
Perhaps we should add methods for checking type?
2018-10-11 22:35:00 +02:00