Summary
Add craftable storage containers that can be placed in the world, accessed by right-clicking, and persisted between sessions.
Background
Currently the only way to store items outside the player's inventory is to place them directly in the world, which is lossy and inconvenient. A dedicated storage container entity would give players a proper item management option.
Requirements
Entity
- Add a
Chest entity (src/entity/chest.py) — solid, placeable, with a placeholder asset (assets/images/chest.png)
Crafting
- Add a
Chest recipe to RecipeRegistry (src/crafting/recipeRegistry.py), e.g. 6× OakWood
Interaction
- Right-clicking a placed
Chest in the world opens a chest inventory screen (similar to InventoryScreen)
- The chest screen should display the chest's contents and allow items to be moved in/out
- Left-click outside the chest panel drops cursor items (consistent with
InventoryScreen behaviour)
Persistence
- Chest contents must survive save/load cycles
- Extend
RoomJsonReaderWriter (src/world/roomJsonReaderWriter.py) to serialize/deserialize Chest entities and their contents
- Follow the existing entity registry pattern in
inventoryJsonReaderWriter.py and roomJsonReaderWriter.py when adding the new entity type
Pickup
- Add
Chest to the canBePickedUp() check in worldScreen.py (only when empty, to prevent item loss)
Acceptance Criteria
Summary
Add craftable storage containers that can be placed in the world, accessed by right-clicking, and persisted between sessions.
Background
Currently the only way to store items outside the player's inventory is to place them directly in the world, which is lossy and inconvenient. A dedicated storage container entity would give players a proper item management option.
Requirements
Entity
Chestentity (src/entity/chest.py) — solid, placeable, with a placeholder asset (assets/images/chest.png)Crafting
Chestrecipe toRecipeRegistry(src/crafting/recipeRegistry.py), e.g. 6× OakWoodInteraction
Chestin the world opens a chest inventory screen (similar toInventoryScreen)InventoryScreenbehaviour)Persistence
RoomJsonReaderWriter(src/world/roomJsonReaderWriter.py) to serialize/deserializeChestentities and their contentsinventoryJsonReaderWriter.pyandroomJsonReaderWriter.pywhen adding the new entity typePickup
Chestto thecanBePickedUp()check inworldScreen.py(only when empty, to prevent item loss)Acceptance Criteria
Chestcan be crafted and placed in the world