Commit a2e12d16 authored by Julia Santos's avatar Julia Santos

Added a description in the Notepad listing how many lab notes the player has,...

Added a description in the Notepad listing how many lab notes the player has, added plain background to plant puzzle
parent c7932a11
...@@ -90,7 +90,7 @@ func _start_lab(): # trying the lab the first time, adds the new quests -> no lo ...@@ -90,7 +90,7 @@ func _start_lab(): # trying the lab the first time, adds the new quests -> no lo
pass pass
func _finish_lab(): func _finish_lab():
if quests.size() == 1 and quests.get_quest(0) == "Do Lab": if quests.size() == 1 and quests.get_quest(0) == "Do Lab (Notes: 4/4)":
_start_cutscene_3() _start_cutscene_3()
dialogue.text = "Congratulations!" dialogue.text = "Congratulations!"
dialogue.playText() dialogue.playText()
...@@ -109,6 +109,7 @@ func _remove_quest(questName): # removing a quest from the quest list ...@@ -109,6 +109,7 @@ func _remove_quest(questName): # removing a quest from the quest list
func _add_lab_note(): # when a new lab note is retrieved func _add_lab_note(): # when a new lab note is retrieved
labNotes = labNotes + 1 labNotes = labNotes + 1
print("Lab notes: " + str(labNotes)) print("Lab notes: " + str(labNotes))
quests.addLabNote()
func get_lab_notes(): # returns how many lab notes the player has found func get_lab_notes(): # returns how many lab notes the player has found
return labNotes return labNotes
...@@ -136,11 +137,13 @@ func _foundBanana(): # keeps track that Banana has been spotted on the balcony ...@@ -136,11 +137,13 @@ func _foundBanana(): # keeps track that Banana has been spotted on the balcony
foundBanana = true foundBanana = true
func finished2ndRound(): func finished2ndRound():
if !desk.get_node("Laptop").gaveTired():
desk.get_node("Laptop").tired() desk.get_node("Laptop").tired()
func _self_care(): func _self_care():
livingRoom.get_node("Yoga mat").flavorText = "How do you do yoga again? I think that yoga guy posted a new video on some poses earlier." livingRoom.get_node("Yoga mat").flavorText = "How do you do yoga again? I think that yoga guy posted a new video on some poses earlier."
livingRoom.get_node("Yoga mat").canYoga() livingRoom.get_node("Yoga mat").canYoga()
if !desk.get_node("Laptop").gaveTired():
quests.add("Eat a snack") quests.add("Eat a snack")
quests.add("Do something relaxing") quests.add("Do something relaxing")
kitchen.get_node("Granola bar").canEatGranola() kitchen.get_node("Granola bar").canEatGranola()
...@@ -165,6 +168,7 @@ func bananaTaken(): # when banana is taken from the balcony, hides her from neig ...@@ -165,6 +168,7 @@ func bananaTaken(): # when banana is taken from the balcony, hides her from neig
livingRoom.get_node("Banana").queue_free() livingRoom.get_node("Banana").queue_free()
takenBanana = true takenBanana = true
# ----------------- Cutscene initiators ----------------- # ----------------- Cutscene initiators -----------------
func _start_cutscene_1(): func _start_cutscene_1():
inventory.unselect_all() inventory.unselect_all()
...@@ -182,7 +186,7 @@ func _start_cutscene_2(): ...@@ -182,7 +186,7 @@ func _start_cutscene_2():
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("Repot plants") quests.add("Repot plants")
quests.add("Do Lab") quests.add("Do Lab (Notes: 0/4)")
newQuests = true newQuests = true
movementHandle.finishTutorial() movementHandle.finishTutorial()
get_parent().get_node("Desk/Laptop").start() get_parent().get_node("Desk/Laptop").start()
......
...@@ -23,7 +23,6 @@ func pickup(): ...@@ -23,7 +23,6 @@ func pickup():
get_parent().get_node("Mirror").gotNote() get_parent().get_node("Mirror").gotNote()
elif get_name() == "Lab Note - Cabinet": elif get_name() == "Lab Note - Cabinet":
eventHandler.getCabinet("Lab Notes") eventHandler.getCabinet("Lab Notes")
#var tooltip = "Lab Notes (" + str(num) + ")" #var tooltip = "Lab Notes (" + str(num) + ")"
#inventory.set_item_tooltip(inventory.hasItem("Lab Notes"), tooltip) #inventory.set_item_tooltip(inventory.hasItem("Lab Notes"), tooltip)
#inventory.updateUI() #inventory.updateUI()
......
[gd_scene load_steps=17 format=2] [gd_scene load_steps=19 format=2]
[ext_resource path="res://Item - Notepad.gd" type="Script" id=1] [ext_resource path="res://Item - Notepad.gd" type="Script" id=1]
[ext_resource path="res://Scripts/Dialogue control/Dialogue Contro - Living room notepad.gd" type="Script" id=2] [ext_resource path="res://Scripts/Dialogue control/Dialogue Contro - Living room notepad.gd" type="Script" id=2]
...@@ -9,31 +9,49 @@ ...@@ -9,31 +9,49 @@
[ext_resource path="res://assets/Thesis Clickables/soil.png" type="Texture" id=7] [ext_resource path="res://assets/Thesis Clickables/soil.png" type="Texture" id=7]
[ext_resource path="res://assets/Thesis Clickables/tabo (pour).png" type="Texture" id=8] [ext_resource path="res://assets/Thesis Clickables/tabo (pour).png" type="Texture" id=8]
[ext_resource path="res://assets/Thesis Clickables/soil (pour).png" type="Texture" id=9] [ext_resource path="res://assets/Thesis Clickables/soil (pour).png" type="Texture" id=9]
[ext_resource path="res://assets/Backgrounds/living room.png" type="Texture" id=10]
[ext_resource path="res://assets/Thesis Clickables/pot.png" type="Texture" id=12] [ext_resource path="res://assets/Thesis Clickables/pot.png" type="Texture" id=12]
[sub_resource type="RectangleShape2D" id=1] [sub_resource type="StyleBoxFlat" id=1]
extents = Vector2( 26.4732, 26.6968 ) bg_color = Color( 0.992157, 0.815686, 0.733333, 1 )
[sub_resource type="RectangleShape2D" id=2] [sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 20.5876, 32.5145 ) extents = Vector2( 26.4732, 26.6968 )
[sub_resource type="RectangleShape2D" id=3] [sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 19.9646, 20.1882 ) extents = Vector2( 20.5876, 32.5145 )
[sub_resource type="RectangleShape2D" id=4] [sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 19.9646, 20.1882 ) extents = Vector2( 19.9646, 20.1882 )
[sub_resource type="StreamTexture" id=5] [sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 19.9646, 20.1882 )
[sub_resource type="StreamTexture" id=6]
flags = 4 flags = 4
load_path = "res://.import/return arrow.png-ba7c2fea6c5a220a249845f29bbe9177.stex" load_path = "res://.import/return arrow.png-ba7c2fea6c5a220a249845f29bbe9177.stex"
[sub_resource type="RectangleShape2D" id=6] [sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 15.414, 13.6335 ) extents = Vector2( 15.414, 13.6335 )
[node name="Node2D" type="Node2D"] [node name="Node2D" type="Node2D"]
position = Vector2( 38.699, 16.0459 ) position = Vector2( 38.699, 16.0459 )
[node name="BG" type="Sprite" parent="."] [node name="BG" type="Sprite" parent="."]
visible = false
position = Vector2( 59.1181, 29.4802 )
scale = Vector2( 1.96764, 1.96764 )
texture = ExtResource( 10 )
[node name="Panel" type="Panel" parent="."]
margin_left = -76.0
margin_top = -48.0
margin_right = 1016.0
margin_bottom = 617.0
custom_styles/panel = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Dialogue control" type="Control" parent="."] [node name="Dialogue control" type="Control" parent="."]
margin_right = 40.0 margin_right = 40.0
...@@ -75,7 +93,7 @@ texture = ExtResource( 7 ) ...@@ -75,7 +93,7 @@ texture = ExtResource( 7 )
visible = false visible = false
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 1 ) shape = SubResource( 2 )
disabled = true disabled = true
[node name="Plant" type="StaticBody2D" parent="."] [node name="Plant" type="StaticBody2D" parent="."]
...@@ -101,7 +119,7 @@ texture = ExtResource( 4 ) ...@@ -101,7 +119,7 @@ texture = ExtResource( 4 )
visible = false visible = false
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 2 ) shape = SubResource( 3 )
disabled = true disabled = true
[node name="Soil" type="StaticBody2D" parent="."] [node name="Soil" type="StaticBody2D" parent="."]
...@@ -115,7 +133,7 @@ interactable = true ...@@ -115,7 +133,7 @@ interactable = true
visible = false visible = false
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 3 ) shape = SubResource( 4 )
disabled = true disabled = true
[node name="Hitbox" type="CollisionPolygon2D" parent="Soil"] [node name="Hitbox" type="CollisionPolygon2D" parent="Soil"]
...@@ -144,7 +162,7 @@ interactable = true ...@@ -144,7 +162,7 @@ interactable = true
visible = false visible = false
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 4 ) shape = SubResource( 5 )
disabled = true disabled = true
[node name="Hitbox" type="CollisionPolygon2D" parent="Water"] [node name="Hitbox" type="CollisionPolygon2D" parent="Water"]
...@@ -178,13 +196,13 @@ polygon = PoolVector2Array( -79, -408.7, -79, -171, 454.9, -171, 470, -161.5, 47 ...@@ -178,13 +196,13 @@ polygon = PoolVector2Array( -79, -408.7, -79, -171, 454.9, -171, 470, -161.5, 47
[node name="Sprite" type="Sprite" parent="Return/Hitbox"] [node name="Sprite" type="Sprite" parent="Return/Hitbox"]
position = Vector2( -6.10352e-05, 0 ) position = Vector2( -6.10352e-05, 0 )
texture = SubResource( 5 ) texture = SubResource( 6 )
[node name="h" type="CollisionShape2D" parent="Return"] [node name="h" type="CollisionShape2D" parent="Return"]
visible = false visible = false
position = Vector2( -2.89487, 2.65125 ) position = Vector2( -2.89487, 2.65125 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 6 ) shape = SubResource( 7 )
disabled = true disabled = true
[node name="Label" type="Label" parent="Return"] [node name="Label" type="Label" parent="Return"]
......
...@@ -225,7 +225,7 @@ items = [ NodePath("Nana from afar"), NodePath("Other balcony"), NodePath("Balco ...@@ -225,7 +225,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/Laundry door"), 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"), NodePath("../Bathroom/Lab Note - Bathroom"), NodePath("../Inside cabinet/Lab Note - Cabinet"), NodePath("../Living room/Lab notes"), NodePath("../Bedroom/Pants"), NodePath("../Bedroom/Shirt"), NodePath("../Bedroom/Sando"), NodePath("../Bedroom/Towel"), NodePath("../Bathroom/Sink"), NodePath("../Bathroom/Toilet"), NodePath("../Bathroom/Mirror"), NodePath("../Bathroom/Mess on floor"), NodePath("../Hallway/Trash chute"), NodePath("../Neighbor\'s room/Ladder"), NodePath("../Living room - Notepad/Return"), NodePath("../Living room/Plants"), NodePath("../Living room - Notepad/Dialogue control"), NodePath("../Balcony/Other plants"), NodePath("../Living room/Yoga mat"), NodePath("../Neighbor\'s balcony/Other balcony") ] 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/Laundry door"), 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"), NodePath("../Bathroom/Lab Note - Bathroom"), NodePath("../Inside cabinet/Lab Note - Cabinet"), NodePath("../Living room/Lab notes"), NodePath("../Bedroom/Pants"), NodePath("../Bedroom/Shirt"), NodePath("../Bedroom/Sando"), NodePath("../Bedroom/Towel"), NodePath("../Bathroom/Sink"), NodePath("../Bathroom/Toilet"), NodePath("../Bathroom/Mirror"), NodePath("../Bathroom/Mess on floor"), NodePath("../Hallway/Trash chute"), NodePath("../Neighbor\'s room/Ladder"), NodePath("../Living room - Notepad/Return"), NodePath("../Living room/Plants"), NodePath("../Living room - Notepad/Dialogue control"), NodePath("../Balcony/Other plants"), NodePath("../Living room/Yoga mat"), NodePath("../Neighbor\'s balcony/Other balcony"), NodePath("../Kitchen/Granola bar") ]
[node name="Moxie" type="Control" parent="."] [node name="Moxie" type="Control" parent="."]
margin_left = 303.56 margin_left = 303.56
...@@ -613,6 +613,7 @@ __meta__ = { ...@@ -613,6 +613,7 @@ __meta__ = {
} }
[node name="Cutscenes" type="Node2D" parent="."] [node name="Cutscenes" type="Node2D" parent="."]
visible = false
z_index = 2 z_index = 2
[node name="0" parent="Cutscenes" instance=ExtResource( 42 )] [node name="0" parent="Cutscenes" instance=ExtResource( 42 )]
......
extends RichTextLabel extends RichTextLabel
onready var energyBar = get_parent().get_parent().get_node("Energy bar") onready var energyBar = get_parent().get_parent().get_node("Energy bar")
onready var notes = 0
# This script handles the list of quests that the player must accomplish, and displays it # This script handles the list of quests that the player must accomplish, and displays it
# variables editable in the Inspector # variables editable in the Inspector
...@@ -30,12 +31,13 @@ func finishQuest(q): # removes a quest from the list ...@@ -30,12 +31,13 @@ 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 q != "Eat" and q !="Do laundry" :
if quests.size() == 1 and quests[0] == "Do Lab": if quests.size() == 1 and (quests[0] == "Do Lab (Notes: 3/4)" or quests[0] == "Do Lab (Notes: 2/4)"):
get_parent().get_parent().get_parent().get_node("Event Handler").finished2ndRound() 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.." # 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
clear()
if quests.size() > 0: if quests.size() > 0:
text = "- " + quests.join("\n- ") # prints all quests on the notepad text = "- " + quests.join("\n- ") # prints all quests on the notepad
else: else:
...@@ -53,3 +55,21 @@ func size(): ...@@ -53,3 +55,21 @@ func size():
func get_quest(index): func get_quest(index):
return quests[index] return quests[index]
func findQuest(questInq):
var has = 0
while has < quests.size():
if quests[has] == questInq:
return has
else:
has +=1
return has
func addLabNote():
var index = findQuest("Do Lab (Notes: " + str(notes) + "/4)")
notes += 1
var newQuest = "Do Lab (Notes: " + str(notes) + "/4)"
quests.set(index, newQuest)
showQuests()
...@@ -46,6 +46,8 @@ func objInteraction(selected): # when an object is used on it ...@@ -46,6 +46,8 @@ func objInteraction(selected): # when an object is used on it
func start(): func start():
started = true started = true
func gaveTired():
return givenTired
func tired(): func tired():
flavorText = "Too tired. Gotta relax first. Need carbohydrates. Can't I do something less stressful first? Please and thank you." flavorText = "Too tired. Gotta relax first. Need carbohydrates. Can't I do something less stressful first? Please and thank you."
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