Skip to content

Commit

Permalink
Fix MissionController saving and loading
Browse files Browse the repository at this point in the history
  • Loading branch information
jspahrsummers committed Aug 23, 2024
1 parent f390737 commit a05b40a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions actors/player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func _ready() -> void:
if not self.save_node_path_override:
self.save_node_path_override = self.get_path()
self.ship.save_node_path_override = self.ship.get_path()
self.mission_controller.save_node_path_override = self.mission_controller.get_path()

self._rigid_body_turner = RigidBodyTurner.new()
self._rigid_body_turner.spin_thruster = self.ship.rigid_body_direction.spin_thruster
Expand Down
3 changes: 3 additions & 0 deletions mechanics/missions/mission_controller.gd
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ signal mission_failed(mission: Mission)
## Fires when the player forfeits a mission.
signal mission_forfeited(mission: Mission)

## Used to save and restore the mission controller correctly across launches.
var save_node_path_override: NodePath

## Currently accepted missions.
var _missions: Array[Mission] = []

Expand Down

0 comments on commit a05b40a

Please sign in to comment.