返回提交历史
Modified
config.json
+2
-1
Modified
src/controllers/api/inventoryController.ts
+5
-6
Added
static/fixed_responses/allFlavourItems.json
+1951
-0
Renamed
static/fixed_responses/allShipDecorations.json
+0
-0
XFEstudio/XFESpaceNinjaServer
feat: unlockAllFlavourItems (#149)
f019d362
代码差异
4 个文件
+1958
-7
@@ -10,5 +10,6 @@
10
10
"unlockAllQuests": true,
11
11
"infiniteResources": true,
12
12
"unlockallShipFeatures": true,
13
"unlockAllShipDecorations": true
13
"unlockAllShipDecorations": true,
14
"unlockAllFlavourItems": true
14
15
}
@@ -5,9 +5,10 @@ import { Request, RequestHandler, Response } from "express";
5
5
import config from "@/config.json";
6
6
import allMissions from "@/static/fixed_responses/allMissions.json";
7
7
import allQuestKeys from "@/static/fixed_responses/allQuestKeys.json";
8
import allShipDecorations from "@/static/fixed_responses/shipDecorations.json";
8
import allShipDecorations from "@/static/fixed_responses/allShipDecorations.json";
9
import allFlavourItems from "@/static/fixed_responses/allFlavourItems.json";
9
10
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
10
import { IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes";
11
import { IShipInventory, IFlavourItem } from "@/src/types/inventoryTypes/inventoryTypes";
11
12
12
13
const inventoryController: RequestHandler = async (request: Request, response: Response) => {
13
14
const accountId = request.query.accountId;
@@ -43,10 +44,8 @@ const inventoryController: RequestHandler = async (request: Request, response: R
43
44
44
45
if (config.unlockAllMissions) inventoryResponse.Missions = allMissions;
45
46
if (config.unlockAllQuests) inventoryResponse.QuestKeys = allQuestKeys;
46
47
if (config.unlockAllShipDecorations) {
48
inventoryResponse.ShipDecorations = allShipDecorations;
49
}
47
if (config.unlockAllShipDecorations) inventoryResponse.ShipDecorations = allShipDecorations;
48
if (config.unlockAllFlavourItems) inventoryResponse.FlavourItems = allFlavourItems satisfies IFlavourItem[];
50
49
51
50
response.json(inventoryResponse);
52
51
};
此文件没有可显示的逐行差异。