fix: junction completion on steel path doesn't save #2937

Merged
Sainan merged 2 commits from sp-junction-fix into main 2025-10-25 00:27:03 -07:00
2 changed files with 4 additions and 4 deletions

View File

@ -2172,7 +2172,7 @@ export const addMissionComplete = (inventory: TInventoryDatabaseDocument, { Tag,
if (itemIndex !== -1) {
Missions[itemIndex].Completes += Completes;
if (Tier) {
if (Completes && Tier) {
Missions[itemIndex].Tier = Tier;
}
} else {

View File

@ -310,6 +310,9 @@ export const addMissionInventoryUpdates = async (
}
break;
}
case "Missions":
addMissionComplete(inventory, value);
break;
case "LastRegionPlayed":
if (!(config.unfaithfulBugFixes?.ignore1999LastRegionPlayed && value === "1999MapName")) {
inventory.LastRegionPlayed = value;
@ -1242,9 +1245,6 @@ export const addMissionRewards = async (
if (missions && missions.Tag in ExportRegions) {
const node = ExportRegions[missions.Tag];
// cannot add this with normal updates because { Tier: 1 } would mark the SP node as completed even on a failure
addMissionComplete(inventory, missions);
//node based credit rewards for mission completion
if (isEligibleForCreditReward(rewardInfo, missions, node)) {
const levelCreditReward = getLevelCreditRewards(node);