Commit graph

2999 commits

Author SHA1 Message Date
Erik Ogenvik
0572fd6d4a Use "props" to get properties.
Also unify LocatedEntity Python bindings.
2018-05-14 17:35:19 +02:00
Erik Ogenvik
f1785bd9b9 Reload python modules all at once.
To prevent inconsistencies when multiple file changes.
2018-05-10 01:15:35 +02:00
Erik Ogenvik
b72aa95c94 Removed obsolete files.
We want to control behaviour through properties and move away from using
hierarchical structure.
2018-05-08 14:31:48 +02:00
Erik Ogenvik
e2426e8b74 Removed unused functions. 2018-05-07 11:15:26 +02:00
Erik Ogenvik
c61a273f92 Expose properties through "props".
If we expose dynamic properties directly on the located
entity there's a risk that there will be collisions.
2018-05-07 11:15:26 +02:00
Erik Ogenvik
5b282419be Finalize conversion to Python 3. 2018-05-07 11:15:26 +02:00
Erik Ogenvik
97a09ae6b0 Conversion to Python 3 through 2to3. 2018-05-07 11:15:26 +02:00
Erik Ogenvik
701d1a7208 Initial work on porting to Python 3. 2018-05-07 11:15:26 +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
002e1ca728 Expose const fields.
Thus no need to redefine private and protected.
2018-05-01 22:15:29 +02:00
Erik Ogenvik
5cd440cfd3 Support older boost versions. 2018-05-01 17:12:14 +02:00
Erik Ogenvik
49b0209b3f Fixed some issues with logging. 2018-05-01 14:39:46 +02:00
Erik Ogenvik
9ae1fc2fc3 Only mod property if really needed. 2018-05-01 14:39:46 +02:00
Erik Ogenvik
2cc6ce43ee No error when entity has disappeared. 2018-05-01 13:19:53 +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
1029803200 Fixed incorrect entity init. 2018-04-30 23:33:24 +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
0f1559ba16 Reload types when they change. 2018-04-29 11:59:33 +02:00
Erik Ogenvik
daebcd09fa Fixed keyboard slip. 2018-04-28 13:02:42 +02:00
Erik Ogenvik
90001d1a2c Use correct masks. 2018-04-27 23:12:15 +02:00
Erik Ogenvik
664988645e Make all properties define type and optional name. 2018-04-27 23:12:15 +02:00
Erik Ogenvik
cecee29236 Fixed issue with bbox scaling.
We can't use setLocalScaling since it doesn't seem to work well with
some shapes (such as mesh). We should use uniform scaling anyway.
2018-04-27 23:12:15 +02:00
Erik Ogenvik
d3d84bc675 Don't send bbox to clients by default.
It should be sent as any other property. Additionally we want to use
uniform scaling through a property instead.
2018-04-27 23:12:15 +02:00
Erik Ogenvik
6114bad0df Update geometry when mesh files change. 2018-04-27 23:12:15 +02:00
Erik Ogenvik
09090a6446 Emit Change op when a type changes. 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
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
d51d1c39c0 Use fixed size values for flags. 2018-04-24 22:53:11 +02:00
Erik Ogenvik
ba777f05d7 Make characters stick to the ground.
This is done through the "step_factor" property.
2018-04-21 20:35:07 +02:00
Erik Ogenvik
197c373402 Moved to more correct place. 2018-04-21 10:02:08 +02:00
Erik Ogenvik
dec9e5a36e Cleaned up memory leaks.
Which prevented the physical domain integration tests from running on
build servers with constrained memory.
2018-04-19 10:19:35 +02:00
Erik Ogenvik
f582e0613b Allow scaling axis to be set using "scaler" attr. 2018-04-18 20:19:31 +02:00
Erik Ogenvik
a8e21ddfc5 Added more sphere options.
Where radius is determined by selected axis.
2018-04-15 13:29:49 +02:00
Erik Ogenvik
87c60c7bd1 Use unsigned values for bitmasks. 2018-04-15 13:19:25 +02:00
Erik Ogenvik
10a3ab8dfe Removed unnecessary function. 2018-03-29 14:42:25 +02:00
Erik Ogenvik
45432ef8ef Attached entities inherits free mode when changed. 2018-03-25 22:39:29 +02:00
Erik Ogenvik
d119d2f617 Move planted entities along. 2018-03-25 21:53:12 +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
070b0a6c85 Check for where to plant entities.
If an entity is in mode "planted" we should check for any existing
planted entities below it, to see if we should add it on top of them, or
on top of the terrain.
2018-03-23 23:07:09 +01:00
Erik Ogenvik
166a5aaba3 Initial work on planting entities. 2018-03-23 19:22:35 +01:00
Erik Ogenvik
b06ba3da1c Fixed incorrect geometry calculations. 2018-03-19 22:05:48 +01:00
Erik Ogenvik
ed0878dd5f Added missing spinning friction check. 2018-03-12 18:56:30 +01:00
Erik Ogenvik
ad8e6e9134 Support older versions of Bullet.
"spinning friction" is nice to have, but not necessary.
2018-03-12 18:43:28 +01:00
Erik Ogenvik
380b4e21d9 Added rolling and spinning friction. 2018-03-12 18:15:20 +01:00
Erik Ogenvik
1ef3652f74 Allow type properties to be ephemeral.
Which means that they won't be persisted, and also not removed when the
type is synced with an EntityFactory.
This fixed an issue with tools having their bbox removed when operations
where added to them.
2018-03-09 14:53:53 +01:00
Erik Ogenvik
72e7a5e0c2 Move resting entities along.
I.e. when an entity is moved, and there are other entities resting on
top of it, move them along too.
2018-03-09 14:37:11 +01:00
Erik Ogenvik
f3736e0984 More fixes for older Bullet versions. 2018-03-08 22:29:47 +01:00
Erik Ogenvik
553e440a6a Fix version number check. 2018-03-08 22:14:16 +01:00
Erik Ogenvik
5894bac3af Support older versions of Bullet. 2018-03-08 22:01:13 +01:00