Commit 919b71f0 authored by Julia Santos's avatar Julia Santos

Bathroom + rooms after the Kitchen are now lucked until tutorial quests are finished

parent 0f4582fc
...@@ -91,6 +91,7 @@ func _start_lab(): # trying the lab the first time, adds the new quests ...@@ -91,6 +91,7 @@ func _start_lab(): # trying the lab the first time, adds the new quests
quests.add("Figure out what's making that noise") quests.add("Figure out what's making that noise")
quests.add("Feed Banana") quests.add("Feed Banana")
newQuests = true newQuests = true
movementHandle.finishTutorial()
func _add_quest(questName): func _add_quest(questName):
print("Added "+questName) print("Added "+questName)
...@@ -163,7 +164,7 @@ func _return_laundry_notepad(): # exiting laundry notebook puzzle ...@@ -163,7 +164,7 @@ func _return_laundry_notepad(): # exiting laundry notebook puzzle
# ----------------- Movement-related events (traversing between rooms, locking/unlocking, etc) ----------------- # ----------------- Movement-related events (traversing between rooms, locking/unlocking, etc) -----------------
func _bathroom_enter(): # entering bathroom func _bathroom_enter(): # entering bathroom
if !lockedNotepad: if !lockedNotepad && newQuests:
bedroom.hide() bedroom.hide()
bathroom.show() bathroom.show()
movementHandle.disableMovement() movementHandle.disableMovement()
......
...@@ -5,6 +5,8 @@ onready var current # index of the room Moxie is currently in ...@@ -5,6 +5,8 @@ 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 tutorial = true
func _ready(): # Called when the node enters the scene tree for the first time. func _ready(): # Called when the node enters the scene tree for the first time.
current = 0 current = 0
rooms[1].hide() #still not sure we need to do this but just in case rooms[1].hide() #still not sure we need to do this but just in case
...@@ -15,7 +17,7 @@ func _pressedRight(): # when right arrow is clicked, move to the next adjacent s ...@@ -15,7 +17,7 @@ func _pressedRight(): # when right arrow is clicked, move to the next adjacent s
rooms[current].hide() rooms[current].hide()
current += 1 current += 1
rooms[current].show() rooms[current].show()
if current == rooms.size()-1: if current == rooms.size()-1 || (current == 2 && tutorial):
right.hide() right.hide()
if current >= 1: if current >= 1:
left.show() left.show()
...@@ -33,7 +35,7 @@ func _pressedLeft(): # when left arrow is clicked, move to the next adjacent scr ...@@ -33,7 +35,7 @@ func _pressedLeft(): # when left arrow is clicked, move to the next adjacent scr
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():
if current < rooms.size() - 1: if (current < rooms.size() - 1) && !(current == 2 && tutorial):
right.show() right.show()
if current >= 1: if current >= 1:
left.show() left.show()
...@@ -44,3 +46,6 @@ func disableMovement(): # disables right and left arrow movement ...@@ -44,3 +46,6 @@ func disableMovement(): # disables right and left arrow movement
func enableMovement(): # enables right and left arrow movement func enableMovement(): # enables right and left arrow movement
check_arrows() check_arrows()
func finishTutorial():
tutorial = false
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