Commit 66282c27 authored by Julia Santos's avatar Julia Santos

Made it so that Nana appears in the balcony door, and that the toilet has a...

Made it so that Nana appears in the balcony door, and that the toilet has a visible mess. Also made it possible to finish the lab using lab notes.
parent 12a7a0ab
......@@ -92,6 +92,8 @@ func _start_lab(): # trying the lab the first time, adds the new quests -> no lo
func _finish_lab():
if quests.size() == 1 and quests.get_quest(0) == "Do Lab":
_start_cutscene_3()
dialogue.text = "Congratulations!"
dialogue.playText()
else:
dialogue.text = "Too tired. Gotta relax first. Need carbohydrates. Can't I do something less stressful first? Please and thank you."
dialogue.playText()
......@@ -160,6 +162,7 @@ func getPlungered():
func bananaTaken(): # when banana is taken from the balcony, hides her from neighbor's balcony
if !takenBanana:
neighborsBalcony.get_node("Nana from afar").queue_free()
livingRoom.get_node("Banana").queue_free()
takenBanana = true
# ----------------- Cutscene initiators -----------------
......
......@@ -100,7 +100,7 @@ func objInteraction(selected): # when an object is used on it
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!
dialogueBox.text = "I don't think that would help. (No flavor text)" #can replace this later!
if inventory.get_name() == "Words":
inventory.unselect_all()
dialogueBox.playText()
......@@ -84,9 +84,6 @@ position = Vector2( 642.065, 449.125 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 6 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Clicked"
......@@ -100,7 +97,7 @@ disabled = true
[node name="Hitbox" type="CollisionPolygon2D" parent="Door to living room"]
position = Vector2( -198.468, -174.117 )
scale = Vector2( -1.11961, 1.13547 )
polygon = PoolVector2Array( 512, -222.5, 512, -150, 512, -4.89999, 512, 84, 512, 201.3, 512, 295, 508, 295, 266, 134.4, 266, 125, 265, -280, 271.2, -280, 278, -288.4, 278, -299.8 )
polygon = PoolVector2Array( 512, -222.5, 512, -150, 512, -4.89999, 512, 84, 512, 201.3, 512, 295, 508, 295, 309.648, 168.079, 313.418, 141.528, 322.392, 89.6509, 330.523, 36.9074, 314.975, 26.7806, 285.876, 20.8734, 285.733, 11.0279, 328.953, -59.1562, 332.092, -98.2567, 312.692, -95.1624, 333.223, -195.126, 314.415, -187.607, 311.979, -208.245, 297.144, -216.402, 277.308, -196.629, 277.816, -235.724, 268.464, -244.432, 271.2, -280, 278, -288.4, 278, -299.8 )
[node name="Sprite" type="Sprite" parent="Door to living room/Hitbox"]
visible = false
......@@ -115,7 +112,7 @@ scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 7 )
interactable = true
flavorText = "Great listeners! Terrible conversationalists."
flavorText = "Great listeners! Terrible conversationalists. The balcony is great for sunlight though."
[node name="h" type="CollisionShape2D" parent="Other plants"]
visible = false
......
[gd_scene load_steps=20 format=2]
[gd_scene load_steps=21 format=2]
[ext_resource path="res://Scripts/Dialogue control/Dialogue Contro - Living room.gd" type="Script" id=1]
[ext_resource path="res://assets/Thesis Clickables/yoga mat.png" type="Texture" id=2]
......@@ -14,6 +14,7 @@
[ext_resource path="res://assets/Backgrounds/living room.png" type="Texture" id=12]
[ext_resource path="res://assets/Thesis Clickables/balcony door open.png" type="Texture" id=13]
[ext_resource path="res://assets/Thesis Clickables/yoga mat (floor).png" type="Texture" id=14]
[ext_resource path="res://assets/Thesis Clickables/banana over.png" type="Texture" id=15]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 31.6102, 50.0827 )
......@@ -47,6 +48,11 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Banana" type="Sprite" parent="."]
position = Vector2( 985.178, 377.923 )
scale = Vector2( 0.271758, 0.271758 )
texture = ExtResource( 15 )
[node name="Balcony door" type="StaticBody2D" parent="."]
position = Vector2( 779.812, 412.312 )
input_pickable = true
......
......@@ -32,6 +32,16 @@ func mouseInteraction():
else:
.mouseInteraction()
func objInteraction(selected): # when an object is used on it
if inventory.get_item_text(selected) == "Lab Notes":
if givenTired and eventHandler.get_lab_notes() == 4:
emit_signal("finish_lab")
elif !givenTired and flavorText == "Too tired. Gotta relax first. Need carbohydrates. Can't I do something less stressful first? Please and thank you.":
emit_signal("tired")
givenTired = true
.mouseInteraction()
else:
.objInteraction(selected)
func start():
started = true
......
......@@ -9,10 +9,7 @@ func interaction(selected, clicked): #selected = item in inventory, clicked = it
"Laptop":
match selected:
"Lab Notes":
if (get_parent().get_node("Laptop").getNotes == 3):
return "Alright Lab. I've put you off long enough. But... Where do I start?"
else:
return "I don't have everything yet.."
return "I don't think my notes are complete. Why did I put them all in different places?"
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
......
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