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 ...@@ -85,7 +85,7 @@ func clearFridge(): # clear out the consumed ingredients
updateUI() updateUI()
dialogue.text = "Delicious!" dialogue.text = "Delicious!"
func cook(): func _cook():
match ingredients.size(): match ingredients.size():
1: 1:
match ingredients[0]: match ingredients[0]:
...@@ -105,7 +105,7 @@ func cook(): ...@@ -105,7 +105,7 @@ func cook():
clearFridge() clearFridge()
cook.hide() cook.hide()
func eat(): func _eat():
match ingredients[0]: match ingredients[0]:
"Vienna sausage": "Vienna sausage":
energy_bar.value += 12 energy_bar.value += 12
......
...@@ -24,7 +24,10 @@ func finishQuest(q): ...@@ -24,7 +24,10 @@ func finishQuest(q):
index += 1 index += 1
func showQuests(): 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- ")) #print(quests.join("\n- "))
func hasQuest(questInq): # checks if the array contains a certain quest func hasQuest(questInq): # checks if the array contains a certain quest
......
...@@ -15,8 +15,8 @@ onready var sausage ...@@ -15,8 +15,8 @@ onready var sausage
func _ready(): func _ready():
connect("selected_ing", get_parent().get_node("Energy handler"), "_selected_ing") connect("selected_ing", get_parent().get_node("Energy handler"), "_selected_ing")
connect("unselected_ing", get_parent().get_node("Energy handler"), "_unselected_ing") connect("unselected_ing", get_parent().get_node("Energy handler"), "_unselected_ing")
connect("cook", get_parent().get_node("Energy handler"), "cook") connect("cook", get_parent().get_node("Energy handler"), "_cook")
connect("eat", get_parent().get_node("Energy handler"), "eat") connect("eat", get_parent().get_node("Energy handler"), "_eat")
func passUI(inv, dia, que): func passUI(inv, dia, que):
.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