Inventory implementation

This commit is contained in:
2017-10-04 13:39:59 +02:00
parent 16ab79b3a8
commit 6c2782f18d
7 changed files with 250 additions and 22 deletions

View File

@ -1,7 +1,11 @@
component Inventory(inventory *arn.Inventory)
ShopTabs
.inventory
each slot in inventory.Slots
.inventory-slot
span= slot.ItemID
p Coming soon.
for index, slot := range inventory.Slots
if slot.ItemID == ""
.inventory-slot.mountable(draggable="false", data-index=index)
else
.inventory-slot.mountable(title=slot.Item().Name, draggable="true", data-index=index)
Icon(slot.Item().Icon)
if slot.Quantity > 1
.inventory-slot-quantity= slot.Quantity