fix: couldn't load into adult room correctly if going through the entire game
This commit is contained in:
parent
c19b395d98
commit
cd42b64d1c
|
|
@ -9,12 +9,11 @@ func _ready() -> void:
|
||||||
|
|
||||||
|
|
||||||
func start_room():
|
func start_room():
|
||||||
super.start_room()
|
await super.start_room()
|
||||||
|
|
||||||
Scenes.player_enable.emit(true)
|
Scenes.player_enable.emit(true)
|
||||||
|
|
||||||
await Main.curtain.open()
|
await Main.curtain.open()
|
||||||
var next_room : String = await proceed # emitted by burnout_station.gd and therapy_station.gd
|
|
||||||
await Main.curtain.black()
|
|
||||||
Main._load_room(next_room)
|
|
||||||
|
|
||||||
|
|
||||||
func pull_save_state(save: SaveGame) -> void:
|
func pull_save_state(save: SaveGame) -> void:
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,7 @@ extends Node3D
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
State.room.save_game.subway_burnout = true
|
State.room.save_game.subway_burnout = true
|
||||||
%PlayerDetect.body_entered.connect(func(body): if visible and body is PlayerController: State.room.proceed.emit(Main.adulthood_room_path))
|
%PlayerDetect.body_entered.connect(func(body):
|
||||||
|
if visible and body is PlayerController:
|
||||||
|
await Main.curtain.black()
|
||||||
|
State.room.proceed.emit(Main.adulthood_room_path))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
%PlayerDetect.body_entered.connect(func(body): if visible and body is PlayerController: State.room.proceed.emit(Main.adulthood_room_path))
|
%PlayerDetect.body_entered.connect(func(body):
|
||||||
|
if visible and body is PlayerController:
|
||||||
|
State.room.save_game.subway_burnout = true
|
||||||
|
await Main.curtain.black()
|
||||||
|
State.room.proceed.emit(Main.adulthood_room_path))
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,13 @@ func get_ready() -> void:
|
||||||
|
|
||||||
|
|
||||||
func start_room():
|
func start_room():
|
||||||
super.start_room()
|
await super.start_room()
|
||||||
%UI.show()
|
%UI.show()
|
||||||
|
|
||||||
%PlayerController.process_mode = Node.PROCESS_MODE_INHERIT
|
%PlayerController.process_mode = Node.PROCESS_MODE_INHERIT
|
||||||
# Give player control immediately, then open
|
# Give player control immediately, then open
|
||||||
Scenes.player_enable.emit(true)
|
Scenes.player_enable.emit(true)
|
||||||
|
|
||||||
await Main.curtain.open()
|
await Main.curtain.open()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ func _ready() -> void:
|
||||||
|
|
||||||
|
|
||||||
func start_room():
|
func start_room():
|
||||||
super.start_room()
|
await super.start_room()
|
||||||
|
|
||||||
%UI.show()
|
%UI.show()
|
||||||
|
|
||||||
|
|
@ -33,8 +33,6 @@ func start_room():
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _play_intro_scene() -> void:
|
func _play_intro_scene() -> void:
|
||||||
# The intro scene is auto-played, not triggered by CollectableUi
|
# The intro scene is auto-played, not triggered by CollectableUi
|
||||||
var intro: Interactable = $logic/CeilingInteractable
|
var intro: Interactable = $logic/CeilingInteractable
|
||||||
|
|
@ -63,8 +61,6 @@ func get_ready():
|
||||||
$sfx/distant_rain.play()
|
$sfx/distant_rain.play()
|
||||||
$"sfx/rain on window".play()
|
$"sfx/rain on window".play()
|
||||||
|
|
||||||
await get_tree().process_frame
|
|
||||||
|
|
||||||
|
|
||||||
func pull_save_state(save: SaveGame) -> void:
|
func pull_save_state(save: SaveGame) -> void:
|
||||||
save_game = save
|
save_game = save
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ func play() -> String:
|
||||||
|
|
||||||
func start_room():
|
func start_room():
|
||||||
prints("----------", "START_ROOM", self.name, "--------------")
|
prints("----------", "START_ROOM", self.name, "--------------")
|
||||||
Main.curtain.open()
|
await get_tree().process_frame # so this registers as a coroutine in IDE
|
||||||
|
|
||||||
|
|
||||||
func pull_save_state(_save: SaveGame) -> void:
|
func pull_save_state(_save: SaveGame) -> void:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue