返回提交历史
Modified
src/controllers/api/inventoryController.ts
+6
-0
XFEstudio/SpaceNinjaServer
fix: exclude solNodes that doesn't exists in U5 (#3636)
prevents script error when using "Unlock All Missions" Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3636 Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
2a2c5300
代码差异
1 个文件
+6
-0
@@ -805,6 +805,12 @@ export const getInventoryResponse = async (
805
805
allowedMods.includes(x.ItemType)
806
806
);
807
807
if (inventoryResponse.Cards) inventoryResponse.Cards = [];
808
809
inventoryResponse.Missions = inventoryResponse.Missions.filter(m => {
810
if (!m.Tag.startsWith("SolNode")) return false;
811
const n = Number.parseInt(m.Tag.slice(7), 10);
812
return n >= 1 && n <= 128;
813
});
808
814
}
809
815
}
810
816
}