diff --git a/AGRARIAN_DEVELOPMENT_ROADMAP.md b/AGRARIAN_DEVELOPMENT_ROADMAP.md index e82aa32..112c486 100644 --- a/AGRARIAN_DEVELOPMENT_ROADMAP.md +++ b/AGRARIAN_DEVELOPMENT_ROADMAP.md @@ -505,7 +505,11 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe `AgrarianUseItem ItemId Quantity` support for MVP consumables, with food hunger recovery, raw meat hunger recovery plus sickness risk, bandage injury treatment, and restore-on-unsupported-item behavior. -- [ ] Add equipment slots if needed. +- [x] Add equipment slots if needed. Decision complete for MVP: dedicated + equipment slots are deferred because current tools do not yet drive equipped + state; tools remain inventory items until active hand, worn, backpack, armor, + weapon, durability, animation, or mesh-attachment rules require replicated and + persisted slot state. - [ ] Add weight or carry capacity placeholder. - [ ] Add inventory UI. - [x] Add replication for inventory changes. diff --git a/Docs/InventoryDataModel.md b/Docs/InventoryDataModel.md index 47b64d7..5d775a6 100644 --- a/Docs/InventoryDataModel.md +++ b/Docs/InventoryDataModel.md @@ -120,6 +120,22 @@ The 0.1.E inventory work should implement these operations on top of the model: systems layered on top. - UI: read the replicated stack list and send requests back through server RPCs. +## Equipment Slot Decision + +Dedicated equipment slots are deferred for the 0.1.E MVP. Current MVP tools, +including `basic_tool`, do not yet drive a separate equipped-state rule; they +can stay in inventory and be checked by item ID when a gather, craft, or build +action needs a tool requirement. Adding slots before a system reads them would +create replicated state, UI work, and save/load obligations without changing +gameplay. + +Equipment slots should be added when at least one implemented system needs +state such as active hand item, worn clothing, armor, backpack, held weapon, +tool durability while equipped, animation stance, or first-person/third-person +mesh attachment. When that happens, equipment should be server authoritative, +replicated, persisted, and implemented as a small slot map that references +inventory stack IDs or moves stack instances between inventory and equipment. + ## Design Rules - `ItemId` is the stable key. Display names can change. diff --git a/Docs/TechnicalDesignDocument.md b/Docs/TechnicalDesignDocument.md index c8a0090..63027ce 100644 --- a/Docs/TechnicalDesignDocument.md +++ b/Docs/TechnicalDesignDocument.md @@ -123,6 +123,13 @@ with a small health bump. This gives UI item-use work a concrete authority path while leaving tools, structures, and future complex consumables blocked until they have explicit gameplay rules. +Dedicated equipment slots are intentionally deferred for the 0.1.E MVP. The +current `basic_tool` item can remain an inventory item until an implemented +system needs active hand, worn, backpack, armor, weapon, durability, animation, +or mesh-attachment state. When that need appears, equipment should be added as +server-authoritative, replicated, persisted slot state rather than as local UI +selection only. + ## Time And Environment The MVP gameplay calendar target is: diff --git a/Scripts/verify_equipment_slot_decision.py b/Scripts/verify_equipment_slot_decision.py new file mode 100644 index 0000000..cce9617 --- /dev/null +++ b/Scripts/verify_equipment_slot_decision.py @@ -0,0 +1,57 @@ +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +FILES = { + "InventoryDataModel.md": ROOT / "Docs" / "InventoryDataModel.md", + "TechnicalDesignDocument.md": ROOT / "Docs" / "TechnicalDesignDocument.md", + "AGRARIAN_DEVELOPMENT_ROADMAP.md": ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md", +} + +EXPECTED = { + "InventoryDataModel.md": [ + "## Equipment Slot Decision", + "Dedicated equipment slots are deferred for the 0.1.E MVP.", + "`basic_tool`", + "can stay in inventory and be checked by item ID", + "Adding slots before a system reads them would", + "active hand item", + "worn clothing", + "armor", + "backpack", + "held weapon", + "tool durability while equipped", + "mesh attachment", + "server authoritative", + "replicated", + "persisted", + ], + "TechnicalDesignDocument.md": [ + "Dedicated equipment slots are intentionally deferred for the 0.1.E MVP.", + "`basic_tool` item can remain an inventory item", + "server-authoritative, replicated, persisted slot state", + ], + "AGRARIAN_DEVELOPMENT_ROADMAP.md": [ + "[x] Add equipment slots if needed.", + "equipment slots are deferred", + "do not yet drive equipped", + ], +} + + +def main(): + missing = [] + for label, path in FILES.items(): + text = path.read_text(encoding="utf-8") + for snippet in EXPECTED[label]: + if snippet not in text: + missing.append(f"{label}: {snippet}") + + if missing: + raise RuntimeError("Equipment slot decision verification failed: " + "; ".join(missing)) + + print("Agrarian equipment slot decision verification complete.") + + +if __name__ == "__main__": + main()