Commit graph

21 commits

Author SHA1 Message Date
Erik Ogenvik
d7960b3100 Improve on how updated types are handled.
By installing and changing some types, other types might update. This is
now handled.
2018-05-08 14:32:02 +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
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
8f8405e5bc Combine rotation from op with archetype.
We want to allow for archetypes with orientations, along with also
sending orientations in Create ops. To do this we need to combine
these two rotations into a final orientaton.
2016-06-26 19:08:54 +02:00
Erik Ogenvik
bf3a772310 Send knowledge about "origin" to new minds.
The "origin" is the position where the entity is created. This is useful
for goals.
2016-05-24 11:20:28 +02:00
Erik Ogenvik
f56ecc9119 Fixed sending initial thoughts.
Which is done by wrapping a Set op within a Think op.
2016-05-23 22:18:01 +02:00
Erik Ogenvik
9edc90063a Use the entity ref format in archetypes.
References to other entities are specified through a map with an $eid
string entry.
2013-11-19 22:16:46 +01:00
Samuel Kogler
7e0ab62d41 Fix conflicting variable name. 2013-11-19 21:55:01 +01:00
Erik Ogenvik
ffbcfaf832 Implement archetype inheritance. 2013-11-15 21:40:29 +01:00
Erik Ogenvik
a84d84b903 Provide better error output. 2013-11-15 21:40:29 +01:00
Erik Ogenvik
6e4ece7d12 Fix incorrect logic. 2013-11-15 21:40:29 +01:00
Erik Ogenvik
fcfabe55e9 Added ability to send an "archetype" as argument.
By setting "objtype" to "archetype" on the argument sent it will be
handled as an archetype instead, and the contents of "entities" and
"thoughts" will be merged into the parent archetype.
2013-11-15 21:39:35 +01:00
Erik Ogenvik
56adafd2e7 Use more idiomatic way. 2013-11-15 21:39:35 +01:00
Erik Ogenvik
2e7900354e Propertly implement entity references.
Any entity in the same archetype can now be referred to in any attribute
by prefixing the id of it with "@".
2013-11-15 21:39:35 +01:00
Erik Ogenvik
a6b282b81a Added first test implementation of entity ref.
Within an archetype you can refer to other entities in attributes by
prefixing their names with a *@" character.
2013-11-15 21:39:35 +01:00
Erik Ogenvik
f2c5eab9b8 Correctly increase references. 2013-11-15 21:39:35 +01:00
Erik Ogenvik
45555fd698 Use custom format for archetypes.
This required the EntityKit to be refactored, so that most fields are
pushed into EntityFactory. Due to the nature of how the rule handlers
and the factories interact the code is pretty messy. It works, but it's
tangled and not really clean.
2013-11-15 21:39:35 +01:00
Erik Ogenvik
75c89166b9 Also send thoughts. 2013-11-15 21:39:35 +01:00
Erik Ogenvik
0974c28f3c Use standard format for exported entities. 2013-11-15 21:39:35 +01:00
Erik Ogenvik
b054382f2a Add "archetype" as new type.
An archetype is used for creating new entities. It contains one or many
definitions for entities, along with relationship between them. It also
contains any extra data needed for a world simultion, such as thoughts
and knowledge.
Archetypes should be seen as blueprints for entity types, as they
describe how new one should be composed. They are created just as
regular entities, using the existing Create op functionality.
As an example, there should be one "human" entity type, with archetypes
such as "settler", "merchant", "soldier" etc. This differs from the
current setup where each of these are separate entity types.
2013-11-15 21:39:35 +01:00