Commit graph

4 commits

Author SHA1 Message Date
4205b174c9
Add item tags to Thing model
Tags enable categorizing items for boundary checks and other systems.
Added tags field to Thing and ThingTemplate, updated load and spawn
functions to handle tags from TOML definitions.
2026-02-14 12:39:48 -05:00
68c18572d6
Add readable objects with read command
Implements TDD feature for readable text on Things:
- Added readable_text field to Thing dataclass
- Extended ThingTemplate to parse readable_text from TOML
- Created read command that finds objects by name/alias in inventory or on ground
- Handles edge cases: no target, not found, not readable
2026-02-14 11:51:52 -05:00
5a0c1b2151
Fix dataclass equality causing duplicate items in move_to
Objects were comparing by value instead of identity, causing
list.remove() to remove the wrong object when moving items with
identical attributes. Set eq=False on all dataclasses to use
identity-based comparison.
2026-02-14 01:39:45 -05:00
9437728435
Add Thing class and Entity.can_accept() for inventory
Thing is an Object subclass with description, portable flag, and aliases.
Entity.can_accept() returns True for portable Things, enabling the
containment model where entities carry items in their contents.
2026-02-11 19:55:58 -05:00