# Called when the node enters the scene tree for the first time.
# Called when the node enters the scene tree for the first time.
func _ready():
func _ready():
...
@@ -8,9 +9,26 @@ func _ready():
...
@@ -8,9 +9,26 @@ func _ready():
func passEvent(handler):
func passEvent(handler):
connect("enter", handler,"_balcony_enter")
connect("enter", handler,"_balcony_enter")
pass
connect("foundBanana", handler,"_remove_quest")
func mouseInteraction():
func mouseInteraction():
emit_signal("enter")
if flavorText == "BANANA?? How did you even get out there?":
pass
.mouseInteraction()
flavorText = "Huh? The door's locked from the outside! How did this even--?! Ugh. There's gotta be another way to get there. Maybe all the heist movies I've seen will finally come in handy ha ha ha!"
emit_signal("foundBanana", "Find Banana")
elif unlocked:
emit_signal("enter")
else:
.mouseInteraction()
func objInteraction(selected): # when an object is used on it
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if 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!
if selected.get_name() == "Bobby pin": # unlocking the door with a bobby pin