feat(composition): add set_tag + accept container={kind="list"} block

- set_tag(entity, tag, present): adds/removes entity from index_by_tag
  and entity_meta.tags. Idempotent (double-add and double-remove are
  no-ops). Loud-Error on entity not created by composition.
- define_template now accepts an optional container block. Validates
  kind="list" (only supported value). Loud-Errors individually on each
  unimplemented constraint field (weight_max, volume_max, grid,
  accepts_fluid, accepts_gas, restrictions) and on unknown container
  keys, preventing silent capability mismatches.
- create() copies tpl.tags into entity_meta so per-entity set_tag calls
  do not mutate the shared template tag-set.
- manifest.lib version bumped to 0.2.0.
- README and header comment updated to reflect new surface and revised
  deferred-list.
This commit is contained in:
Axel Meyer
2026-06-13 13:55:01 +02:00
parent b6a16df6f0
commit 87357571bd
3 changed files with 147 additions and 19 deletions

View File

@@ -1 +1 @@
{"id":"lib-core.composition","version":"0.1.0","api_min":"0.1","deps":[]}
{"id":"lib-core.composition","version":"0.2.0","api_min":"0.1","deps":[]}