Commit 1ef837d6 authored by Julia Santos's avatar Julia Santos

More edits on the new inventory, mostly dealing with bugs regarding selecting/deselecting items

parent 4a2608c5
...@@ -32,6 +32,7 @@ func getDialogue(sceneName): ...@@ -32,6 +32,7 @@ func getDialogue(sceneName):
sceneProgress = 0 sceneProgress = 0
hide() hide()
dim.hide() dim.hide()
inventory.enable()
elif sceneName == "First Nana pass": elif sceneName == "First Nana pass":
match sceneProgress: match sceneProgress:
0: 0:
...@@ -53,10 +54,12 @@ func getDialogue(sceneName): ...@@ -53,10 +54,12 @@ func getDialogue(sceneName):
sceneProgress = 0 sceneProgress = 0
dim.hide() dim.hide()
hide() hide()
inventory.enable()
elif sceneName == "Nana again": elif sceneName == "Nana again":
dialogue = "Brodie: OF COURSE, ALWAYS." dialogue = "Brodie: OF COURSE, ALWAYS."
get_parent().get_node("Neighbor").move() get_parent().get_node("Neighbor").move()
inventory.remove_item_name("Nana") inventory.remove_item_name("Nana")
dim.hide() dim.hide()
hide() hide()
inventory.enable()
return dialogue return dialogue
...@@ -76,7 +76,7 @@ func _groceries_put_away(): # when the groceries are put away ...@@ -76,7 +76,7 @@ func _groceries_put_away(): # when the groceries are put away
laundryArea.get_node("Laundry door").flavorText = "I think I'm still missing something..." laundryArea.get_node("Laundry door").flavorText = "I think I'm still missing something..."
inventory.add_item("Oil", load("res://.import/Oil.png-29f84e969418d0f4084115c5ce859866.stex")) inventory.add_item("Oil", load("res://.import/Oil.png-29f84e969418d0f4084115c5ce859866.stex"))
inventory.add_item("Cleaning mat", load("res://.import/cleaning materials.png-9e1abb8a1d84afe3085c773f150c7347.stex")) inventory.add_item("Cleaning mat", load("res://.import/cleaning materials.png-9e1abb8a1d84afe3085c773f150c7347.stex"))
inventory.add_item("Laundry detergent",load("res://.import/laundry detergent.png-79948b488e3c228ce282a9186c4bcf0c.stex")) inventory.add_item("Laundry detergent",load("res://.import/soap.png-93c3e5ae993592d84ef303c214def992.stex"))
func _eaten(): # completing first "Eat" quest func _eaten(): # completing first "Eat" quest
quests.finishQuest("Eat") quests.finishQuest("Eat")
...@@ -161,19 +161,23 @@ func getPlungered(): ...@@ -161,19 +161,23 @@ func getPlungered():
return plungerUsed return plungerUsed
# ----------------- Cutscene initiators ----------------- # ----------------- Cutscene initiators -----------------
func _start_cutscene_1(): func _start_cutscene_1():
inventory.unselect_all()
cutsceneHandler.get_node("1").show() cutsceneHandler.get_node("1").show()
cutsceneHandler.get_node("1/Scene control").start() cutsceneHandler.get_node("1/Scene control").start()
func _start_cutscene_2(): func _start_cutscene_2():
if !quests.hasQuest("Eat") and !quests.hasQuest("Do laundry"): if !quests.hasQuest("Eat") and !quests.hasQuest("Do laundry"):
inventory.unselect_all()
cutsceneHandler.get_node("2").show() cutsceneHandler.get_node("2").show()
cutsceneHandler.get_node("2/Scene control").start() cutsceneHandler.get_node("2/Scene control").start()
func _start_cutscene_2b(): func _start_cutscene_2b():
inventory.unselect_all()
cutsceneHandler.get_node("2b").show() cutsceneHandler.get_node("2b").show()
cutsceneHandler.get_node("2b/Scene control").start() cutsceneHandler.get_node("2b/Scene control").start()
func _start_cutscene_3(): func _start_cutscene_3():
inventory.unselect_all()
cutsceneHandler.get_node("3").show() cutsceneHandler.get_node("3").show()
cutsceneHandler.get_node("3/Scene control").start() cutsceneHandler.get_node("3/Scene control").start()
...@@ -269,21 +273,25 @@ func _bathroom_enter(): # entering bathroom ...@@ -269,21 +273,25 @@ func _bathroom_enter(): # entering bathroom
bedroom.hide() bedroom.hide()
bathroom.show() bathroom.show()
movementHandle.disableMovement() movementHandle.disableMovement()
inventory.unselect_all()
func _bathroom_exit(): # exiting bathroom func _bathroom_exit(): # exiting bathroom
bathroom.hide() bathroom.hide()
bedroom.show() bedroom.show()
movementHandle.enableMovement() movementHandle.enableMovement()
inventory.unselect_all()
func _balcony_enter(): # entering balcony func _balcony_enter(): # entering balcony
movementHandle.disableMovement() movementHandle.disableMovement()
balcony.show() balcony.show()
livingRoom.hide() livingRoom.hide()
inventory.unselect_all()
func _balcony_exit(): # exiting balcony func _balcony_exit(): # exiting balcony
movementHandle.enableMovement() movementHandle.enableMovement()
balcony.hide() balcony.hide()
livingRoom.show() livingRoom.show()
inventory.unselect_all()
func _living_to_hallway(): # moving from living room to hallway, if there's a reason to func _living_to_hallway(): # moving from living room to hallway, if there's a reason to
if ((inventory.hasItem("Trash") != -1) || foundBanana): # either Moxie has to take out the trash or has to look for Banana if ((inventory.hasItem("Trash") != -1) || foundBanana): # either Moxie has to take out the trash or has to look for Banana
...@@ -296,6 +304,7 @@ func _living_to_hallway(): # moving from living room to hallway, if there's a re ...@@ -296,6 +304,7 @@ func _living_to_hallway(): # moving from living room to hallway, if there's a re
canFrontDoor = true canFrontDoor = true
dialogue.text = "What is that noise? Sounds like my neighbor's trying to break down their walls." dialogue.text = "What is that noise? Sounds like my neighbor's trying to break down their walls."
dialogue.playText() dialogue.playText()
inventory.unselect_all()
else: else:
dialogue.text = "You know, my philosophy has always been, 'If there's no reason to leave my apartment, why leave?'" dialogue.text = "You know, my philosophy has always been, 'If there's no reason to leave my apartment, why leave?'"
dialogue.playText() dialogue.playText()
...@@ -304,26 +313,31 @@ func _hallway_to_living(): # moving from hallway to moxie's living room ...@@ -304,26 +313,31 @@ func _hallway_to_living(): # moving from hallway to moxie's living room
movementHandle.enableMovement() movementHandle.enableMovement()
hallway.hide() hallway.hide()
livingRoom.show() livingRoom.show()
inventory.unselect_all()
func _hallway_to_neighbor(): # moving from hallway to neighbor's living room func _hallway_to_neighbor(): # moving from hallway to neighbor's living room
movementHandle.disableMovement() movementHandle.disableMovement()
hallway.hide() hallway.hide()
neighborsRoom.show() neighborsRoom.show()
inventory.unselect_all()
func _neighbor_to_hallway(): # moving from neighbor's living room to the hallway func _neighbor_to_hallway(): # moving from neighbor's living room to the hallway
hallway.show() hallway.show()
neighborsRoom.hide() neighborsRoom.hide()
movementHandle.checkRoom() movementHandle.checkRoom()
inventory.unselect_all()
func _neighbor_to_balcony(): # moving from neighbor's living room to their balcony func _neighbor_to_balcony(): # moving from neighbor's living room to their balcony
movementHandle.disableMovement() movementHandle.disableMovement()
neighborsRoom.hide() neighborsRoom.hide()
neighborsBalcony.show() neighborsBalcony.show()
inventory.unselect_all()
func _balcony_to_neighbor(): # moving from neighbor's balcony to their living room func _balcony_to_neighbor(): # moving from neighbor's balcony to their living room
neighborsRoom.show() neighborsRoom.show()
neighborsBalcony.hide() neighborsBalcony.hide()
movementHandle.checkRoom() movementHandle.checkRoom()
inventory.unselect_all()
# ----------------- Zooming in and out of specific views ----------------- # ----------------- Zooming in and out of specific views -----------------
func zoom_in(): # for close up perspectives without some UI func zoom_in(): # for close up perspectives without some UI
...@@ -333,6 +347,7 @@ func zoom_in(): # for close up perspectives without some UI ...@@ -333,6 +347,7 @@ func zoom_in(): # for close up perspectives without some UI
right.hide() right.hide()
deselect.hide() deselect.hide()
movementHandle.disableMovement() movementHandle.disableMovement()
inventory.unselect_all()
func zoom_out(): # for returning from close up perspectives func zoom_out(): # for returning from close up perspectives
moxie.show() moxie.show()
...@@ -342,6 +357,7 @@ func zoom_out(): # for returning from close up perspectives ...@@ -342,6 +357,7 @@ func zoom_out(): # for returning from close up perspectives
movementHandle.enableMovement() movementHandle.enableMovement()
deselect.show() deselect.show()
movementHandle.checkRoom() movementHandle.checkRoom()
inventory.unselect_all()
func _laundry_basket(): # looking at the laundry basket view func _laundry_basket(): # looking at the laundry basket view
bedroom.hide() bedroom.hide()
......
...@@ -23,6 +23,7 @@ func remove_item_name(toRemove): ...@@ -23,6 +23,7 @@ func remove_item_name(toRemove):
var index = hasItem(toRemove) var index = hasItem(toRemove)
if index != -1: if index != -1:
remove_item(index) remove_item(index)
UI.updateUI()
func remove_item(idx): func remove_item(idx):
.remove_item(idx) .remove_item(idx)
...@@ -36,3 +37,15 @@ func add_item(text, icon=null, selectable=true): ...@@ -36,3 +37,15 @@ func add_item(text, icon=null, selectable=true):
func updateUI(): func updateUI():
UI.updateUI() UI.updateUI()
func unselect_all():
.unselect_all()
UI.unselect_all()
func disable():
unselect_all()
UI.disableAll()
func enable():
unselect_all()
UI.enableAll()
...@@ -111,6 +111,7 @@ __meta__ = { ...@@ -111,6 +111,7 @@ __meta__ = {
} }
[node name="h" type="CollisionShape2D" parent="Repotted plants"] [node name="h" type="CollisionShape2D" parent="Repotted plants"]
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( 3 )
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
[ext_resource path="res://assets/Thesis Clickables/groceries.png" type="Texture" id=7] [ext_resource path="res://assets/Thesis Clickables/groceries.png" type="Texture" id=7]
[sub_resource type="RectangleShape2D" id=1] [sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 35.8254, 38.2746 ) extents = Vector2( 35.8254, 32.6971 )
[sub_resource type="StreamTexture" id=2] [sub_resource type="StreamTexture" id=2]
flags = 4 flags = 4
...@@ -49,7 +49,7 @@ interactable = true ...@@ -49,7 +49,7 @@ interactable = true
flavorText = "I can't get in there. These bags are in the way..." flavorText = "I can't get in there. These bags are in the way..."
[node name="Hitbox" type="CollisionShape2D" parent="Laundry door"] [node name="Hitbox" type="CollisionShape2D" parent="Laundry door"]
position = Vector2( 5.806, -53.2112 ) position = Vector2( 9.22073, -81.6672 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
z_index = -1 z_index = -1
shape = SubResource( 1 ) shape = SubResource( 1 )
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
[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/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=7] [sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 26.4732, 26.6968 ) extents = Vector2( 26.4732, 26.6968 )
[sub_resource type="RectangleShape2D" id=2] [sub_resource type="RectangleShape2D" id=2]
...@@ -70,7 +70,7 @@ texture = ExtResource( 12 ) ...@@ -70,7 +70,7 @@ texture = ExtResource( 12 )
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( 7 ) shape = SubResource( 1 )
disabled = true disabled = true
[node name="Plant" type="StaticBody2D" parent="."] [node name="Plant" type="StaticBody2D" parent="."]
......
...@@ -5,6 +5,7 @@ onready var current # index of the room Moxie is currently in ...@@ -5,6 +5,7 @@ onready var current # index of the room Moxie is currently in
onready var left = get_parent().get_node("Left") onready var left = get_parent().get_node("Left")
onready var right = get_parent().get_node("Right") onready var right = get_parent().get_node("Right")
onready var moxiePath = get_parent().get_parent().get_node("Moxie/Path2D/PathFollow2D") onready var moxiePath = get_parent().get_parent().get_node("Moxie/Path2D/PathFollow2D")
onready var inventory = get_parent().get_node("Inventory")
onready var tutorial = true onready var tutorial = true
...@@ -23,6 +24,7 @@ func _pressedRight(): # when right arrow is clicked, move to the next adjacent s ...@@ -23,6 +24,7 @@ func _pressedRight(): # when right arrow is clicked, move to the next adjacent s
if current >= 1: if current >= 1:
left.show() left.show()
checkRoom() checkRoom()
inventory.unselect_all()
print("Currently in room " + str(current) + ": " + rooms[current].get_name()) print("Currently in room " + str(current) + ": " + rooms[current].get_name())
func _pressedLeft(): # when left arrow is clicked, move to the next adjacent screen func _pressedLeft(): # when left arrow is clicked, move to the next adjacent screen
...@@ -35,6 +37,7 @@ func _pressedLeft(): # when left arrow is clicked, move to the next adjacent scr ...@@ -35,6 +37,7 @@ func _pressedLeft(): # when left arrow is clicked, move to the next adjacent scr
if current < rooms.size() - 1: if current < rooms.size() - 1:
right.show() right.show()
checkRoom() checkRoom()
inventory.unselect_all()
print("Currently in room " + str(current) + ": " + rooms[current].get_name()) print("Currently in room " + str(current) + ": " + rooms[current].get_name())
func check_arrows(): func check_arrows():
......
...@@ -569,7 +569,7 @@ anims/Dialogue = SubResource( 11 ) ...@@ -569,7 +569,7 @@ anims/Dialogue = SubResource( 11 )
margin_left = 27.0 margin_left = 27.0
margin_top = 19.0 margin_top = 19.0
margin_right = 522.0 margin_right = 522.0
margin_bottom = 73.0 margin_bottom = 76.0
custom_fonts/normal_font = ExtResource( 37 ) custom_fonts/normal_font = ExtResource( 37 )
visible_characters = 0 visible_characters = 0
percent_visible = 0.0 percent_visible = 0.0
......
...@@ -22,7 +22,6 @@ func objInteraction(selected): # when an object is used on it ...@@ -22,7 +22,6 @@ func objInteraction(selected): # when an object is used on it
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
dialogueBox.playText() dialogueBox.playText()
func canEatGranola(): func canEatGranola():
......
...@@ -13,7 +13,6 @@ func objInteraction(selected): # when an object is used on it ...@@ -13,7 +13,6 @@ func objInteraction(selected): # when an object is used on it
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()
dialogueBox.playText() dialogueBox.playText()
if inventory.get_item_text(selected)=="Stool": if inventory.get_item_text(selected)=="Stool":
inventory.remove_item(selected) inventory.remove_item(selected)
......
...@@ -2,6 +2,8 @@ extends Control ...@@ -2,6 +2,8 @@ extends Control
onready var inventory = get_parent().get_node("Inventory") onready var inventory = get_parent().get_node("Inventory")
onready var firstIndex = 0 onready var firstIndex = 0
onready var items = [get_node("1"), get_node("2"), get_node("3"), get_node("4"), get_node("5")] onready var items = [get_node("1"), get_node("2"), get_node("3"), get_node("4"), get_node("5")]
onready var left = get_parent().get_node("Inventory control/Inventory left")
onready var right = get_parent().get_node("Inventory control/Inventory right")
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
...@@ -39,6 +41,33 @@ func _on_Inventory_left_pressed(): ...@@ -39,6 +41,33 @@ func _on_Inventory_left_pressed():
firstIndex = firstIndex - 5 firstIndex = firstIndex - 5
updateUI() updateUI()
func disableAll():
var j = 0
while j < 5:
#items[j].set_pressed(false)
items[j].set_disabled(true)
j = j + 1
print("disabling inventory")
left.set_disabled(true)
right.set_disabled(true)
func enableAll():
var j = 0
while j < 5:
items[j].set_disabled(false)
items[j].set_pressed(false)
j = j + 1
print("enabling inventory")
left.set_disabled(false)
right.set_disabled(false)
func unselect_all():
var j = 0
while j < 5:
items[j].set_pressed(false) #unselects everything
j = j + 1
updateUI()
func disableRest(num): func disableRest(num):
var j = 0 var j = 0
while j < 5: while j < 5:
......
...@@ -25,5 +25,4 @@ func objInteraction(selected): # when an object is used on it ...@@ -25,5 +25,4 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = "Brodie: Um... What are you doing?" dialogueBox.text = "Brodie: Um... What are you doing?"
get_parent().get_node("Dialogue arrow").setScene("Intro") get_parent().get_node("Dialogue arrow").setScene("Intro")
get_parent().get_node("Dialogue arrow").show() get_parent().get_node("Dialogue arrow").show()
inventory.unselect_all() #unselect item
dialogueBox.playText() dialogueBox.playText()
...@@ -45,6 +45,5 @@ func objInteraction(selected): # when an object is used on it ...@@ -45,6 +45,5 @@ func objInteraction(selected): # when an object is used on it
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
dialogueBox.playText() dialogueBox.playText()
inventory.unselect_all() #unselect item
...@@ -30,7 +30,6 @@ func objInteraction(selected): ...@@ -30,7 +30,6 @@ func objInteraction(selected):
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
dialogueBox.playText() dialogueBox.playText()
func mouseInteraction(): func mouseInteraction():
......
...@@ -39,7 +39,6 @@ func objInteraction(selected): ...@@ -39,7 +39,6 @@ func objInteraction(selected):
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
dialogueBox.playText() dialogueBox.playText()
func gotNote(): # once lab note has been retrieved func gotNote(): # once lab note has been retrieved
......
...@@ -32,7 +32,6 @@ func objInteraction(selected): # when an object is used on it ...@@ -32,7 +32,6 @@ func objInteraction(selected): # when an object is used on it
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
dialogueBox.playText() dialogueBox.playText()
func outerLock(): func outerLock():
......
...@@ -32,5 +32,4 @@ func objInteraction(selected): ...@@ -32,5 +32,4 @@ func objInteraction(selected):
dialogueBox.text = "Food, you are now free from your prison. You're welcome." dialogueBox.text = "Food, you are now free from your prison. You're welcome."
unlocked = true unlocked = true
inventory.remove_item(selected) inventory.remove_item(selected)
inventory.unselect_all() #unselect item
dialogueBox.playText() dialogueBox.playText()
...@@ -23,14 +23,15 @@ func mouseInteraction(): ...@@ -23,14 +23,15 @@ func mouseInteraction():
func objInteraction(selected): # when an object is used on it func objInteraction(selected): # when an object is used on it
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) == "Nana": if inventory.get_item_text(selected) == "Nana":
if !hadNana: if !hadNana:
inventory.disable()
dialogueBox.text = "Moxie: Hey Brodie! Have you met Nana?" dialogueBox.text = "Moxie: Hey Brodie! Have you met Nana?"
dialogueArrow.setScene("First Nana pass") dialogueArrow.setScene("First Nana pass")
dialogueArrow.show() dialogueArrow.show()
hadNana = true hadNana = true
else: else:
inventory.disable()
dialogueBox.text = "Moxie: Hey, could you hold Nana for me for a sec?" dialogueBox.text = "Moxie: Hey, could you hold Nana for me for a sec?"
dialogueArrow.setScene("Nana again") dialogueArrow.setScene("Nana again")
dialogueArrow.show() dialogueArrow.show()
...@@ -39,7 +40,6 @@ func objInteraction(selected): # when an object is used on it ...@@ -39,7 +40,6 @@ func objInteraction(selected): # when an object is used on it
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
dialogueBox.playText() dialogueBox.playText()
func doesHaveNana(): func doesHaveNana():
......
...@@ -16,6 +16,5 @@ func objInteraction(selected): # when an object is used on it ...@@ -16,6 +16,5 @@ func objInteraction(selected): # when an object is used on it
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
dialogueBox.playText() dialogueBox.playText()
...@@ -20,5 +20,4 @@ func objInteraction(selected): # when an object is used on it ...@@ -20,5 +20,4 @@ func objInteraction(selected): # when an object is used on it
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
dialogueBox.playText() dialogueBox.playText()
...@@ -37,4 +37,3 @@ func objInteraction(selected): # when an object is used on it ...@@ -37,4 +37,3 @@ func objInteraction(selected): # when an object is used on it
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
dialogueBox.playText() dialogueBox.playText()
inventory.unselect_all() #unselect item
...@@ -35,5 +35,4 @@ func objInteraction(selected): ...@@ -35,5 +35,4 @@ func objInteraction(selected):
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
dialogueBox.playText() dialogueBox.playText()
...@@ -36,5 +36,4 @@ func objInteraction(selected): # when an object is used on it ...@@ -36,5 +36,4 @@ func objInteraction(selected): # when an object is used on it
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
dialogueBox.playText() dialogueBox.playText()
...@@ -32,4 +32,3 @@ func objInteraction(selected): # when an object is used on it ...@@ -32,4 +32,3 @@ func objInteraction(selected): # when an object is used on it
else: # if they try to use the plunger on a clean toilet else: # if they try to use the plunger on a clean toilet
dialogueBox.text = "I can't make it any LESS unclogged.." dialogueBox.text = "I can't make it any LESS unclogged.."
dialogueBox.playText() dialogueBox.playText()
inventory.unselect_all() #unselect item
...@@ -20,6 +20,5 @@ func objInteraction(selected): ...@@ -20,6 +20,5 @@ func objInteraction(selected):
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
dialogueBox.playText() dialogueBox.playText()
...@@ -23,7 +23,6 @@ func objInteraction(selected): # when an object is used on it ...@@ -23,7 +23,6 @@ func objInteraction(selected): # when an object is used on it
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
dialogueBox.playText() dialogueBox.playText()
func canYoga(): func canYoga():
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
[ext_resource path="res://assets/Fonts/BeVietnamPro-Medium.ttf" type="DynamicFontData" id=1] [ext_resource path="res://assets/Fonts/BeVietnamPro-Medium.ttf" type="DynamicFontData" id=1]
[resource] [resource]
size = 15 size = 14
font_data = ExtResource( 1 ) font_data = ExtResource( 1 )
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