space-game-proto/obj/inventorySlot.py
Logen Kain ea0c475074 Refactor; start buy menu
Change tradeable items from dict to list;
give tradehubs proper inventory;
Make inventory adding dumber
2021-05-11 16:29:45 -04:00

24 lines
500 B
Python

class InventorySlot:
'One item plus quantity'
#Do I want to add the value here too?
def __init__(self, item, quantity):
self.item = item
self.quantity = quantity
def incItem(self, amount):
self.quantity += amount
def decItem(self, amount):
self.quantity -=amount
def getQuantity(self):
return self.quantity
def getName(self):
return self.item.getName()
def getPrice(self):
return self.item.getPrice()