Commit 797d3f43 authored by Julia Santos's avatar Julia Santos

Fixed some bugs

parent 919b71f0
......@@ -35,6 +35,7 @@ onready var labNotes = 0
onready var clothes = 0
onready var bathroomClean = 0
onready var canFrontDoor = false
onready var foundBanana = false
#items in the rooms that need access to the event handler
export(Array, NodePath) onready var eventItems
......@@ -121,6 +122,9 @@ func _clean():
quests.finishQuest("Clean bathroom")
inventory.remove_item_name("Cleaning mat")
func _foundBanana():
quests.finishQuest("Find Banana")
foundBanana = true
# ----------------- Notebook puzzle events -----------------
func _enter_notebook_laundry(): # trying to engage in the notebook puzzle for doing laundry
if !quests.hasQuest("Do laundry"):
......@@ -185,7 +189,7 @@ func _balcony_exit():
livingRoom.show()
func _living_to_hallway():
if ((inventory.hasItem("Trash") != -1) || (!quests.hasQuest("Find Banana") && quests.hasQuest("Feed Banana"))):
if ((inventory.hasItem("Trash") != -1) || foundBanana):
canFrontDoor = true
if canFrontDoor:
......
......@@ -129,6 +129,8 @@ script = ExtResource( 10 )
__meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "My lab notes! I wonder how it got there."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Lab notes"]
position = Vector2( -16.8367, -2.11676 )
......
......@@ -26,10 +26,10 @@ load_path = "res://.import/placeholder item.png-cd6e4c1231156687d87915032ec4361d
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 16.0697, 9.41678 )
[sub_resource type="RectangleShape2D" id=5]
[sub_resource type="RectangleShape2D" id=15]
extents = Vector2( 16.0423, 12.4535 )
[sub_resource type="StreamTexture" id=6]
[sub_resource type="StreamTexture" id=16]
flags = 4
load_path = "res://.import/trail 3.png-9960f4c5b964f5aca36ca6c97e309a5d.stex"
......@@ -149,13 +149,13 @@ interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Laptop"]
position = Vector2( -16.4264, -2.27527 )
scale = Vector2( 5, 5 )
shape = SubResource( 5 )
shape = SubResource( 15 )
[node name="Sprite" type="Sprite" parent="Laptop/CollisionShape2D"]
visible = false
position = Vector2( -0.277301, -0.137165 )
scale = Vector2( 0.0197574, 0.0197574 )
texture = SubResource( 6 )
texture = SubResource( 16 )
[node name="Bathroom door" type="StaticBody2D" parent="."]
position = Vector2( 588.187, 226.932 )
......@@ -224,7 +224,7 @@ scale = Vector2( 0.0197574, 0.0197574 )
texture = ExtResource( 5 )
[node name="Sando" type="StaticBody2D" parent="."]
position = Vector2( -234.577, 395.301 )
position = Vector2( -217.928, 395.301 )
rotation = -3.0456
scale = Vector2( 0.9, 0.9 )
input_pickable = true
......
......@@ -10,13 +10,13 @@ func _ready():
func passEvent(handler):
connect("enter", handler,"_balcony_enter")
connect("foundBanana", handler,"_remove_quest")
connect("foundBanana", handler,"_foundBanana")
func mouseInteraction():
if flavorText == "BANANA?? How did you even get out there?":
.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")
emit_signal("foundBanana")
elif unlocked:
emit_signal("enter")
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