Commit 0f4582fc authored by Julia Santos's avatar Julia Santos

Cleaning bathroom now includes taking out trash

parent 7d71704f
...@@ -116,7 +116,7 @@ func get_clothes(): ...@@ -116,7 +116,7 @@ func get_clothes():
func _clean(): func _clean():
bathroomClean = bathroomClean + 1 bathroomClean = bathroomClean + 1
print("Cleaned " + str(bathroomClean)) print("Cleaned " + str(bathroomClean))
if bathroomClean == 4: if bathroomClean == 5:
quests.finishQuest("Clean bathroom") quests.finishQuest("Clean bathroom")
inventory.remove_item_name("Cleaning mat") inventory.remove_item_name("Cleaning mat")
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
[ext_resource path="res://assets/Thesis Clickables/trash chute.png" type="Texture" id=2] [ext_resource path="res://assets/Thesis Clickables/trash chute.png" type="Texture" id=2]
[ext_resource path="res://assets/Thesis Clickables/door to neighbor's apartment.png" type="Texture" id=3] [ext_resource path="res://assets/Thesis Clickables/door to neighbor's apartment.png" type="Texture" id=3]
[ext_resource path="res://assets/Thesis Clickables/door to moxie's apartment.png" type="Texture" id=4] [ext_resource path="res://assets/Thesis Clickables/door to moxie's apartment.png" type="Texture" id=4]
[ext_resource path="res://Item.gd" type="Script" id=5] [ext_resource path="res://Scripts/Trash chute.gd" type="Script" id=5]
[ext_resource path="res://Scripts/Movement scripts/Door to Moxie.gd" type="Script" id=6] [ext_resource path="res://Scripts/Movement scripts/Door to Moxie.gd" type="Script" id=6]
[ext_resource path="res://Scripts/Movement scripts/Door to neighbor.gd" type="Script" id=7] [ext_resource path="res://Scripts/Movement scripts/Door to neighbor.gd" type="Script" id=7]
......
...@@ -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"), NodePath("../Bathroom/Mess on floor") ] 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"), NodePath("../Hallway/Trash chute") ]
[node name="Moxie" type="Sprite" parent="."] [node name="Moxie" type="Sprite" parent="."]
position = Vector2( 214.135, 386.725 ) position = Vector2( 214.135, 386.725 )
......
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) == "Trash":
dialogueBox.text = "Good riddance."
inventory.remove_item(selected)
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
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