Commit 7d71704f authored by Julia Santos's avatar Julia Santos

Moxie can now only leave the front door if she has the trash, or has found Banana

parent d6c5e0f3
...@@ -34,6 +34,7 @@ onready var lockedNotepad #if ur locked from certain areas bc u havent gotten th ...@@ -34,6 +34,7 @@ onready var lockedNotepad #if ur locked from certain areas bc u havent gotten th
onready var labNotes = 0 onready var labNotes = 0
onready var clothes = 0 onready var clothes = 0
onready var bathroomClean = 0 onready var bathroomClean = 0
onready var canFrontDoor = false
#items in the rooms that need access to the event handler #items in the rooms that need access to the event handler
export(Array, NodePath) onready var eventItems export(Array, NodePath) onready var eventItems
...@@ -86,9 +87,9 @@ func _eaten(): # completing first "Eat" quest ...@@ -86,9 +87,9 @@ func _eaten(): # completing first "Eat" quest
func _start_lab(): # trying the lab the first time, adds the new quests func _start_lab(): # trying the lab the first time, adds the new quests
if !quests.hasQuest("Eat") and !quests.hasQuest("Do laundry"): if !quests.hasQuest("Eat") and !quests.hasQuest("Do laundry"):
quests.add("Clean bathroom") quests.add("Clean bathroom")
quests.add("Take care of plants") quests.add("Repot plants")
quests.add("Figure out what's making that noise") quests.add("Figure out what's making that noise")
quests.add("Feed Nana") quests.add("Feed Banana")
newQuests = true newQuests = true
func _add_quest(questName): func _add_quest(questName):
...@@ -183,10 +184,17 @@ func _balcony_exit(): ...@@ -183,10 +184,17 @@ func _balcony_exit():
livingRoom.show() livingRoom.show()
func _living_to_hallway(): func _living_to_hallway():
movementHandle.disableMovement() if ((inventory.hasItem("Trash") != -1) || (!quests.hasQuest("Find Banana") && quests.hasQuest("Feed Banana"))):
livingRoom.hide() canFrontDoor = true
hallway.show()
if canFrontDoor:
movementHandle.disableMovement()
livingRoom.hide()
hallway.show()
canFrontDoor = true
else:
dialogue.text = "You know, my philosophy has always been, 'If there's no reason to leave my apartment, why leave?'"
func _hallway_to_living(): func _hallway_to_living():
movementHandle.enableMovement() movementHandle.enableMovement()
hallway.hide() hallway.hide()
......
...@@ -3,6 +3,7 @@ onready var unlocked = false ...@@ -3,6 +3,7 @@ onready var unlocked = false
signal enter signal enter
signal foundBanana signal foundBanana
# 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():
pass # Replace with function body. pass # Replace with function body.
......
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