Compare commits
No commits in common. "071c0de5a7d4765fd54db08699401602cb61e4b1" and "7c8428af015d314e45a516c4b5ed7864e07e9b8a" have entirely different histories.
071c0de5a7
...
7c8428af01
|
|
@ -10,25 +10,20 @@ func _ready():
|
|||
|
||||
|
||||
func get_ready() -> void:
|
||||
await super.get_ready()
|
||||
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)
|
||||
|
||||
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)
|
||||
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
|
||||
|
||||
card_board.initialise_from_save(save_game)
|
||||
card_board.board_completed.connect(func():
|
||||
#TODO: hook in ending
|
||||
%DoorInteractable.show()
|
||||
)
|
||||
|
||||
|
||||
func start_room():
|
||||
|
|
|
|||
|
|
@ -40,18 +40,20 @@ func _play_intro_scene() -> void:
|
|||
await intro.interact()
|
||||
|
||||
|
||||
func get_ready() -> void:
|
||||
await super.get_ready()
|
||||
func get_ready():
|
||||
super.get_ready()
|
||||
prints("indeed")
|
||||
Scenes.scene_finished.connect(_on_scene_finished)
|
||||
|
||||
pull_save_state(State.save_game)
|
||||
|
||||
card_board.closed.connect(save_room)
|
||||
card_board.board_completed.connect(func():
|
||||
%DoorInteractable.show()
|
||||
save_game.childhood_board_complete = true
|
||||
)
|
||||
|
||||
Scenes.scene_finished.connect(_on_scene_finished)
|
||||
pull_save_state(State.save_game)
|
||||
|
||||
card_board.closed.connect(save_room)
|
||||
|
||||
card_picker.cards_picked.connect(card_board.populate_board)
|
||||
|
||||
ui.hide()
|
||||
|
|
@ -63,16 +65,15 @@ func pull_save_state(save: SaveGame) -> void:
|
|||
save_game = save
|
||||
save_game.current_room = id
|
||||
|
||||
# Interactions can this way load their correct prompts
|
||||
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
|
||||
Scenes.started_sequences = save_game.mementos_complete
|
||||
Scenes.completed_sequences = save_game.mementos_complete
|
||||
|
||||
# Interactions can this way load their correct prompts
|
||||
get_tree().call_group("interactables", "pull_save_state")
|
||||
|
||||
# Call parent to restore player position
|
||||
super.pull_save_state(save)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ var id: State.rooms = State.rooms.NULL
|
|||
@onready var scene_player : AnimationPlayer = %SceneAnimationPlayer
|
||||
@onready var card_board : CardBoard # Optional Board, if present - set by the board in its own _ready()
|
||||
|
||||
var save_game : SaveGame:
|
||||
get: return State.save_game
|
||||
var save_game:SaveGame = null
|
||||
|
||||
signal proceed(next_scene_path: String)
|
||||
|
||||
|
|
@ -18,6 +17,7 @@ func _ready() -> void:
|
|||
push_warning("Room initialised without a SaveGame. Creating proxy save.")
|
||||
State.save_game = ResourceLoader.load("res://dev-util/debug_save.tres")
|
||||
|
||||
save_game = State.save_game
|
||||
|
||||
if not Main.normal_boot:
|
||||
push_warning("------- DEBUG MODE --------")
|
||||
|
|
@ -26,7 +26,7 @@ func _ready() -> void:
|
|||
|
||||
func get_ready():
|
||||
prints("----------", "GET_READY", self.name, "--------------")
|
||||
for i in range(20): await get_tree().process_frame
|
||||
pass
|
||||
|
||||
func play() -> String:
|
||||
for i in range(20):
|
||||
|
|
|
|||
|
|
@ -69,15 +69,8 @@ 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
|
||||
|
||||
|
|
@ -478,7 +471,7 @@ func initialise_from_save(savegame: SaveGame) -> void:
|
|||
print(" Card '%s' at %s" % [card.name, card.position])
|
||||
else:
|
||||
card.position = _generate_random_position()
|
||||
print(" Card '%s' - no saved position, using random" % card.name)
|
||||
push_warning(" Card '%s' - no saved position, using random" % card.name)
|
||||
|
||||
# Attach sticky notes to cards or position them loose
|
||||
for sticky: StickyNote in notes:
|
||||
|
|
@ -497,7 +490,7 @@ func initialise_from_save(savegame: SaveGame) -> void:
|
|||
else:
|
||||
# Fallback to center of board
|
||||
sticky.position = position + size / 2.0
|
||||
print(" Sticky '%s' - no saved position, using center" % sticky.name)
|
||||
push_warning(" Sticky '%s' - no saved position, using center" % sticky.name)
|
||||
|
||||
|
||||
# Re-sort by positions for correct z-ordering
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ func appear():
|
|||
var tween := create_tween().set_ease(Tween.EASE_IN)
|
||||
tween.tween_property(self, "modulate", Color.WHITE, 0.3)
|
||||
await tween.finished
|
||||
|
||||
|
||||
func vanish():
|
||||
var tween := create_tween().set_ease(Tween.EASE_OUT)
|
||||
tween.tween_property(self, "modulate", TRANSPARENT_BLACK, 0.3)
|
||||
|
|
|
|||
Loading…
Reference in New Issue