返回提交历史
Modified
src/services/missionInventoryUpdateService.ts
+3
-3
XFEstudio/XFESpaceNinjaServer
fix: only commit 'Missions' on successful completion (#2866)
Fixes SP missions being marked as completed when failing/quitting. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2866 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
f5c1b835
代码差异
1 个文件
+3
-3
@@ -309,9 +309,6 @@ export const addMissionInventoryUpdates = async (
309
309
}
310
310
break;
311
311
}
312
case "Missions":
313
addMissionComplete(inventory, value);
314
break;
315
312
case "LastRegionPlayed":
316
313
if (!(config.unfaithfulBugFixes?.ignore1999LastRegionPlayed && value === "1999MapName")) {
317
314
inventory.LastRegionPlayed = value;
@@ -1208,6 +1205,9 @@ export const addMissionRewards = async (
1208
1205
if (missions && missions.Tag in ExportRegions) {
1209
1206
const node = ExportRegions[missions.Tag];
1210
1207
1208
// cannot add this with normal updates because { Tier: 1 } would mark the SP node as completed even on a failure
1209
addMissionComplete(inventory, missions);
1210
1211
1211
//node based credit rewards for mission completion
1212
1212
if (isEligibleForCreditReward(rewardInfo, missions, node)) {
1213
1213
const levelCreditReward = getLevelCreditRewards(node);