Skip to content

Commit

Permalink
at startup, default to showing the first mission if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
BarthPaleologue committed Sep 6, 2024
1 parent 5e8aede commit c91bf9a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ts/ui/currentMissionDisplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ export class CurrentMissionDisplay {
this.rootNode = document.createElement("div");
this.rootNode.classList.add("currentMissionDisplay");

this.setNoMissionActive();
if (this.player.currentMissions.length === 0) {
this.setNoMissionActive();
} else {
this.setMission(this.player.currentMissions[0]);
}

SpaceShipControlsInputs.map.previousMission.on("complete", () => {
this.setPreviousMission();
Expand Down

0 comments on commit c91bf9a

Please sign in to comment.