Skip to content

Commit

Permalink
Merge pull request #3 from CurtisSheu/stalevoyagemissionsfix
Browse files Browse the repository at this point in the history
Fix for stale voyage missions.
  • Loading branch information
NotNite authored Oct 24, 2023
2 parents 91d4fa0 + a5f605a commit a99c6fb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions DistantSeas/Fishing/DebugStateTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,12 @@ public int GetItemCount(uint id) {
}

public void Dispose() { }

public void ResetMissions() {
MissionState = new() {
new MissionState(0),
new MissionState(0),
new MissionState(0)
};
}
}
1 change: 1 addition & 0 deletions DistantSeas/Fishing/IStateTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ public interface IStateTracker : IDisposable {
public bool IsActionReady(uint id);
public uint GetStatusStacks(uint id);
public int GetItemCount(uint id);
public void ResetMissions();
}
4 changes: 4 additions & 0 deletions DistantSeas/Fishing/NormalStateTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,8 @@ private void NukeAddonsFromOrbit() {
}
}
}

public void ResetMissions() {
MissionState.Clear();
}
}
2 changes: 2 additions & 0 deletions DistantSeas/Tracking/Journal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ private void ExitedOceanFishing() {
this.missionTwo = 0;
this.missionThree = 0;
this.pollingForDataPopulation = false;

Plugin.StateTracker.ResetMissions();
}

// public for debugging purposes
Expand Down

0 comments on commit a99c6fb

Please sign in to comment.