Added new HUD for bed timer

This commit is contained in:
akshay committed 2022-08-21 10:16:24 -04:00
1 parent 2bd6bc1c4e
commit fc58d4590f
11 files changed
+190 -17

No files matched your search

+6 -2
View File
@@ -69,11 +69,15 @@ func consume_food(item : Resource):
set_health(MAX_HEALTH)
print("player: Hunger Satisfied! Ate %s" % item.name)
func can_afford(item_name, item_amount):
assert(item_amount > 0)
func get_item_from_inventory(var item_name : String):
var current_amount : int = 0
if(inventory.has(item_name)):
current_amount = inventory[item_name]
return current_amount
func can_afford(item_name, item_amount):
assert(item_amount > 0)
var current_amount : int = get_item_from_inventory(item_name)
return current_amount >= item_amount
func modify_inventory(item_name, item_amount):