Commit d19d7e6b authored by Julia Santos's avatar Julia Santos

Going back to the laptop after finishing the 2nd round of quests now adds the last round of quests:

parent 8234d1e1
extends StaticBody2D
onready var sceneProgress = 0
onready var dialogueBox = get_parent().get_node("Dialogue")
onready var tracking = false
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func _input(event): # executes when clicked on
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed:
if tracking:
dialogueBox.text = getDialogue()
func getDialogue():
match sceneProgress:
0:
sceneProgress += 1
return "Dialogue 2"
1:
sceneProgress += 1
return "Dialogue 3"
2:
sceneProgress += 1
return "Dialogue 4"
3:
sceneProgress = 0
get_parent().queue_free() # dont need that scene anymore
tracking = false
print("Deleting scene 2b")
return ""
func start():
tracking = true
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Cutscenes/Cutscene 3.gd" type="Script" id=1]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 515.38, 299.307 )
[node name="Node2D" type="Node2D"]
[node name="Panel" type="Panel" parent="."]
margin_left = -15.0
margin_top = -13.0
margin_right = 1047.0
margin_bottom = 628.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="."]
margin_left = 101.975
margin_top = 61.2005
margin_right = 238.975
margin_bottom = 143.2
rect_scale = Vector2( 6, 6 )
text = "Cutscene 3"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Dialogue" type="Label" parent="."]
margin_left = 293.916
margin_top = 382.225
margin_right = 430.916
margin_bottom = 464.225
rect_scale = Vector2( 3, 3 )
text = "Dialogue 1"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Scene control" type="StaticBody2D" parent="."]
input_pickable = true
script = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Scene control"]
position = Vector2( 511.03, 299.848 )
shape = SubResource( 1 )
...@@ -88,7 +88,7 @@ func _start_lab(): # trying the lab the first time, adds the new quests ...@@ -88,7 +88,7 @@ func _start_lab(): # trying the lab the first time, adds the new quests
quests.add("Repot plants") quests.add("Repot plants")
quests.add("Figure out what's making that noise & get rid of it") quests.add("Figure out what's making that noise & get rid of it")
quests.add("Feed Banana") quests.add("Feed Banana")
quests.add("Do Yoga") quests.add("Do Lab")
newQuests = true newQuests = true
movementHandle.finishTutorial() movementHandle.finishTutorial()
get_parent().get_node("Desk/Laptop").start() get_parent().get_node("Desk/Laptop").start()
...@@ -130,6 +130,13 @@ func getClean(): # returns the number of objects that have been cleaned ...@@ -130,6 +130,13 @@ func getClean(): # returns the number of objects that have been cleaned
func _foundBanana(): # keeps track that Banana has been spotted on the balcony func _foundBanana(): # keeps track that Banana has been spotted on the balcony
foundBanana = true foundBanana = true
func finished2ndRound():
desk.get_node("Laptop").tired()
func _self_care():
quests.add("Eat something")
quests.add("Do something relaxing")
# ----------------- Cutscene initiators ----------------- # ----------------- Cutscene initiators -----------------
func _start_cutscene_1(): func _start_cutscene_1():
cutsceneHandler.get_node("1").show() cutsceneHandler.get_node("1").show()
...@@ -215,6 +222,9 @@ func _plants_finished(): ...@@ -215,6 +222,9 @@ func _plants_finished():
livingRoom.get_node("Plants").interactable = false livingRoom.get_node("Plants").interactable = false
livingRoom.get_node("Plants").retrievable = true livingRoom.get_node("Plants").retrievable = true
livingRoom.get_node("Plants").flavorText = "Time to bring these outside for some sunlight!" livingRoom.get_node("Plants").flavorText = "Time to bring these outside for some sunlight!"
inventory.remove_item_name("Pot")
inventory.remove_item_name("Shovel")
inventory.remove_item_name("Tabo with water")
func _return_plant_notepad(): # exiting laundry notebook puzzle func _return_plant_notepad(): # exiting laundry notebook puzzle
zoom_out() zoom_out()
......
[gd_scene load_steps=39 format=2] [gd_scene load_steps=40 format=2]
[ext_resource path="res://Main rooms/Test room 1.tscn" type="PackedScene" id=1] [ext_resource path="res://Main rooms/Test room 1.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/189066690_228150108704696_3850052974465333899_n.png" type="Texture" id=2] [ext_resource path="res://assets/189066690_228150108704696_3850052974465333899_n.png" type="Texture" id=2]
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
[ext_resource path="res://MoxieSprite.gd" type="Script" id=30] [ext_resource path="res://MoxieSprite.gd" type="Script" id=30]
[ext_resource path="res://Paths/Bedroom.tres" type="Curve2D" id=31] [ext_resource path="res://Paths/Bedroom.tres" type="Curve2D" id=31]
[ext_resource path="res://Main rooms/Living room - Notepad.tscn" type="PackedScene" id=32] [ext_resource path="res://Main rooms/Living room - Notepad.tscn" type="PackedScene" id=32]
[ext_resource path="res://Cutscenes/Cutscene 3.tscn" type="PackedScene" id=33]
[sub_resource type="Animation" id=1] [sub_resource type="Animation" id=1]
resource_name = "Notepad open" resource_name = "Notepad open"
...@@ -223,7 +224,7 @@ margin_right = 265.0 ...@@ -223,7 +224,7 @@ margin_right = 265.0
margin_bottom = 116.0 margin_bottom = 116.0
mouse_filter = 2 mouse_filter = 2
custom_colors/default_color = Color( 0, 0, 0, 1 ) custom_colors/default_color = Color( 0, 0, 0, 1 )
text = "To Do: (click to expand)" text = "To Do (click to expand):"
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
...@@ -372,6 +373,9 @@ visible = false ...@@ -372,6 +373,9 @@ visible = false
[node name="2b" parent="Cutscenes" instance=ExtResource( 29 )] [node name="2b" parent="Cutscenes" instance=ExtResource( 29 )]
visible = false visible = false
[node name="3" parent="Cutscenes" instance=ExtResource( 33 )]
visible = false
[connection signal="pressed" from="UI/Button" to="UI/Inventory" method="_on_Button_pressed"] [connection signal="pressed" from="UI/Button" to="UI/Inventory" method="_on_Button_pressed"]
[editable path="Bedroom"] [editable path="Bedroom"]
......
...@@ -27,7 +27,10 @@ func finishQuest(q): # removes a quest from the list ...@@ -27,7 +27,10 @@ func finishQuest(q): # removes a quest from the list
index += 1 index += 1
if !found: if !found:
print("Unable to delete " + q) print("Unable to delete " + q)
if q != "Eat" and q!="Do laundry" :
if quests.size() == 1 and quests[0] == "Do Lab":
get_parent().get_parent().get_parent().get_node("Event Handler").finished2ndRound()
# get_parent().get_parent().get_node("Dialogue Box/RichTextLabel").text = "Well that's done! I guess the only thing left to do is my lab.."
func showQuests(): # concatenates the quests into an easy-to-read-list and displays it func showQuests(): # concatenates the quests into an easy-to-read-list and displays it
if quests.size() > 0: if quests.size() > 0:
......
extends "res://Item.gd" extends "res://Item.gd"
signal finish_lab signal finish_lab
signal start_lab signal start_lab
signal tired
onready var started = false onready var started = false
onready var eventHandler onready var eventHandler
...@@ -14,6 +15,7 @@ func _ready(): ...@@ -14,6 +15,7 @@ func _ready():
func passEvent(handler): func passEvent(handler):
connect("start_lab", handler,"_start_lab") connect("start_lab", handler,"_start_lab")
connect("finish_lab", handler, "_finished_lab") connect("finish_lab", handler, "_finished_lab")
connect("tired", handler, "_self_care")
eventHandler = handler eventHandler = handler
func mouseInteraction(): func mouseInteraction():
...@@ -21,8 +23,16 @@ func mouseInteraction(): ...@@ -21,8 +23,16 @@ func mouseInteraction():
if !started: # if the quests have been given yet if !started: # if the quests have been given yet
emit_signal("start_lab") emit_signal("start_lab")
else: else:
if eventHandler.get_lab_notes() == 4: if flavorText == "Too tired. Gotta relax first. Need carbohydrates. Can't I do something less stressful first? Please and thank you.":
emit_signal("tired")
.mouseInteraction()
elif eventHandler.get_lab_notes() == 4:
emit_signal("finish_lab") emit_signal("finish_lab")
func start(): func start():
started = true started = true
func tired():
flavorText = "Too tired. Gotta relax first. Need carbohydrates. Can't I do something less stressful first? Please and thank you."
...@@ -23,7 +23,7 @@ func objInteraction(selected): # when an object is used on it ...@@ -23,7 +23,7 @@ func objInteraction(selected): # when an object is used on it
if quests.hasQuest("Feed Banana"): # Need to feed banana first if quests.hasQuest("Feed Banana"): # Need to feed banana first
dialogueBox.text = "Plants later. Banana first. I don't even wanna know how long she's been trapped out here, poor thing..." dialogueBox.text = "Plants later. Banana first. I don't even wanna know how long she's been trapped out here, poor thing..."
else: else:
if inventory.hasItem("Pot") and inventory.hasItem("Shovel") and inventory.hasItem("Tabo with water"): if inventory.hasItem("Pot") != -1 and inventory.hasItem("Shovel") != -1 and inventory.hasItem("Tabo with water") != -1:
# banana is fed and have all needed equipment # banana is fed and have all needed equipment
emit_signal("notebook_puzzle") emit_signal("notebook_puzzle")
else: 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