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

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

feat: unlockAllFlavourItems (#149)

f019d362
Sainan <sainan@calamity.gg>
提交于

代码差异

4 个文件 +1958 -7
Modified config.json +2 -1
@@ -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 }
Modified src/controllers/api/inventoryController.ts +5 -6
@@ -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 };
Renamed static/fixed_responses/allShipDecorations.json +0 -0
此文件没有可显示的逐行差异。