Commit b6a0e30a authored by Julia Santos's avatar Julia Santos

First two (and a half) cutscenes now play in the proper places, Cleaning...

First two (and a half) cutscenes now play in the proper places, Cleaning Bathroom quest now works properly, and you can now place banana in the terrarium and retrieve her again
parent f3d9da91
......@@ -28,7 +28,9 @@ func getDialogue():
sceneProgress = 0
get_parent().queue_free() # dont need that scene anymore
tracking = false
return "Dialogue 1"
print("Deleting scene 1")
return ""
func start():
tracking = true
......
......@@ -28,7 +28,9 @@ func getDialogue():
sceneProgress = 0
get_parent().queue_free() # dont need that scene anymore
tracking = false
return "Dialogue 1"
print("Deleting scene 2")
return ""
func start():
tracking = true
......@@ -28,7 +28,9 @@ func getDialogue():
sceneProgress = 0
get_parent().queue_free() # dont need that scene anymore
tracking = false
return "Dialogue 1"
print("Deleting scene 2b")
return ""
func start():
tracking = true
......@@ -112,6 +112,7 @@ func get_clothes(): # returns the number of pieces of clothing that have been co
func _clean(toolUsed): # adds to the number of items that have been cleaned, and to the number of times the cleaning materials have been used
bathroomClean = bathroomClean + 1
print("Cleaning " + str(bathroomClean))
if toolUsed == "Cleaning mat":
cleaningMaterials += 1
if cleaningMaterials == 3: # if the cleaning materials have cleaned 3 objects (sink, mirror, and floor), remove it
......@@ -138,7 +139,7 @@ func _start_cutscene_2():
func _start_cutscene_2b():
cutsceneHandler.get_node("2b").show()
cutsceneHandler.get_node("2b/Scene control").start()
# ----------------- Notebook puzzle events -----------------
func getGroceries():
return groceries
......
......@@ -57,7 +57,7 @@ func storeClick(method): # stores the mouse click data to data.save
save_data.open("user://data.save",File.READ_WRITE)
save_data.seek_end()
save_data.store_string(method + " " + get_name())
print("Writing to file")
#print("Writing to file")
save_data.close()
func storeInt(selected): # specifically for using one item on another, stores mouse click data to data.save
......@@ -70,7 +70,7 @@ func storeInt(selected): # specifically for using one item on another, stores mo
save_data.open("user://data.save",File.READ_WRITE)
save_data.seek_end()
save_data.store_string("Used " + inventory.get_item_text(selected) + " -> " + get_name())
print("Writing to file")
#print("Writing to file")
save_data.close()
......
......@@ -79,7 +79,6 @@ position = Vector2( 190.702, 295.083 )
scale = Vector2( 0.997353, 0.98961 )
z_index = -1
script = ExtResource( 3 )
tracking = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="BG"]
z_index = -1
......
extends RichTextLabel
onready var energyBar = get_parent().get_parent().get_node("Energy bar")
# This script handles the list of quests that the player must accomplish, and displays it
# variables editable in the Inspector
......@@ -19,12 +20,13 @@ func finishQuest(q): # removes a quest from the list
for quest in quests:
if quest == q:
quests.remove(index)
#print("Quest found, will remove")
print("Quest found, will remove " + quest)
showQuests()
found = true
energyBar.value -= 10
index += 1
if !found:
print("Unable to delete quest")
print("Unable to delete " + q)
func showQuests(): # concatenates the quests into an easy-to-read-list and displays it
......
extends "res://Item.gd"
signal checked
onready var hasBanana = false # if the player has put banana in the terrarium
# This script changes the flavor text after the first interaction
# Called when the node enters the scene tree for the first time.
......@@ -8,10 +9,31 @@ func _ready():
func mouseInteraction():
.mouseInteraction()
if flavorText == "OMG! Where did Banana go??": # if it's the first interaction
if flavorText == "OMG! Where did Banana go??" and !hasBanana: # if it's the first interaction
flavorText = "Okay... if I were a lizard, where would I be?"
elif hasBanana:
inventory.add_item("Nana", load("res://.import/nana.png-3afacff9a6dfeb0ea38c0e651d0707be.stex"))
func passEvent(handler):
#connect("checked", handler,"_add_quest")
# will need handler later maybe but for now its not needed anymore
pass
func objInteraction(selected): # when an object is used on it
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if inventory.get_item_text(selected) == "Nana":
inventory.remove_item(selected)
hasBanana = true
dialogueBox.text = "That's enough shenanigans from you for today."
flavorText = "Hello, my little yellow daughter."
elif inventory.get_item_text(selected) == "Nana's food": # trying to feed Banana
if hasBanana: # if banana is in the tank
dialogueBox.text = "Your meal, sir."
inventory.remove_item(selected)
else:
dialogueBox.text = "Where's Banana?"
elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
......@@ -27,8 +27,6 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = "Time to tango, toilet."
emit_signal("cleaned", "Plunger")
clean = true
if eventHandler.getClean() == 3:
inventory.remove_item(selected)
else: # if they try to use the plunger on a clean toilet
dialogueBox.text = "I can't make it any LESS unclogged.."
inventory.unselect_all() #unselect item
......@@ -15,7 +15,7 @@ func objInteraction(selected):
if inventory.get_item_text(selected) == "Trash": # if it's the trash, remove it from the inventory
dialogueBox.text = "Good riddance."
inventory.remove_item(selected)
emit_signal("cleaned")
emit_signal("cleaned", "Trash")
elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
dialogueBox.text = flavor
else:
......
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