From cd42b64d1c763e1d91827b21ff5ea0d221a35d84 Mon Sep 17 00:00:00 2001 From: Tiger Jove Date: Wed, 21 Jan 2026 17:11:25 +0100 Subject: [PATCH] fix: couldn't load into adult room correctly if going through the entire game --- src/base-environments/transition/code/subway_sequence.gd | 9 ++++----- .../transition/stations/burnout_station.gd | 5 ++++- .../transition/stations/therapy_station.gd | 6 +++++- src/base-environments/volunteer_room/volunteer_room.gd | 3 ++- src/base-environments/youth_room/youth_room.gd | 8 ++------ src/dev-util/room_template.gd | 2 +- 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/base-environments/transition/code/subway_sequence.gd b/src/base-environments/transition/code/subway_sequence.gd index eefb172..affc618 100644 --- a/src/base-environments/transition/code/subway_sequence.gd +++ b/src/base-environments/transition/code/subway_sequence.gd @@ -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 diff --git a/src/base-environments/transition/stations/burnout_station.gd b/src/base-environments/transition/stations/burnout_station.gd index 9fe9232..dc36f5f 100644 --- a/src/base-environments/transition/stations/burnout_station.gd +++ b/src/base-environments/transition/stations/burnout_station.gd @@ -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)) diff --git a/src/base-environments/transition/stations/therapy_station.gd b/src/base-environments/transition/stations/therapy_station.gd index 8c3fcd1..1ed12a2 100644 --- a/src/base-environments/transition/stations/therapy_station.gd +++ b/src/base-environments/transition/stations/therapy_station.gd @@ -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)) diff --git a/src/base-environments/volunteer_room/volunteer_room.gd b/src/base-environments/volunteer_room/volunteer_room.gd index 211a261..9b8d425 100644 --- a/src/base-environments/volunteer_room/volunteer_room.gd +++ b/src/base-environments/volunteer_room/volunteer_room.gd @@ -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() diff --git a/src/base-environments/youth_room/youth_room.gd b/src/base-environments/youth_room/youth_room.gd index dff1196..f0ee1d8 100644 --- a/src/base-environments/youth_room/youth_room.gd +++ b/src/base-environments/youth_room/youth_room.gd @@ -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 diff --git a/src/dev-util/room_template.gd b/src/dev-util/room_template.gd index 396a68f..76806c3 100644 --- a/src/dev-util/room_template.gd +++ b/src/dev-util/room_template.gd @@ -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: