Commit 5da32749 authored by Julia Santos's avatar Julia Santos

Edited energy handler so that cook and eat methods/buttons don't have the same name

parent 8eece222
......@@ -85,7 +85,7 @@ func clearFridge(): # clear out the consumed ingredients
updateUI()
dialogue.text = "Delicious!"
func cook():
func _cook():
match ingredients.size():
1:
match ingredients[0]:
......@@ -105,7 +105,7 @@ func cook():
clearFridge()
cook.hide()
func eat():
func _eat():
match ingredients[0]:
"Vienna sausage":
energy_bar.value += 12
......
......@@ -24,7 +24,10 @@ func finishQuest(q):
index += 1
func showQuests():
text = "- " + quests.join("\n- ") # prints all quests on the notepad
if quests.size() > 0:
text = "- " + quests.join("\n- ") # prints all quests on the notepad
else:
text = ""
#print(quests.join("\n- "))
func hasQuest(questInq): # checks if the array contains a certain quest
......
......@@ -15,8 +15,8 @@ onready var sausage
func _ready():
connect("selected_ing", get_parent().get_node("Energy handler"), "_selected_ing")
connect("unselected_ing", get_parent().get_node("Energy handler"), "_unselected_ing")
connect("cook", get_parent().get_node("Energy handler"), "cook")
connect("eat", get_parent().get_node("Energy handler"), "eat")
connect("cook", get_parent().get_node("Energy handler"), "_cook")
connect("eat", get_parent().get_node("Energy handler"), "_eat")
func passUI(inv, dia, que):
.passUI(inv, dia, que)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment