XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 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
AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
提交于

代码差异

1 个文件 +6 -0
Modified src/controllers/api/inventoryController.ts +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 }