From a2d57969aea1f890157c1868e59fa12924814a59 Mon Sep 17 00:00:00 2001 From: betalars Date: Tue, 2 Dec 2025 21:38:17 +0100 Subject: [PATCH] ugly hotfixes for the transition scene --- .../transition/subway_sequence.gd | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/base-environments/transition/subway_sequence.gd b/src/base-environments/transition/subway_sequence.gd index 206afd7..04cc776 100644 --- a/src/base-environments/transition/subway_sequence.gd +++ b/src/base-environments/transition/subway_sequence.gd @@ -4,12 +4,17 @@ extends RoomTemplate @export var all_lines: Dictionary[TrainLine.id, TrainLine] func _ready() -> void: + id = State.rooms.TRANSITION %LeftDetection.body_entered.connect(on_left_train_enter) %RightDetection.body_entered.connect(on_right_train_enter) %LeftDetection.body_exited.connect(on_left_train_exit) %RightDetection.body_exited.connect(on_right_train_exit) + %burnout_station.leave_room.connect(func(): + pull_save_state(save_game) + get_parent().load_save(save_game)) func start_room(): + save_game = State.active_save_game State.pass_stage_to(%PlayerController) on_first_station() @@ -39,10 +44,16 @@ func on_third_transition(): %StationPlayer.play("third_transition") func pull_save_state(save: SaveGame) -> void: + #FIXME save.sequences_enabled = Scenes.enabled_sequences + save.current_room = State.rooms.ADULTHOOD + save_game = save func prepare_transition(): - pass + for child in %Stations.get_children(): + if child is Node3D: + if not child.name == "burnout_station": + child.queue_free() func unload(): pass @@ -93,7 +104,12 @@ func on_left_train_enter(_body): await get_tree().create_timer(5.0).timeout %Train2.get_child(0).door_open = true -var on_final: bool = false +var on_final: bool = false: + set(final): + #FIXME: this needs to be a proper sequence! + on_final = final + await get_tree().create_timer(0.5).timeout + if final: prepare_transition() var on_direct_path: bool = false func on_right_train_enter(_body): if not left_first_station: