fix: improper order of operations / delegation for cardboard caused it to be not loaded
This commit is contained in:
parent
80eb4a727f
commit
cdcf6609d7
|
|
@ -12,19 +12,25 @@ func _ready():
|
|||
func get_ready() -> void:
|
||||
super.get_ready()
|
||||
|
||||
Scenes.scene_finished.connect(_on_scene_finished)
|
||||
card_picker.cards_picked.connect(card_board.populate_board)
|
||||
save_game = State.save_game
|
||||
|
||||
%TherapyVoluntaryInteractable.visible = not save_game.subway_burnout
|
||||
%TherapyUniInteractable.visible = save_game.subway_burnout
|
||||
|
||||
pull_save_state(State.save_game)
|
||||
|
||||
|
||||
card_board.initialise_from_save(save_game)
|
||||
card_board.board_completed.connect(func():
|
||||
#TODO: hook in ending
|
||||
%DoorInteractable.show()
|
||||
#%DoorInteractable.show()
|
||||
pass
|
||||
)
|
||||
|
||||
card_board.closed.connect(save_room)
|
||||
Scenes.scene_finished.connect(_on_scene_finished)
|
||||
card_picker.cards_picked.connect(card_board.populate_board)
|
||||
|
||||
|
||||
func start_room():
|
||||
await super.start_room()
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ func get_ready():
|
|||
pass
|
||||
|
||||
func play() -> String:
|
||||
for i in range(20): await get_tree().process_frame
|
||||
await get_ready()
|
||||
await start_room()
|
||||
var next_room : StringName = await proceed
|
||||
|
|
@ -42,6 +43,9 @@ func start_room():
|
|||
|
||||
|
||||
func pull_save_state(_save: SaveGame) -> void:
|
||||
# Interactions can this way load their correct prompts
|
||||
get_tree().call_group("interactables", "pull_save_state")
|
||||
|
||||
# Override this function to load the state of the chapter from State.save_game
|
||||
restore_player_from_save(_save)
|
||||
|
||||
|
|
|
|||
|
|
@ -69,14 +69,16 @@ func _navigate_prev():
|
|||
|
||||
func _ready() -> void:
|
||||
print("CardBoard.gd: %s._ready()" % self.name)
|
||||
State.room.card_board = self
|
||||
|
||||
super._ready()
|
||||
|
||||
# HACK: Lets us debug more easily
|
||||
if get_parent() == get_tree().root:
|
||||
_debug_mode()
|
||||
return
|
||||
|
||||
print("Board Ready!", self, "room", State.room)
|
||||
State.room.card_board = self
|
||||
|
||||
|
||||
## frame rate independent FIR smoothing filter used for small or dynamic card adjustments
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
extends Control
|
||||
extends Control
|
||||
class_name Playable
|
||||
|
||||
func _ready() -> void:
|
||||
hide()
|
||||
if not Main.normal_boot:
|
||||
play.call_deferred()
|
||||
|
||||
|
||||
## Awaitable that encapsulates the core interaction with this Playable
|
||||
func play() -> void:
|
||||
|
|
|
|||
Loading…
Reference in New Issue