Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
To Do Break Down
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
breakdown
To Do Break Down
Commits
184d1ea2
Commit
184d1ea2
authored
Dec 06, 2021
by
Julia Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean bathroom quest can now be completed
parent
505341b9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
108 additions
and
26 deletions
+108
-26
Event Handler.gd
Event Handler.gd
+16
-5
Balcony.tscn
Main rooms/Balcony.tscn
+8
-8
Bathroom.tscn
Main rooms/Bathroom.tscn
+11
-10
Multi.tscn
Multi.tscn
+1
-1
Quests.gd
Quests.gd
+5
-0
Mess on floor.gd
Scripts/Mess on floor.gd
+24
-0
Mirror.gd
Scripts/Mirror.gd
+10
-2
Sink.gd
Scripts/Sink.gd
+26
-0
Toilet.gd
Scripts/Toilet.gd
+7
-0
No files found.
Event Handler.gd
View file @
184d1ea2
...
...
@@ -33,6 +33,7 @@ onready var newQuests = false
onready var lockedNotepad #if ur locked from certain areas bc u havent gotten the notebook yet
onready var labNotes = 0
onready var clothes = 0
onready var bathroomClean = 0
#items in the rooms that need access to the event handler
export(Array, NodePath) onready var eventItems
...
...
@@ -82,7 +83,7 @@ func _groceries_put_away(): # when the groceries are put away
func _eaten(): # completing first "Eat" quest
quests.finishQuest("Eat")
func _start_lab():
func _start_lab():
# trying the lab the first time, adds the new quests
if !quests.hasQuest("Eat") and !quests.hasQuest("Do laundry"):
quests.add("Clean bathroom")
quests.add("Take care of plants")
...
...
@@ -111,6 +112,13 @@ func _add_clothes():
func get_clothes():
return clothes
func _clean():
bathroomClean = bathroomClean + 1
print("Cleaned " + str(bathroomClean))
if bathroomClean == 3:
quests.finishQuest("Clean bathroom")
inventory.remove_item_name("Cleaning mat")
# ----------------- Notebook puzzle events -----------------
func _enter_notebook_laundry(): # trying to engage in the notebook puzzle for doing laundry
if !quests.hasQuest("Do laundry"):
...
...
@@ -231,10 +239,13 @@ func _return_laundry(): # returning from laundry basket view
zoom_out()
func _open_fridge(): # looking into the fridge
kitchen.hide()
fridge.show()
zoom_in()
notepad.hide()
if quests.hasQuest("Eat"):
kitchen.hide()
fridge.show()
zoom_in()
notepad.hide()
else:
dialogue.text = "Fueled up and ready to go."
func _return_fridge(): # returning from fridge view
fridge.hide()
...
...
Main rooms/Balcony.tscn
View file @
184d1ea2
...
...
@@ -7,16 +7,16 @@
[ext_resource path="res://Scripts/Dialogue control/Dialogue Contro - Living room.gd" type="Script" id=5]
[ext_resource path="res://Scripts/Movement scripts/Door to living room.gd" type="Script" id=6]
[sub_resource type="RectangleShape2D" id=
6
]
[sub_resource type="RectangleShape2D" id=
1
]
extents = Vector2( 19.9228, 36.7719 )
[sub_resource type="RectangleShape2D" id=
4
]
[sub_resource type="RectangleShape2D" id=
2
]
extents = Vector2( 15.6685, 16.4124 )
[sub_resource type="RectangleShape2D" id=
7
]
[sub_resource type="RectangleShape2D" id=
3
]
extents = Vector2( 34.6417, 40.1913 )
[sub_resource type="StreamTexture" id=
8
]
[sub_resource type="StreamTexture" id=
4
]
flags = 4
load_path = "res://.import/Balcony door.png-b1c8d05a5eb532517313dc4785195288.stex"
...
...
@@ -49,7 +49,7 @@ flavorText = "Great listeners! Terrible conversationalists."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Other plants"]
position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 )
shape = SubResource(
6
)
shape = SubResource(
1
)
[node name="Sprite" type="Sprite" parent="Other plants/CollisionShape2D"]
position = Vector2( 0.449585, 0.542709 )
...
...
@@ -70,7 +70,7 @@ flavorText = "Ew... It's so dirty. Is it even water? I'm not feeding that to my
[node name="CollisionShape2D" type="CollisionShape2D" parent="Pot"]
position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 )
shape = SubResource(
4
)
shape = SubResource(
2
)
[node name="Sprite" type="Sprite" parent="Pot/CollisionShape2D"]
position = Vector2( -0.00619507, -0.0649719 )
...
...
@@ -91,12 +91,12 @@ flavorText = "Clicked"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Door to living room"]
position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 )
shape = SubResource(
7
)
shape = SubResource(
3
)
[node name="Sprite" type="Sprite" parent="Door to living room/CollisionShape2D"]
position = Vector2( 0.574005, 0.358818 )
scale = Vector2( 0.343423, 0.403654 )
texture = SubResource(
8
)
texture = SubResource(
4
)
[node name="Nana" type="StaticBody2D" parent="."]
position = Vector2( 240.299, 200.173 )
...
...
Main rooms/Bathroom.tscn
View file @
184d1ea2
[gd_scene load_steps=2
3
format=2]
[gd_scene load_steps=2
4
format=2]
[ext_resource path="res://Scripts/Dialogue control/Dialogue Control - Bathroom.gd" type="Script" id=1]
[ext_resource path="res://assets/room zoom out.png" type="Texture" id=2]
...
...
@@ -10,6 +10,7 @@
[ext_resource path="res://Lab Note.gd" type="Script" id=8]
[ext_resource path="res://assets/Thesis Clickables/mess on floor.png" type="Texture" id=9]
[ext_resource path="res://Scripts/Toilet.gd" type="Script" id=10]
[ext_resource path="res://Scripts/Sink.gd" type="Script" id=11]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 156.074, 141.192 )
...
...
@@ -35,17 +36,17 @@ extents = Vector2( 82.0634, 51.3664 )
[sub_resource type="RectangleShape2D" id=8]
extents = Vector2( 205.176, 46.6856 )
[sub_resource type="RectangleShape2D" id=
11
]
[sub_resource type="RectangleShape2D" id=
9
]
extents = Vector2( 35.5088, 57.7678 )
[sub_resource type="StreamTexture" id=1
2
]
[sub_resource type="StreamTexture" id=1
0
]
flags = 4
load_path = "res://.import/placeholder item.png-cd6e4c1231156687d87915032ec4361d.stex"
[sub_resource type="RectangleShape2D" id=
9
]
[sub_resource type="RectangleShape2D" id=
11
]
extents = Vector2( 38.8846, 35.3253 )
[sub_resource type="RectangleShape2D" id=1
0
]
[sub_resource type="RectangleShape2D" id=1
2
]
extents = Vector2( 39.2613, 32.3414 )
[node name="Bathroom" type="Node2D"]
...
...
@@ -146,7 +147,7 @@ __meta__ = {
[node name="Sink" type="StaticBody2D" parent="."]
position = Vector2( 374.557, 450.135 )
input_pickable = true
script = ExtResource(
4
)
script = ExtResource(
11
)
__meta__ = {
"_edit_group_": true
}
...
...
@@ -271,13 +272,13 @@ __meta__ = {
[node name="CollisionShape2D" type="CollisionShape2D" parent="Trash can"]
visible = false
shape = SubResource(
11
)
shape = SubResource(
9
)
disabled = true
[node name="Sprite" type="Sprite" parent="Trash can"]
position = Vector2( -3.94922, -2.52094 )
scale = Vector2( 0.395, 0.565 )
texture = SubResource( 1
2
)
texture = SubResource( 1
0
)
[node name="Label" type="Label" parent="Trash can"]
margin_left = -21.3268
...
...
@@ -300,7 +301,7 @@ retrievable = true
flavorText = "Ew."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Trash"]
shape = SubResource(
9
)
shape = SubResource(
11
)
[node name="Sprite" type="Sprite" parent="Trash/CollisionShape2D"]
position = Vector2( -0.581909, 0.846497 )
...
...
@@ -328,7 +329,7 @@ retrievable = true
flavorText = "Hydration."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tabo"]
shape = SubResource( 1
0
)
shape = SubResource( 1
2
)
[node name="Sprite" type="Sprite" parent="Tabo/CollisionShape2D"]
position = Vector2( -0.112305, 2.77536 )
...
...
Multi.tscn
View file @
184d1ea2
...
...
@@ -132,7 +132,7 @@ items = [ NodePath("Nana from afar"), NodePath("Other balcony"), NodePath("Balco
[node name="Event Handler" type="Node2D" parent="."]
position = Vector2( 460.602, 18.6417 )
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"), NodePath("../Bedroom/Terrarium"), NodePath("../Bathroom/Lab Note - Bathroom"), NodePath("../Inside cabinet/Lab notes"), NodePath("../Living room/Lab notes"), NodePath("../Bedroom/Pants"), NodePath("../Bedroom/Shirt"), NodePath("../Bedroom/Sando"), NodePath("../Bedroom/Towel") ]
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"), NodePath("../Bathroom/Lab Note - Bathroom"), NodePath("../Inside cabinet/Lab notes"), 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")
]
[node name="Moxie" type="Sprite" parent="."]
position = Vector2( 214.135, 386.725 )
...
...
Quests.gd
View file @
184d1ea2
...
...
@@ -15,13 +15,18 @@ func add(q):
func finishQuest(q):
var index = 0
var found = false
print("trying to find quest to remove " + q)
for quest in quests:
if quest == q:
quests.remove(index)
print("Quest found, will remove")
showQuests()
found = true
index += 1
if !found:
print("Unable to delete quest")
func showQuests():
if quests.size() > 0:
...
...
Scripts/Mess on floor.gd
0 → 100644
View file @
184d1ea2
extends "res://Item.gd"
signal cleaned
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func passEvent(handler):
connect("cleaned", handler,"_clean")
pass
func objInteraction(selected):
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if inventory.get_item_text(selected) == "Cleaning mat":
if flavorText != "Okay. That wasn't so bad...":
flavorText = "Okay. That wasn't so bad..."
else:
dialogueBox.text = flavor
emit_signal("cleaned")
elif 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!
inventory.unselect_all() #unselect item
Scripts/Mirror.gd
View file @
184d1ea2
extends "res://Item.gd"
onready var gotLabNote = false
onready var first = true
signal cleaned
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func passEvent(handler):
connect("cleaned", handler,"_clean")
pass
func mouseInteraction():
.mouseInteraction()
if first:
...
...
@@ -15,9 +21,11 @@ func mouseInteraction():
func objInteraction(selected):
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if inventory.get_item_text(selected) == "Cleaning mat":
if gotLabNote:
if gotLabNote
&& flavorText != "Great! I can see my own face again."
:
#inventory.remove_item(selected)
dialogueBox.text = "Great! I can see my own face again."
flavorText = "Great! I can see my own face again."
dialogueBox.text = flavorText
emit_signal("cleaned")
else:
dialogueBox.text = "Hey! Something's still written on the mirror! Looks important..."
elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
...
...
Scripts/Sink.gd
0 → 100644
View file @
184d1ea2
extends "res://Item.gd"
signal cleaned
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func passEvent(handler):
connect("cleaned", handler,"_clean")
pass
func objInteraction(selected):
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if inventory.get_item_text(selected) == "Cleaning mat":
if flavorText != "Okay. That wasn't so bad...":
flavorText = "Okay. That wasn't so bad..."
emit_signal("cleaned")
else:
dialogueBox.text = "I cleaned that already!"
elif 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!
inventory.unselect_all() #unselect item
Scripts/Toilet.gd
View file @
184d1ea2
extends "res://Item.gd"
onready var first
onready var clean
signal cleaned
func _ready():
pass # Replace with function body.
func passEvent(handler):
connect("cleaned", handler,"_clean")
pass
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
...
...
@@ -15,6 +21,7 @@ func objInteraction(selected): # when an object is used on it
if (flavorText != "Okay. That wasn't so bad... "):
flavorText = "Okay. That wasn't so bad... "
dialogueBox.text = "Time to tango, toilet."
emit_signal("cleaned")
else:
dialogueBox.text = "I can't make it any LESS unclogged.."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment