fix: couldn't load into adult room correctly if going through the entire game
This commit is contained in:
parent
c19b395d98
commit
cd42b64d1c
|
|
@ -9,13 +9,12 @@ func _ready() -> void:
|
|||
|
||||
|
||||
func start_room():
|
||||
super.start_room()
|
||||
await super.start_room()
|
||||
|
||||
Scenes.player_enable.emit(true)
|
||||
|
||||
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:
|
||||
save.sequences_enabled = Scenes.enabled_sequences
|
||||
|
|
|
|||
|
|
@ -2,4 +2,7 @@ extends Node3D
|
|||
|
||||
func _ready() -> void:
|
||||
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
|
||||
|
||||
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():
|
||||
super.start_room()
|
||||
await super.start_room()
|
||||
%UI.show()
|
||||
|
||||
%PlayerController.process_mode = Node.PROCESS_MODE_INHERIT
|
||||
# Give player control immediately, then open
|
||||
Scenes.player_enable.emit(true)
|
||||
|
||||
await Main.curtain.open()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ func _ready() -> void:
|
|||
|
||||
|
||||
func start_room():
|
||||
super.start_room()
|
||||
await super.start_room()
|
||||
|
||||
%UI.show()
|
||||
|
||||
|
|
@ -29,9 +29,7 @@ func start_room():
|
|||
else:
|
||||
%LightAnimationPlayer.lights_on()
|
||||
|
||||
Scenes.player_enable.emit(true)
|
||||
|
||||
|
||||
Scenes.player_enable.emit(true)
|
||||
|
||||
|
||||
|
||||
|
|
@ -63,8 +61,6 @@ func get_ready():
|
|||
$sfx/distant_rain.play()
|
||||
$"sfx/rain on window".play()
|
||||
|
||||
await get_tree().process_frame
|
||||
|
||||
|
||||
func pull_save_state(save: SaveGame) -> void:
|
||||
save_game = save
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ func play() -> String:
|
|||
|
||||
func start_room():
|
||||
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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue