mirror of
https://github.com/swarm-game/swarm.git
synced 2024-09-11 14:46:33 +03:00
37cae2ac15
Closes #1631 ## Design * Entities have a new property: a `Set` of textual tags. * Two new commands are introduced: * `HasTag` checks whether a single entity has a given tag * `TagMembers` allows cycling through all members with a given tag * `TagMembers` may be considered more powerful than `HasTag`, so has its own separate capability (`CTagmembers`). * A map is computed at scenario initialization to facilitate `TagMembers` lookups. * Tag names are highlighted in yellow in markdown. ## Demo scripts/play.sh -i scenarios/Testing/1631-tags.yaml --autoplay ## Other changes * Incidentally, changed `knownEntities` from a list to a `Set` so that `Set.member` can be used instead of `elem`. |
||
---|---|---|
.. | ||
swarm.lua | ||
swarm.vim |