Commit d6c5e0f3 authored by Julia Santos's avatar Julia Santos

Cleaning bathroom now also includes the floor, can't clean without picking up bobby fins

parent 184d1ea2
......@@ -115,7 +115,7 @@ func get_clothes():
func _clean():
bathroomClean = bathroomClean + 1
print("Cleaned " + str(bathroomClean))
if bathroomClean == 3:
if bathroomClean == 4:
quests.finishQuest("Clean bathroom")
inventory.remove_item_name("Cleaning mat")
......
[gd_scene load_steps=24 format=2]
[gd_scene load_steps=25 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]
......@@ -11,6 +11,7 @@
[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]
[ext_resource path="res://Scripts/Mess on floor.gd" type="Script" id=12]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 156.074, 141.192 )
......@@ -22,7 +23,7 @@ extents = Vector2( 56.6453, 56.4341 )
extents = Vector2( 91.0989, 130.014 )
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 194.116, 92.9518 )
extents = Vector2( 141.647, 92.9518 )
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 69.006, 185 )
......@@ -30,12 +31,12 @@ extents = Vector2( 69.006, 185 )
[sub_resource type="RectangleShape2D" id=6]
extents = Vector2( 38.6637, 100.122 )
[sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 82.0634, 51.3664 )
[sub_resource type="RectangleShape2D" id=8]
extents = Vector2( 205.176, 46.6856 )
[sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 82.0634, 51.3664 )
[sub_resource type="RectangleShape2D" id=9]
extents = Vector2( 35.5088, 57.7678 )
......@@ -60,7 +61,7 @@ __meta__ = {
}
[node name="Mirror" type="StaticBody2D" parent="."]
position = Vector2( 375.163, 247.488 )
position = Vector2( 418, 175.672 )
input_pickable = true
script = ExtResource( 7 )
__meta__ = {
......@@ -88,7 +89,7 @@ __meta__ = {
}
[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 )
input_pickable = true
script = ExtResource( 8 )
......@@ -117,7 +118,7 @@ __meta__ = {
}
[node name="Toilet" type="StaticBody2D" parent="."]
position = Vector2( 704.312, 410.87 )
position = Vector2( 701.792, 364.253 )
input_pickable = true
script = ExtResource( 10 )
__meta__ = {
......@@ -145,7 +146,7 @@ __meta__ = {
}
[node name="Sink" type="StaticBody2D" parent="."]
position = Vector2( 374.557, 450.135 )
position = Vector2( 481.65, 385.879 )
input_pickable = true
script = ExtResource( 11 )
__meta__ = {
......@@ -155,11 +156,12 @@ interactable = true
flavorText = "Sink. Stinky. Sinky. Do I have anything to clean this up with?"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sink"]
position = Vector2( -59.2163, 0 )
shape = SubResource( 4 )
[node name="Sprite" type="Sprite" parent="Sink/CollisionShape2D"]
position = Vector2( -1.34778, -2.51019 )
scale = Vector2( 1.95, 0.93 )
position = Vector2( 3.69189, -1.25027 )
scale = Vector2( 1.37044, 0.93 )
texture = ExtResource( 3 )
[node name="Label" type="Label" parent="Sink/CollisionShape2D"]
......@@ -190,7 +192,7 @@ visible = false
texture = ExtResource( 3 )
[node name="Plunger" type="StaticBody2D" parent="."]
position = Vector2( 829.312, 448.87 )
position = Vector2( 826.792, 402.253 )
input_pickable = true
script = ExtResource( 4 )
__meta__ = {
......@@ -217,8 +219,26 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Bobby Pins" type="StaticBody2D" parent="."]
position = Vector2( 81.7675, 465.598 )
[node name="Mess on floor" type="StaticBody2D" parent="."]
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
script = ExtResource( 4 )
__meta__ = {
......@@ -227,15 +247,15 @@ __meta__ = {
retrievable = true
flavorText = "Good for holding my hair up or picking into small spaces."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bobby Pins"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bobby pins"]
shape = SubResource( 7 )
[node name="Sprite" type="Sprite" parent="Bobby Pins/CollisionShape2D"]
[node name="Sprite" type="Sprite" parent="Bobby pins/CollisionShape2D"]
position = Vector2( -0.336975, -1.2963 )
scale = Vector2( 0.835, 0.525 )
texture = ExtResource( 5 )
[node name="Label" type="Label" parent="Bobby Pins/CollisionShape2D"]
[node name="Label" type="Label" parent="Bobby pins/CollisionShape2D"]
margin_left = -41.6223
margin_top = -33.2978
margin_right = 37.3777
......@@ -245,24 +265,6 @@ __meta__ = {
"_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="."]
position = Vector2( 926.026, 491.279 )
input_pickable = true
......@@ -319,7 +321,7 @@ __meta__ = {
}
[node name="Tabo" type="StaticBody2D" parent="."]
position = Vector2( 684.312, 236.87 )
position = Vector2( 681.792, 190.253 )
input_pickable = true
script = ExtResource( 4 )
__meta__ = {
......
......@@ -97,7 +97,7 @@ items = [ NodePath("Washing machine door"), NodePath("Drawer"), NodePath("Soap")
[node name="Bathroom" parent="." instance=ExtResource( 20 )]
visible = false
script = ExtResource( 4 )
items = [ NodePath("Mirror"), NodePath("Lab Note - Bathroom"), NodePath("Toilet"), NodePath("Sink"), NodePath("Door - to Bedroom"), NodePath("Plunger"), NodePath("Bobby Pins"), 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 pins"), NodePath("Trash"), NodePath("Tabo"), NodePath("Mess on floor") ]
[node name="Inside cabinet" parent="." instance=ExtResource( 21 )]
visible = false
......@@ -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"), 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="."]
position = Vector2( 214.135, 386.725 )
......
......@@ -12,13 +12,26 @@ func passEvent(handler):
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..."
if inventory.hasItem("Bobby pins") == -1:
dialogueBox.text = "Ow! I stepped on something!"
print("Cleaning but bobby pins")
else:
dialogueBox.text = flavor
emit_signal("cleaned")
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..."
print("cleaning successfully")
emit_signal("cleaned")
else:
dialogueBox.text = flavorText
print("already 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
func mouseInteraction():
.mouseInteraction()
if flavorText != "Do I have anything to clean this with?":
flavorText = "Do I have anything to clean this with?"
......@@ -15,6 +15,7 @@ func objInteraction(selected):
if inventory.get_item_text(selected) == "Cleaning mat":
if flavorText != "Okay. That wasn't so bad...":
flavorText = "Okay. That wasn't so bad..."
dialogueBox.text = flavorText
emit_signal("cleaned")
else:
dialogueBox.text = "I cleaned that already!"
......
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