diff options
Diffstat (limited to 'asciifarm/client/display/display.py')
| -rw-r--r-- | asciifarm/client/display/display.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/asciifarm/client/display/display.py b/asciifarm/client/display/display.py index 79991af..1a2dca0 100644 --- a/asciifarm/client/display/display.py +++ b/asciifarm/client/display/display.py @@ -49,6 +49,8 @@ class Display: setwin(self.inventoryPad, "inventory") self.groundPad = InventoryPad("Ground") setwin(self.groundPad, "ground") + self.equipment = InventoryPad("Equipment") + setwin(self.equipment, "equipment") self.messagePad = MessagePad() setwin(self.messagePad, "msg") self.textInput = TextInput() @@ -58,7 +60,7 @@ class Display: #self.changed = False - self.update() + self.update(True) def getWidget(self, name): if name in self.widgets: @@ -93,6 +95,14 @@ class Display: self.inventoryPad.setInventory(items) #self.change() + def setEquipment(self, slots): + self.equipment.setInventory( + sorted([ + slot + ": " + (item if item else "") + for slot, item in slots.items() + ]) + ) + def setGround(self, items): self.groundPad.setInventory(items) #self.change() |
