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
e0b45800ef
Fix broken tests.
2018-10-29 21:11:23 +01:00
Erik Ogenvik
3b091899c1
Work on fixing the tests.
2018-10-01 23:22:28 +02:00
Erik Ogenvik
7e064963c6
Remove Plant and replace it with scripts.
2018-08-19 00:00:46 +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
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
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
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
c296e401bf
Removed visibility from properties.
...
This is instead governed by the property name, with names starting with
"__" private and "_" protected.
2018-07-30 13:24:52 +02:00
Erik Ogenvik
33dfbb3425
Added tests.
2018-07-24 21:18:50 +02:00
Erik Ogenvik
c9eb353482
Moved fruit drop code to python script.
2018-07-04 22:47:45 +02:00
Erik Ogenvik
0ca22bcf68
Specify scripts for entity as property.
...
This allows multiple scripts to be used. In addition it allows for
entity with specific scripts.
2018-07-04 19:20:24 +02:00
Erik Ogenvik
746bf181a9
Added scale property.
...
This is now the preferred way to change the size of any entity, instead
of editing the bounding box. The "scale" property is either uniform if
only one value is present, or in all dimensions if all three values are
present.
2018-06-28 23:09:35 +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
b0cf29b18d
Use SQLite 3 for persistence.
...
Instead of storing data in Postgres we store it by default in SQLite,
using an in-process database.
This makes setup and handling much easier.
2018-05-19 21:47:24 +02:00
Erik Ogenvik
6e62796876
Reload rules in a better manner.
2018-05-10 00:21:30 +02:00
Erik Ogenvik
7895d1b0aa
Reload minds when python code changes.
...
All thoughts are first persisted and then restored.
2018-05-01 22:23:31 +02:00
Erik Ogenvik
e80d07560c
Reload entity scripts when python code changes.
...
For now we reload all scripts. We should be smarter and only reload
those scripts which are affected though.
2018-04-30 23:34:58 +02:00
Erik Ogenvik
d4604d034d
Correctly handled updated type properties.
...
When a type is updated we now property re-apply modified properties on
affected entities.
2018-04-29 17:21:44 +02:00
Erik Ogenvik
a6195c1ac6
Made all game entities definable through xml.
...
This makes it easier to alter properties in real time.
2018-04-29 11:58:35 +02:00
Erik Ogenvik
664988645e
Make all properties define type and optional name.
2018-04-27 23:12:15 +02:00
Erik Ogenvik
f7e7a8a968
Fixed tests.
2018-04-27 23:12:15 +02:00
Erik Ogenvik
7ae19d5038
Use Singleton base class.
...
I.e. make sure that all objects have a defined life time. This requires
that we actually set up and tear down the singletons.
2018-04-25 20:15:29 +02:00
Erik Ogenvik
f09675cec6
Use "planted" for floating entities.
...
Entities that are "planted" on bodies of water are floating.
This does away with the "floating" mode.
To mark that entities should by default be floating when placed in
water the boolean property "floats" has been added.
2018-03-24 17:06:02 +01:00
Erik Ogenvik
a674b0cf31
Updated docs.
2018-02-21 14:37:47 +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
1e95d956b9
Player characters should never be AI controlled.
2018-02-08 21:47:22 +01:00
Erik Ogenvik
162e682a99
Fixed tests.
2018-02-06 13:45:11 +01:00
Erik Ogenvik
e7fa53214b
Use nullptr instead of NULL.
2018-02-06 13:45:11 +01:00
Erik Ogenvik
67549fc362
Added geometry file property.
...
The mesh specified in the property will be read and a "geometry" mesh
property installed on the type onto which the property is installed.
2018-02-06 13:45:11 +01:00
Erik Ogenvik
7fb146eb36
Standardize installation of standard types.
...
This way the base types are exposed to clients.
2018-02-06 13:45:10 +01:00
Erik Ogenvik
99640d26aa
Use a left hand coord system.
2018-02-06 13:45:10 +01:00
Erik Ogenvik
e2513e5c3a
Fixed issues with stub property.
2017-08-02 10:03:58 +02:00
Erik Ogenvik
3a16efe860
Added script to generate stubs.
...
The script is copied from the GoogleMock project and adapted
to instead generate stubs.
Two stub files are generated, one being named *_custom.h.
Any custom behaviour can be added to the latter, since it won't be
regenerated when the stub is recreated.
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
b857efc836
Remove "forces" property as it didn't work.
2017-02-01 22:06:44 +01:00
Erik Ogenvik
0db8323325
Fixed tests.
2016-12-19 22:01:23 +01:00
Erik Ogenvik
1105483b1d
Fixed up tests.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
2f55d5d82b
Fixed various compile issues after rebase.
2016-06-26 21:50:10 +02:00
Erik Ogenvik
cb493811b3
Added "forces" property.
...
This property describes all external forces affecting the entity.
2016-06-26 20:17:18 +02:00
Erik Ogenvik
1c69b3aae6
Use camel casing for tests.
...
This makes it much easier to find them in various editors.
2016-06-26 20:17:18 +02:00