extends "res://scripts/building/piece.gd" ## Wooden chest: 16 slots of storage. E opens it next to your inventory. const SLOTS := 16 var inventory := Inventory.new(SLOTS) func dismantle_block_reason() -> String: for s in inventory.slots: if s != null: return "Empty the chest first" return "" func interact_prompt(_player: Node) -> String: var used := 0 for s in inventory.slots: if s != null: used += 1 return "Chest (%d/%d) [E] Open" % [used, SLOTS] func interact(player: Node) -> void: player.open_inventory(self)