Commit 3c003a6b authored by Julia Santos's avatar Julia Santos

Set up quest to find banana and succeed (at seeing her from the living room)

parent 5da32749
...@@ -65,12 +65,20 @@ func _eaten(): # completing first "Eat" quest ...@@ -65,12 +65,20 @@ func _eaten(): # completing first "Eat" quest
func _start_lab(): func _start_lab():
if !quests.hasQuest("Eat") and !quests.hasQuest("Do laundry"): if !quests.hasQuest("Eat") and !quests.hasQuest("Do laundry"):
quests.add("Feed Nana")
quests.add("Clean bathroom") quests.add("Clean bathroom")
quests.add("Take care of plants") quests.add("Take care of plants")
quests.add("Figure out what's making that noise") quests.add("Figure out what's making that noise")
quests.add("Feed Nana")
newQuests = true newQuests = true
func _add_quest(questName):
print("Added "+questName)
quests.add(questName)
func _remove_quest(questName):
print("Removed "+ questName)
quests.finishQuest(questName)
# ----------------- Notebook puzzle events ----------------- # ----------------- Notebook puzzle events -----------------
func _enter_notebook_laundry(): # trying to engage in the notebook puzzle for doing laundry func _enter_notebook_laundry(): # trying to engage in the notebook puzzle for doing laundry
if groceries: # if the groceries have been put away if groceries: # if the groceries have been put away
......
...@@ -46,6 +46,7 @@ __meta__ = { ...@@ -46,6 +46,7 @@ __meta__ = {
"_edit_group_": true "_edit_group_": true
} }
interactable = true interactable = true
flavorText = "BANANA?? How did you even get out there?"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Balcony door"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Balcony door"]
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
......
[gd_scene load_steps=24 format=2] [gd_scene load_steps=27 format=2]
[ext_resource path="res://assets/Placeholder BGs/room zoom out.png" type="Texture" id=1] [ext_resource path="res://assets/Placeholder BGs/room zoom out.png" type="Texture" id=1]
[ext_resource path="res://assets/placeholder item.png" type="Texture" id=2] [ext_resource path="res://assets/placeholder item.png" type="Texture" id=2]
...@@ -11,43 +11,51 @@ ...@@ -11,43 +11,51 @@
[ext_resource path="res://Scripts/Laundry basket.gd" type="Script" id=9] [ext_resource path="res://Scripts/Laundry basket.gd" type="Script" id=9]
[ext_resource path="res://Scripts/Movement scripts/Bathroom door.gd" type="Script" id=10] [ext_resource path="res://Scripts/Movement scripts/Bathroom door.gd" type="Script" id=10]
[ext_resource path="res://Scripts/Laptop.gd" type="Script" id=11] [ext_resource path="res://Scripts/Laptop.gd" type="Script" id=11]
[ext_resource path="res://Scripts/Terrarium.gd" type="Script" id=12]
[sub_resource type="RectangleShape2D" id=1] [sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 14.2862, 14.7497 ) extents = Vector2( 14.2862, 14.7497 )
[sub_resource type="RectangleShape2D" id=2] [sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 16.0697, 9.41678 ) extents = Vector2( 22.0635, 10.5567 )
[sub_resource type="RectangleShape2D" id=3] [sub_resource type="StreamTexture" id=3]
extents = Vector2( 16.2181, 10.3281 ) flags = 4
load_path = "res://.import/placeholder item.png-cd6e4c1231156687d87915032ec4361d.stex"
[sub_resource type="RectangleShape2D" id=4] [sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 16.0697, 9.41678 )
[sub_resource type="RectangleShape2D" id=5] [sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 16.0423, 12.4535 ) extents = Vector2( 16.2181, 10.3281 )
[sub_resource type="StreamTexture" id=6] [sub_resource type="RectangleShape2D" id=6]
flags = 4
load_path = "res://.import/trail 3.png-9960f4c5b964f5aca36ca6c97e309a5d.stex"
[sub_resource type="RectangleShape2D" id=7] [sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 16.729, 28.1565 ) extents = Vector2( 16.0423, 12.4535 )
[sub_resource type="StreamTexture" id=8] [sub_resource type="StreamTexture" id=8]
flags = 4 flags = 4
load_path = "res://.import/trail 3.png-9960f4c5b964f5aca36ca6c97e309a5d.stex" load_path = "res://.import/trail 3.png-9960f4c5b964f5aca36ca6c97e309a5d.stex"
[sub_resource type="RectangleShape2D" id=9] [sub_resource type="RectangleShape2D" id=9]
extents = Vector2( 16.729, 28.1565 )
[sub_resource type="StreamTexture" id=10] [sub_resource type="StreamTexture" id=10]
flags = 4 flags = 4
load_path = "res://.import/trail 3.png-9960f4c5b964f5aca36ca6c97e309a5d.stex" load_path = "res://.import/trail 3.png-9960f4c5b964f5aca36ca6c97e309a5d.stex"
[sub_resource type="RectangleShape2D" id=11] [sub_resource type="RectangleShape2D" id=11]
extents = Vector2( 13.7803, 7.3572 )
[sub_resource type="StreamTexture" id=12] [sub_resource type="StreamTexture" id=12]
flags = 4 flags = 4
load_path = "res://.import/trail 3.png-9960f4c5b964f5aca36ca6c97e309a5d.stex"
[sub_resource type="RectangleShape2D" id=13]
extents = Vector2( 13.7803, 7.3572 )
[sub_resource type="StreamTexture" id=14]
flags = 4
load_path = "res://.import/trail 4.png-981c4881d0d8d742f95645909a2023bf.stex" load_path = "res://.import/trail 4.png-981c4881d0d8d742f95645909a2023bf.stex"
[node name="Node2D" type="Node2D"] [node name="Node2D" type="Node2D"]
...@@ -87,6 +95,26 @@ position = Vector2( -0.158181, -0.0184715 ) ...@@ -87,6 +95,26 @@ position = Vector2( -0.158181, -0.0184715 )
scale = Vector2( 0.101337, 0.101337 ) scale = Vector2( 0.101337, 0.101337 )
texture = ExtResource( 2 ) texture = ExtResource( 2 )
[node name="Terrarium" type="StaticBody2D" parent="."]
position = Vector2( 463.667, 393.29 )
input_pickable = true
script = ExtResource( 12 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "OMG! Where did Banana go??"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Terrarium"]
position = Vector2( -0.433167, 2.2196 )
scale = Vector2( 5, 5 )
shape = SubResource( 2 )
[node name="Sprite" type="Sprite" parent="Terrarium/CollisionShape2D"]
position = Vector2( -0.158142, -0.0184937 )
scale = Vector2( 0.222636, 0.101337 )
texture = SubResource( 3 )
[node name="Pile of clothes" type="StaticBody2D" parent="."] [node name="Pile of clothes" type="StaticBody2D" parent="."]
position = Vector2( 6.41483, 285.765 ) position = Vector2( 6.41483, 285.765 )
input_pickable = true input_pickable = true
...@@ -100,7 +128,7 @@ flavorText = "Augh my back. That's a lot of clothes." ...@@ -100,7 +128,7 @@ flavorText = "Augh my back. That's a lot of clothes."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Pile of clothes"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Pile of clothes"]
position = Vector2( 0.842377, -0.977234 ) position = Vector2( 0.842377, -0.977234 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 2 ) shape = SubResource( 4 )
[node name="Sprite" type="Sprite" parent="Pile of clothes/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Pile of clothes/CollisionShape2D"]
position = Vector2( -0.2771, -3.84143 ) position = Vector2( -0.2771, -3.84143 )
...@@ -122,7 +150,7 @@ flavorText = "A deconstructed pile of clothes" ...@@ -122,7 +150,7 @@ flavorText = "A deconstructed pile of clothes"
position = Vector2( -2.31012, 0.749359 ) position = Vector2( -2.31012, 0.749359 )
rotation = 3.57443 rotation = 3.57443
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 3 ) shape = SubResource( 5 )
[node name="Sprite" type="Sprite" parent="Pants/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Pants/CollisionShape2D"]
position = Vector2( 0.911179, -3.52747 ) position = Vector2( 0.911179, -3.52747 )
...@@ -142,7 +170,7 @@ flavorText = "A deconstructed pile of clothes" ...@@ -142,7 +170,7 @@ flavorText = "A deconstructed pile of clothes"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Shirt"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Shirt"]
position = Vector2( -1.78223, 0.549072 ) position = Vector2( -1.78223, 0.549072 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 4 ) shape = SubResource( 6 )
[node name="Sprite" type="Sprite" parent="Shirt/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Shirt/CollisionShape2D"]
position = Vector2( -0.277301, -0.137165 ) position = Vector2( -0.277301, -0.137165 )
...@@ -163,13 +191,13 @@ interactable = true ...@@ -163,13 +191,13 @@ interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Laptop"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Laptop"]
position = Vector2( -16.4264, -2.27527 ) position = Vector2( -16.4264, -2.27527 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 5 ) shape = SubResource( 7 )
[node name="Sprite" type="Sprite" parent="Laptop/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Laptop/CollisionShape2D"]
visible = false visible = false
position = Vector2( -0.277301, -0.137165 ) position = Vector2( -0.277301, -0.137165 )
scale = Vector2( 0.0197574, 0.0197574 ) scale = Vector2( 0.0197574, 0.0197574 )
texture = SubResource( 6 ) texture = SubResource( 8 )
[node name="Bathroom door" type="StaticBody2D" parent="."] [node name="Bathroom door" type="StaticBody2D" parent="."]
position = Vector2( 588.187, 226.932 ) position = Vector2( 588.187, 226.932 )
...@@ -181,7 +209,7 @@ interactable = true ...@@ -181,7 +209,7 @@ interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bathroom door"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Bathroom door"]
position = Vector2( -16.4264, -2.27527 ) position = Vector2( -16.4264, -2.27527 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 7 ) shape = SubResource( 9 )
__meta__ = { __meta__ = {
"_edit_group_": true "_edit_group_": true
} }
...@@ -190,7 +218,7 @@ __meta__ = { ...@@ -190,7 +218,7 @@ __meta__ = {
visible = false visible = false
position = Vector2( -0.277301, -0.137165 ) position = Vector2( -0.277301, -0.137165 )
scale = Vector2( 0.0197574, 0.0197574 ) scale = Vector2( 0.0197574, 0.0197574 )
texture = SubResource( 8 ) texture = SubResource( 10 )
[node name="Sando" type="StaticBody2D" parent="."] [node name="Sando" type="StaticBody2D" parent="."]
position = Vector2( -234.577, 395.301 ) position = Vector2( -234.577, 395.301 )
...@@ -207,12 +235,12 @@ flavorText = "If I hide my work under my laundry, it'll disappear. Haha no." ...@@ -207,12 +235,12 @@ flavorText = "If I hide my work under my laundry, it'll disappear. Haha no."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sando"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Sando"]
position = Vector2( -3.5491, 1.06189 ) position = Vector2( -3.5491, 1.06189 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 9 ) shape = SubResource( 11 )
[node name="Sprite" type="Sprite" parent="Sando/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Sando/CollisionShape2D"]
position = Vector2( -0.277301, -0.137165 ) position = Vector2( -0.277301, -0.137165 )
scale = Vector2( 0.0197574, 0.0197574 ) scale = Vector2( 0.0197574, 0.0197574 )
texture = SubResource( 10 ) texture = SubResource( 12 )
[node name="Towel" type="StaticBody2D" parent="."] [node name="Towel" type="StaticBody2D" parent="."]
position = Vector2( -67.9803, 464.817 ) position = Vector2( -67.9803, 464.817 )
...@@ -228,9 +256,9 @@ flavorText = "Augh my back." ...@@ -228,9 +256,9 @@ flavorText = "Augh my back."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Towel"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Towel"]
position = Vector2( -3.5491, 1.06189 ) position = Vector2( -3.5491, 1.06189 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 11 ) shape = SubResource( 13 )
[node name="Sprite" type="Sprite" parent="Towel/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Towel/CollisionShape2D"]
position = Vector2( -0.218535, -1.57275 ) position = Vector2( -0.218535, -1.57275 )
scale = Vector2( 0.03, 0.03 ) scale = Vector2( 0.03, 0.03 )
texture = SubResource( 12 ) texture = SubResource( 14 )
...@@ -61,7 +61,7 @@ bg_color = Color( 0.145098, 0.145098, 0.164706, 1 ) ...@@ -61,7 +61,7 @@ bg_color = Color( 0.145098, 0.145098, 0.164706, 1 )
[node name="Bedroom" parent="." instance=ExtResource( 1 )] [node name="Bedroom" parent="." instance=ExtResource( 1 )]
script = ExtResource( 4 ) script = ExtResource( 4 )
items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Towel"), NodePath("Laundry basket"), NodePath("Laptop"), NodePath("Pile of clothes"), NodePath("Bathroom door") ] items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Towel"), NodePath("Laundry basket"), NodePath("Laptop"), NodePath("Pile of clothes"), NodePath("Bathroom door"), NodePath("Terrarium") ]
[node name="Desk" parent="." instance=ExtResource( 26 )] [node name="Desk" parent="." instance=ExtResource( 26 )]
visible = false visible = false
...@@ -132,7 +132,7 @@ items = [ NodePath("Nana from afar"), NodePath("Other balcony"), NodePath("Balco ...@@ -132,7 +132,7 @@ items = [ NodePath("Nana from afar"), NodePath("Other balcony"), NodePath("Balco
[node name="Event Handler" type="Node2D" parent="."] [node name="Event Handler" type="Node2D" parent="."]
position = Vector2( 460.602, 18.6417 ) position = Vector2( 460.602, 18.6417 )
script = ExtResource( 12 ) script = ExtResource( 12 )
eventItems = [ NodePath("../Laundry basket/To do list"), NodePath("../Bedroom/Laundry basket"), NodePath("../Laundry basket/Return"), NodePath("../Fridge/Return"), NodePath("../Kitchen/Fridge"), NodePath("../Laundry area/Groceries"), NodePath("../Fridge/Energy handler"), NodePath("../Laundry area/Dialogue control"), NodePath("../Laundry - Notepad/Return"), NodePath("../Laundry - Notepad/Dialogue control"), NodePath("../Bedroom/Bathroom door"), NodePath("../Bathroom/Door - to Bedroom"), NodePath("../Living room/Balcony door"), NodePath("../Balcony/Door to living room"), NodePath("../Living room/Front door"), NodePath("../Hallway/Door to Moxie"), NodePath("../Hallway/Door to neighbor"), NodePath("../Neighbor\'s room/Neighbor to hallway"), NodePath("../Neighbor\'s balcony/Balcony to neighbor\'s room"), NodePath("../Neighbor\'s room/Neighbor to balcony"), NodePath("../Bedroom/Laptop"), NodePath("../Desk/Return"), NodePath("../Inside cabinet/Return"), NodePath("../Kitchen/Cabinet"), NodePath("../Desk/Laptop") ] eventItems = [ NodePath("../Laundry basket/To do list"), NodePath("../Bedroom/Laundry basket"), NodePath("../Laundry basket/Return"), NodePath("../Fridge/Return"), NodePath("../Kitchen/Fridge"), NodePath("../Laundry area/Groceries"), NodePath("../Fridge/Energy handler"), NodePath("../Laundry area/Dialogue control"), NodePath("../Laundry - Notepad/Return"), NodePath("../Laundry - Notepad/Dialogue control"), NodePath("../Bedroom/Bathroom door"), NodePath("../Bathroom/Door - to Bedroom"), NodePath("../Living room/Balcony door"), NodePath("../Balcony/Door to living room"), NodePath("../Living room/Front door"), NodePath("../Hallway/Door to Moxie"), NodePath("../Hallway/Door to neighbor"), NodePath("../Neighbor\'s room/Neighbor to hallway"), NodePath("../Neighbor\'s balcony/Balcony to neighbor\'s room"), NodePath("../Neighbor\'s room/Neighbor to balcony"), NodePath("../Bedroom/Laptop"), NodePath("../Desk/Return"), NodePath("../Inside cabinet/Return"), NodePath("../Kitchen/Cabinet"), NodePath("../Desk/Laptop"), NodePath("../Bedroom/Terrarium") ]
[node name="Moxie" type="Sprite" parent="."] [node name="Moxie" type="Sprite" parent="."]
position = Vector2( 214.135, 386.725 ) position = Vector2( 214.135, 386.725 )
...@@ -147,7 +147,7 @@ current = true ...@@ -147,7 +147,7 @@ current = true
[node name="UI" type="Control" parent="."] [node name="UI" type="Control" parent="."]
margin_left = 214.0 margin_left = 214.0
margin_top = 387.0 margin_top = 387.0
margin_right = 1031.0 margin_right = 246.0
margin_bottom = 872.0 margin_bottom = 872.0
mouse_filter = 2 mouse_filter = 2
__meta__ = { __meta__ = {
...@@ -298,7 +298,7 @@ __meta__ = { ...@@ -298,7 +298,7 @@ __meta__ = {
margin_left = 21.0 margin_left = 21.0
margin_top = 20.0 margin_top = 20.0
margin_right = 518.0 margin_right = 518.0
margin_bottom = 49.0 margin_bottom = 74.0
scroll_active = false scroll_active = false
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
......
...@@ -11,21 +11,26 @@ func interaction(selected, clicked): #selected = item in inventory, clicked = it ...@@ -11,21 +11,26 @@ func interaction(selected, clicked): #selected = item in inventory, clicked = it
"Shirt", "Towel", "Pants", "Sando": "Shirt", "Towel", "Pants", "Sando":
return "Into the basket you go." return "Into the basket you go."
"Terrarium":
"Placeholder 2":
match selected: match selected:
"Placeholder 1": "Placeholder 1":
return "Using Placeholder 1 on 2" return "Using Placeholder 1 on 2"
"Placeholder 3": "Placeholder 3":
return "Using Placeholder 3 on 2" return "Using Placeholder 3 on 2"
"Placeholder 3": "Pile of clothes":
match selected: match selected:
"Placeholder 1": "Placeholder 1":
return "Using Placeholder 1 on 3" return "Using Placeholder 1 on 3"
"Placeholder 2": "Placeholder 2":
return "Using Placeholder 1 on 3" return "Using Placeholder 1 on 3"
"Laptop":
match selected:
"Placeholder 1":
return "Using Placeholder 1 on 3"
"Placeholder 2":
return "Using Placeholder 1 on 3"
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta): #func _process(delta):
# pass # pass
extends "res://Item.gd" extends "res://Item.gd"
onready var unlocked = false
signal enter signal enter
signal foundBanana
# 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():
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")
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
emit_signal("enter") emit_signal("enter")
pass unlocked = true
inventory.unselect_all() #unselect item
extends "res://Item.gd"
signal checked
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func mouseInteraction():
.mouseInteraction()
if flavorText != "Okay... if I were a lizard, where would I be?":
emit_signal("checked", "Find Banana")
flavorText = "Okay... if I were a lizard, where would I be?"
func passEvent(handler):
connect("checked", handler,"_add_quest")
pass
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