2021-05-11 14:58:22 -04:00
|
|
|
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()
|
2021-05-11 16:29:45 -04:00
|
|
|
|
|
|
|
def getPrice(self):
|
|
|
|
return self.item.getPrice()
|