extends RoomTemplate class_name VolunteerRoom @onready var card_picker: CardPicker = %Picker @onready var player: PlayerController = %PlayerController func _ready(): id = State.rooms.ADULTHOOD super._ready() func get_ready() -> void: await super.get_ready() # Interactions can this way load their correct prompts get_tree().call_group("interactables", "pull_save_state") %TherapyVoluntaryInteractable.visible = not save_game.subway_burnout %TherapyUniInteractable.visible = save_game.subway_burnout pull_save_state(State.save_game) Scenes.scene_finished.connect(_on_scene_finished) card_picker.cards_picked.connect(card_board.populate_board) card_board.closed.connect(save_room) card_board.board_completed.connect(func(): save_game.childhood_board_complete = true %DoorInteractable.show() ) # This MUST happen after the signal connection, or the door will remain locked card_board.initialise_from_save(save_game) func 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() func _on_scene_finished(_id: int, _repeat:bool): await get_tree().create_timer(3).timeout save_room() func save_room(): # Update board state before saving card_board.save_to_resource(save_game) save_game.mementos_complete = Scenes.completed_sequences save_game.sequences_enabled = Scenes.enabled_sequences super.save_room() func prepare_transition(): pass func unload(): pass