feat: add template_of getter + bump to v0.3.0

Add composition.template_of(entity) -> string|nil, returning the
template-id this entity was created from. Returns nil for
non-composition-managed entities (e.g. raw entity.create() handles)
and loud-errors on nil arg. Enables crafting and inventory consumers
to recover the template-id without round-tripping through tags.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Axel Meyer
2026-06-14 11:57:29 +02:00
parent ccc4bb5643
commit b2a6d5c170
3 changed files with 51 additions and 5 deletions

View File

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