fix: loading in both board rooms unified

This commit is contained in:
tiger tiger tiger 2026-01-22 01:36:54 +01:00
parent 071c0de5a7
commit efc2488dff
2 changed files with 15 additions and 15 deletions

View File

@ -20,16 +20,18 @@ func get_ready() -> void:
pull_save_state(State.save_game) pull_save_state(State.save_game)
card_board.board_completed.connect(func():
#TODO: hook in ending
#%DoorInteractable.show()
pass
)
card_board.closed.connect(save_room)
Scenes.scene_finished.connect(_on_scene_finished) Scenes.scene_finished.connect(_on_scene_finished)
card_picker.cards_picked.connect(card_board.populate_board) 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(): func start_room():
await super.start_room() await super.start_room()

View File

@ -47,16 +47,17 @@ func get_ready() -> void:
card_board.closed.connect(save_room) card_board.closed.connect(save_room)
card_board.board_completed.connect(func(): card_board.board_completed.connect(func():
%DoorInteractable.show()
save_game.childhood_board_complete = true save_game.childhood_board_complete = true
%DoorInteractable.show()
) )
Scenes.scene_finished.connect(_on_scene_finished) Scenes.scene_finished.connect(_on_scene_finished)
card_picker.cards_picked.connect(card_board.populate_board) card_picker.cards_picked.connect(card_board.populate_board)
ui.hide() # This MUST happen after the signal connection, or the door will remain locked
$sfx/distant_rain.play() card_board.initialise_from_save(save_game)
$"sfx/rain on window".play()
ui.hide()# Not sure?
func pull_save_state(save: SaveGame) -> void: func pull_save_state(save: SaveGame) -> void:
@ -66,9 +67,6 @@ func pull_save_state(save: SaveGame) -> void:
# Interactions can this way load their correct prompts # Interactions can this way load their correct prompts
get_tree().call_group("interactables", "pull_save_state") get_tree().call_group("interactables", "pull_save_state")
# Load board state from save first, before overwriting it
card_board.initialise_from_save(save_game)
# TODO: These should be deprecated, SaveGame is our source of truth # TODO: These should be deprecated, SaveGame is our source of truth
Scenes.started_sequences = save_game.mementos_complete Scenes.started_sequences = save_game.mementos_complete
Scenes.completed_sequences = save_game.mementos_complete Scenes.completed_sequences = save_game.mementos_complete