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
d6c5e0f3
Commit
d6c5e0f3
authored
Dec 06, 2021
by
Julia Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning bathroom now also includes the floor, can't clean without picking up bobby fins
parent
184d1ea2
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
43 deletions
+59
-43
Event Handler.gd
Event Handler.gd
+1
-1
Bathroom.tscn
Main rooms/Bathroom.tscn
+38
-36
Multi.tscn
Multi.tscn
+2
-2
Mess on floor.gd
Scripts/Mess on floor.gd
+17
-4
Sink.gd
Scripts/Sink.gd
+1
-0
No files found.
Event Handler.gd
View file @
d6c5e0f3
...
@@ -115,7 +115,7 @@ func get_clothes():
...
@@ -115,7 +115,7 @@ func get_clothes():
func _clean():
func _clean():
bathroomClean = bathroomClean + 1
bathroomClean = bathroomClean + 1
print("Cleaned " + str(bathroomClean))
print("Cleaned " + str(bathroomClean))
if bathroomClean ==
3
:
if bathroomClean ==
4
:
quests.finishQuest("Clean bathroom")
quests.finishQuest("Clean bathroom")
inventory.remove_item_name("Cleaning mat")
inventory.remove_item_name("Cleaning mat")
...
...
Main rooms/Bathroom.tscn
View file @
d6c5e0f3
[gd_scene load_steps=2
4
format=2]
[gd_scene load_steps=2
5
format=2]
[ext_resource path="res://Scripts/Dialogue control/Dialogue Control - Bathroom.gd" type="Script" id=1]
[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]
[ext_resource path="res://assets/room zoom out.png" type="Texture" id=2]
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
[ext_resource path="res://assets/Thesis Clickables/mess on floor.png" type="Texture" id=9]
[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/Toilet.gd" type="Script" id=10]
[ext_resource path="res://Scripts/Sink.gd" type="Script" id=11]
[ext_resource path="res://Scripts/Sink.gd" type="Script" id=11]
[ext_resource path="res://Scripts/Mess on floor.gd" type="Script" id=12]
[sub_resource type="RectangleShape2D" id=1]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 156.074, 141.192 )
extents = Vector2( 156.074, 141.192 )
...
@@ -22,7 +23,7 @@ extents = Vector2( 56.6453, 56.4341 )
...
@@ -22,7 +23,7 @@ extents = Vector2( 56.6453, 56.4341 )
extents = Vector2( 91.0989, 130.014 )
extents = Vector2( 91.0989, 130.014 )
[sub_resource type="RectangleShape2D" id=4]
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 1
94.116
, 92.9518 )
extents = Vector2( 1
41.647
, 92.9518 )
[sub_resource type="RectangleShape2D" id=5]
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 69.006, 185 )
extents = Vector2( 69.006, 185 )
...
@@ -30,12 +31,12 @@ extents = Vector2( 69.006, 185 )
...
@@ -30,12 +31,12 @@ extents = Vector2( 69.006, 185 )
[sub_resource type="RectangleShape2D" id=6]
[sub_resource type="RectangleShape2D" id=6]
extents = Vector2( 38.6637, 100.122 )
extents = Vector2( 38.6637, 100.122 )
[sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 82.0634, 51.3664 )
[sub_resource type="RectangleShape2D" id=8]
[sub_resource type="RectangleShape2D" id=8]
extents = Vector2( 205.176, 46.6856 )
extents = Vector2( 205.176, 46.6856 )
[sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 82.0634, 51.3664 )
[sub_resource type="RectangleShape2D" id=9]
[sub_resource type="RectangleShape2D" id=9]
extents = Vector2( 35.5088, 57.7678 )
extents = Vector2( 35.5088, 57.7678 )
...
@@ -60,7 +61,7 @@ __meta__ = {
...
@@ -60,7 +61,7 @@ __meta__ = {
}
}
[node name="Mirror" type="StaticBody2D" parent="."]
[node name="Mirror" type="StaticBody2D" parent="."]
position = Vector2(
375.163, 247.488
)
position = Vector2(
418, 175.672
)
input_pickable = true
input_pickable = true
script = ExtResource( 7 )
script = ExtResource( 7 )
__meta__ = {
__meta__ = {
...
@@ -88,7 +89,7 @@ __meta__ = {
...
@@ -88,7 +89,7 @@ __meta__ = {
}
}
[node name="Lab Note - Bathroom" type="StaticBody2D" parent="."]
[node name="Lab Note - Bathroom" type="StaticBody2D" parent="."]
position = Vector2(
307.312, 129.87
)
position = Vector2(
413.145, 78.2132
)
scale = Vector2( 0.842056, 0.913043 )
scale = Vector2( 0.842056, 0.913043 )
input_pickable = true
input_pickable = true
script = ExtResource( 8 )
script = ExtResource( 8 )
...
@@ -117,7 +118,7 @@ __meta__ = {
...
@@ -117,7 +118,7 @@ __meta__ = {
}
}
[node name="Toilet" type="StaticBody2D" parent="."]
[node name="Toilet" type="StaticBody2D" parent="."]
position = Vector2( 70
4.312, 410.87
)
position = Vector2( 70
1.792, 364.253
)
input_pickable = true
input_pickable = true
script = ExtResource( 10 )
script = ExtResource( 10 )
__meta__ = {
__meta__ = {
...
@@ -145,7 +146,7 @@ __meta__ = {
...
@@ -145,7 +146,7 @@ __meta__ = {
}
}
[node name="Sink" type="StaticBody2D" parent="."]
[node name="Sink" type="StaticBody2D" parent="."]
position = Vector2(
374.557, 450.135
)
position = Vector2(
481.65, 385.879
)
input_pickable = true
input_pickable = true
script = ExtResource( 11 )
script = ExtResource( 11 )
__meta__ = {
__meta__ = {
...
@@ -155,11 +156,12 @@ interactable = true
...
@@ -155,11 +156,12 @@ interactable = true
flavorText = "Sink. Stinky. Sinky. Do I have anything to clean this up with?"
flavorText = "Sink. Stinky. Sinky. Do I have anything to clean this up with?"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sink"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sink"]
position = Vector2( -59.2163, 0 )
shape = SubResource( 4 )
shape = SubResource( 4 )
[node name="Sprite" type="Sprite" parent="Sink/CollisionShape2D"]
[node name="Sprite" type="Sprite" parent="Sink/CollisionShape2D"]
position = Vector2(
-1.34778, -2.51019
)
position = Vector2(
3.69189, -1.25027
)
scale = Vector2( 1.
95
, 0.93 )
scale = Vector2( 1.
37044
, 0.93 )
texture = ExtResource( 3 )
texture = ExtResource( 3 )
[node name="Label" type="Label" parent="Sink/CollisionShape2D"]
[node name="Label" type="Label" parent="Sink/CollisionShape2D"]
...
@@ -190,7 +192,7 @@ visible = false
...
@@ -190,7 +192,7 @@ visible = false
texture = ExtResource( 3 )
texture = ExtResource( 3 )
[node name="Plunger" type="StaticBody2D" parent="."]
[node name="Plunger" type="StaticBody2D" parent="."]
position = Vector2( 82
9.312, 448.87
)
position = Vector2( 82
6.792, 402.253
)
input_pickable = true
input_pickable = true
script = ExtResource( 4 )
script = ExtResource( 4 )
__meta__ = {
__meta__ = {
...
@@ -217,8 +219,26 @@ __meta__ = {
...
@@ -217,8 +219,26 @@ __meta__ = {
"_edit_use_anchors_": false
"_edit_use_anchors_": false
}
}
[node name="Bobby Pins" type="StaticBody2D" parent="."]
[node name="Mess on floor" type="StaticBody2D" parent="."]
position = Vector2( 81.7675, 465.598 )
position = Vector2( 248.9, 509.992 )
input_pickable = true
script = ExtResource( 12 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Bobby pins and puddles. What was I doing in here?"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Mess on floor"]
shape = SubResource( 8 )
[node name="Sprite" type="Sprite" parent="Mess on floor/CollisionShape2D"]
position = Vector2( -1.45947, -0.173828 )
scale = Vector2( 2.00236, 0.457652 )
texture = ExtResource( 9 )
[node name="Bobby pins" type="StaticBody2D" parent="."]
position = Vector2( 147.283, 480.717 )
input_pickable = true
input_pickable = true
script = ExtResource( 4 )
script = ExtResource( 4 )
__meta__ = {
__meta__ = {
...
@@ -227,15 +247,15 @@ __meta__ = {
...
@@ -227,15 +247,15 @@ __meta__ = {
retrievable = true
retrievable = true
flavorText = "Good for holding my hair up or picking into small spaces."
flavorText = "Good for holding my hair up or picking into small spaces."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bobby
P
ins"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bobby
p
ins"]
shape = SubResource( 7 )
shape = SubResource( 7 )
[node name="Sprite" type="Sprite" parent="Bobby
P
ins/CollisionShape2D"]
[node name="Sprite" type="Sprite" parent="Bobby
p
ins/CollisionShape2D"]
position = Vector2( -0.336975, -1.2963 )
position = Vector2( -0.336975, -1.2963 )
scale = Vector2( 0.835, 0.525 )
scale = Vector2( 0.835, 0.525 )
texture = ExtResource( 5 )
texture = ExtResource( 5 )
[node name="Label" type="Label" parent="Bobby
P
ins/CollisionShape2D"]
[node name="Label" type="Label" parent="Bobby
p
ins/CollisionShape2D"]
margin_left = -41.6223
margin_left = -41.6223
margin_top = -33.2978
margin_top = -33.2978
margin_right = 37.3777
margin_right = 37.3777
...
@@ -245,24 +265,6 @@ __meta__ = {
...
@@ -245,24 +265,6 @@ __meta__ = {
"_edit_use_anchors_": false
"_edit_use_anchors_": false
}
}
[node name="Mess on floor" type="StaticBody2D" parent="."]
position = Vector2( 260.239, 535.191 )
input_pickable = true
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Bobby pins and puddles. What was I doing in here?"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Mess on floor"]
shape = SubResource( 8 )
[node name="Sprite" type="Sprite" parent="Mess on floor/CollisionShape2D"]
position = Vector2( -1.45947, -0.173828 )
scale = Vector2( 2.00236, 0.457652 )
texture = ExtResource( 9 )
[node name="Trash can" type="StaticBody2D" parent="."]
[node name="Trash can" type="StaticBody2D" parent="."]
position = Vector2( 926.026, 491.279 )
position = Vector2( 926.026, 491.279 )
input_pickable = true
input_pickable = true
...
@@ -319,7 +321,7 @@ __meta__ = {
...
@@ -319,7 +321,7 @@ __meta__ = {
}
}
[node name="Tabo" type="StaticBody2D" parent="."]
[node name="Tabo" type="StaticBody2D" parent="."]
position = Vector2( 68
4.312, 236.87
)
position = Vector2( 68
1.792, 190.253
)
input_pickable = true
input_pickable = true
script = ExtResource( 4 )
script = ExtResource( 4 )
__meta__ = {
__meta__ = {
...
...
Multi.tscn
View file @
d6c5e0f3
...
@@ -97,7 +97,7 @@ items = [ NodePath("Washing machine door"), NodePath("Drawer"), NodePath("Soap")
...
@@ -97,7 +97,7 @@ items = [ NodePath("Washing machine door"), NodePath("Drawer"), NodePath("Soap")
[node name="Bathroom" parent="." instance=ExtResource( 20 )]
[node name="Bathroom" parent="." instance=ExtResource( 20 )]
visible = false
visible = false
script = ExtResource( 4 )
script = ExtResource( 4 )
items = [ NodePath("Mirror"), NodePath("Lab Note - Bathroom"), NodePath("Toilet"), NodePath("Sink"), NodePath("Door - to Bedroom"), NodePath("Plunger"), NodePath("Bobby
P
ins"), NodePath("Trash"), NodePath("Tabo"), NodePath("Mess on floor") ]
items = [ NodePath("Mirror"), NodePath("Lab Note - Bathroom"), NodePath("Toilet"), NodePath("Sink"), NodePath("Door - to Bedroom"), NodePath("Plunger"), NodePath("Bobby
p
ins"), NodePath("Trash"), NodePath("Tabo"), NodePath("Mess on floor") ]
[node name="Inside cabinet" parent="." instance=ExtResource( 21 )]
[node name="Inside cabinet" parent="." instance=ExtResource( 21 )]
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"), 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") ]
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")
, NodePath("../Bathroom/Mess on floor")
]
[node name="Moxie" type="Sprite" parent="."]
[node name="Moxie" type="Sprite" parent="."]
position = Vector2( 214.135, 386.725 )
position = Vector2( 214.135, 386.725 )
...
...
Scripts/Mess on floor.gd
View file @
d6c5e0f3
...
@@ -12,13 +12,26 @@ func passEvent(handler):
...
@@ -12,13 +12,26 @@ func passEvent(handler):
func objInteraction(selected):
func objInteraction(selected):
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if inventory.get_item_text(selected) == "Cleaning mat":
if inventory.get_item_text(selected) == "Cleaning mat":
if inventory.hasItem("Bobby pins") == -1:
dialogueBox.text = "Ow! I stepped on something!"
print("Cleaning but bobby pins")
else:
if flavorText != "Okay. That wasn't so bad...":
if flavorText != "Okay. That wasn't so bad...":
dialogueBox.text = "Finally... I can walk around my own bathroom."
flavorText = "Okay. That wasn't so bad..."
flavorText = "Okay. That wasn't so bad..."
else:
print("cleaning successfully")
dialogueBox.text = flavor
emit_signal("cleaned")
emit_signal("cleaned")
else:
dialogueBox.text = flavorText
print("already cleaned")
elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
dialogueBox.text = flavor
dialogueBox.text = flavor
else:
else:
dialogueBox.text = "No flavor text found" #can replace this later!
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
inventory.unselect_all() #unselect item
func mouseInteraction():
.mouseInteraction()
if flavorText != "Do I have anything to clean this with?":
flavorText = "Do I have anything to clean this with?"
Scripts/Sink.gd
View file @
d6c5e0f3
...
@@ -15,6 +15,7 @@ func objInteraction(selected):
...
@@ -15,6 +15,7 @@ func objInteraction(selected):
if inventory.get_item_text(selected) == "Cleaning mat":
if inventory.get_item_text(selected) == "Cleaning mat":
if flavorText != "Okay. That wasn't so bad...":
if flavorText != "Okay. That wasn't so bad...":
flavorText = "Okay. That wasn't so bad..."
flavorText = "Okay. That wasn't so bad..."
dialogueBox.text = flavorText
emit_signal("cleaned")
emit_signal("cleaned")
else:
else:
dialogueBox.text = "I cleaned that already!"
dialogueBox.text = "I cleaned that already!"
...
...
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