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

chore: move gameToBuildVersion to typescript (#3154)

Make it easier to import & allows us to write comments. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3154 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

e3174fc6
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

23 个文件 +63 -62
Added src/constants/gameToBuildVersion.ts +42 -0
@@ -0,0 +1,42 @@
1 const gameToBuildVersion = {
2 "41.0.0": "2025.12.09.14.18",
3 "40.0.0": "2025.09.25.17.01",
4 "39.1.0": "2025.08.26.09.49",
5 "38.6.0": "2025.05.20.10.18",
6 "38.5.0": "2025.03.18.09.51",
7 "38.0.8": "2025.02.05.11.19",
8 "37.0.0": "2024.09.30.16.56",
9 "36.1.2": "2024.08.21.20.02",
10 "35.6.0": "2024.05.15.11.07",
11 "35.5.9": "2024.04.29.11.14",
12 "35.5.0": "2024.03.24.20.00",
13 "33.0.0": "2023.04.25.23.40",
14 "32.2.0": "2022.11.30.08.13",
15 "32.0.0": "2022.09.06.19.24",
16 "31.5.0": "2022.04.29.12.53",
17 "30.5.0": "2021.07.05.17.03",
18 "30.0.0": "2021.04.13.19.58",
19 "29.3.1": "2020.11.04.18.58",
20 "28.0.0": "2020.06.12.16.46",
21 "27.2.0": "2020.03.05.16.06",
22 "26.0.0": "2019.10.31.22.42",
23 "25.7.0": "2019.08.29.20.01",
24 "24.4.0": "2019.03.07.20.21",
25 "24.0.0": "2018.11.08.14.45",
26 "22.13.4": "2018.02.22.14.34",
27 "22.0.0": "2017.10.12.17.04",
28 "20.4.0": "2017.05.05.15.41",
29 "19.5.0": "2016.12.21.19.13",
30 "18.18.0": "2016.08.19.17.12",
31 "18.16.0": "2016.07.08.16.56",
32 "18.13.3": "2016.06.02.12.11",
33 "18.0.2": "2015.12.05.18.07",
34 "17.7.1": "2015.10.15.12.24",
35 "16.5.5": "2015.05.14.16.29",
36 "16.0.2": "2015.03.21.08.17",
37 "15.14.1": "2015.02.13.10.41",
38 "15.0.0": "2014.10.24.08.24",
39 "14.0.0": "2014.07.21.18.38",
40 "13.0.0": "2014.04.10.17.47"
41 } as const;
42 export default gameToBuildVersion as Record<keyof typeof gameToBuildVersion, string>;
Modified src/controllers/api/artifactsController.ts +1 -1
@@ -9,7 +9,7 @@ import type {
9 9 import { addMods, getInventory } from "../../services/inventoryService.ts";
10 10 import { broadcastInventoryUpdate } from "../../services/wsService.ts";
11 11 import { fromOid, version_compare } from "../../helpers/inventoryHelpers.ts";
12 import gameToBuildVersion from "../../../static/fixed_responses/gameToBuildVersion.json" with { type: "json" };
12 import gameToBuildVersion from "../../constants/gameToBuildVersion.ts";
13 13
14 14 export const artifactsController: RequestHandler = async (req, res) => {
15 15 const account = await getAccountForRequest(req);
Modified src/controllers/api/deleteSessionController.ts +1 -1
@@ -2,7 +2,7 @@ import type { RequestHandler } from "express";
2 2 import { deleteSession } from "../../managers/sessionManager.ts";
3 3 import { getAccountForRequest } from "../../services/loginService.ts";
4 4 import { version_compare } from "../../helpers/inventoryHelpers.ts";
5 import gameToBuildVersion from "../../../static/fixed_responses/gameToBuildVersion.json" with { type: "json" };
5 import gameToBuildVersion from "../../constants/gameToBuildVersion.ts";
6 6
7 7 const deleteSessionController: RequestHandler = async (_req, res) => {
8 8 const account = await getAccountForRequest(_req);
Modified src/controllers/api/descentRewardsController.ts +1 -1
@@ -7,7 +7,7 @@ import type { ICountedStoreItem } from "warframe-public-export-plus";
7 7 import { getRandomElement, getRandomInt } from "../../services/rngService.ts";
8 8 import { logger } from "../../utils/logger.ts";
9 9 import { version_compare } from "../../helpers/inventoryHelpers.ts";
10 import gameToBuildVersion from "../../../static/fixed_responses/gameToBuildVersion.json" with { type: "json" };
10 import gameToBuildVersion from "../../constants/gameToBuildVersion.ts";
11 11
12 12 export const descentRewardsController: RequestHandler = async (req, res) => {
13 13 const account = await getAccountForRequest(req);
Modified src/controllers/api/focusController.ts +1 -1
@@ -7,7 +7,7 @@ import { logger } from "../../utils/logger.ts";
7 7 import { ExportFocusUpgrades } from "warframe-public-export-plus";
8 8 import { Inventory } from "../../models/inventoryModels/inventoryModel.ts";
9 9 import { version_compare } from "../../helpers/inventoryHelpers.ts";
10 import gameToBuildVersion from "../../../static/fixed_responses/gameToBuildVersion.json" with { type: "json" };
10 import gameToBuildVersion from "../../constants/gameToBuildVersion.ts";
11 11
12 12 export const focusController: RequestHandler = async (req, res) => {
13 13 const account = await getAccountForRequest(req);
Modified src/controllers/api/hostSessionController.ts +1 -1
@@ -5,7 +5,7 @@ import { logger } from "../../utils/logger.ts";
5 5 import type { ISession } from "../../types/session.ts";
6 6 import { JSONParse } from "json-with-bigint";
7 7 import { toOid2, version_compare } from "../../helpers/inventoryHelpers.ts";
8 import gameToBuildVersion from "../../../static/fixed_responses/gameToBuildVersion.json" with { type: "json" };
8 import gameToBuildVersion from "../../constants/gameToBuildVersion.ts";
9 9
10 10 const hostSessionController: RequestHandler = async (req, res) => {
11 11 const account = await getAccountForRequest(req);
Modified src/controllers/api/inboxController.ts +1 -1
@@ -26,7 +26,7 @@ import { unixTimesInMs } from "../../constants/timeConstants.ts";
26 26 import { config } from "../../services/configService.ts";
27 27 import { Types } from "mongoose";
28 28 import { version_compare } from "../../helpers/inventoryHelpers.ts";
29 import gameToBuildVersion from "../../../static/fixed_responses/gameToBuildVersion.json" with { type: "json" };
29 import gameToBuildVersion from "../../constants/gameToBuildVersion.ts";
30 30
31 31 export const inboxController: RequestHandler = async (req, res) => {
32 32 const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query;
Modified src/controllers/api/infestedFoundryController.ts +1 -1
@@ -21,7 +21,7 @@ import {
21 21 handleSubsumeCompletion
22 22 } from "../../services/infestedFoundryService.ts";
23 23 import { sendWsBroadcastToGame } from "../../services/wsService.ts";
24 import gameToBuildVersion from "../../../static/fixed_responses/gameToBuildVersion.json" with { type: "json" };
24 import gameToBuildVersion from "../../constants/gameToBuildVersion.ts";
25 25
26 26 export const infestedFoundryController: RequestHandler = async (req, res) => {
27 27 const account = await getAccountForRequest(req);
Modified src/controllers/api/inventoryController.ts +1 -1
@@ -44,7 +44,7 @@ import { EquipmentFeatures } from "../../types/equipmentTypes.ts";
44 44 import { generateRewardSeed } from "../../services/rngService.ts";
45 45 import { getInvasionByOid, getWorldState } from "../../services/worldStateService.ts";
46 46 import { createMessage } from "../../services/inboxService.ts";
47 import gameToBuildVersion from "../../../static/fixed_responses/gameToBuildVersion.json" with { type: "json" };
47 import gameToBuildVersion from "../../constants/gameToBuildVersion.ts";
48 48
49 49 export const inventoryController: RequestHandler = async (request, response) => {
50 50 const account = await getAccountForRequest(request);
Modified src/controllers/api/loginController.ts +1 -1
@@ -14,7 +14,7 @@ import { createMessage } from "../../services/inboxService.ts";
14 14 import { fromStoreItem } from "../../services/itemDataService.ts";
15 15 import { getTokenForClient, getTunablesForClient } from "../../services/tunablesService.ts";
16 16 import type { AddressInfo } from "node:net";
17 import gameToBuildVersion from "../../../static/fixed_responses/gameToBuildVersion.json" with { type: "json" };
17 import gameToBuildVersion from "../../constants/gameToBuildVersion.ts";
18 18
19 19 export const loginController: RequestHandler = async (request, response) => {
20 20 const loginRequest = JSON.parse(String(request.body)) as ILoginRequest; // parse octet stream of json data to json object
Modified src/controllers/api/setGuildMotdController.ts +1 -1
@@ -6,7 +6,7 @@ import { getAccountForRequest, getSuffixedName } from "../../services/loginServi
6 6 import type { ILongMOTD } from "../../types/guildTypes.ts";
7 7 import { GuildPermission } from "../../types/guildTypes.ts";
8 8 import type { RequestHandler } from "express";
9 import gameToBuildVersion from "../../../static/fixed_responses/gameToBuildVersion.json" with { type: "json" };
9 import gameToBuildVersion from "../../constants/gameToBuildVersion.ts";
10 10
11 11 export const setGuildMotdController: RequestHandler = async (req, res) => {
12 12 const account = await getAccountForRequest(req);
Modified src/controllers/api/upgradesController.ts +1 -1
@@ -12,7 +12,7 @@ import { sendWsBroadcastTo } from "../../services/wsService.ts";
12 12 import type { IEquipmentDatabase } from "../../types/equipmentTypes.ts";
13 13 import { EquipmentFeatures } from "../../types/equipmentTypes.ts";
14 14 import { Types } from "mongoose";
15 import gameToBuildVersion from "../../../static/fixed_responses/gameToBuildVersion.json" with { type: "json" };
15 import gameToBuildVersion from "../../constants/gameToBuildVersion.ts";
16 16
17 17 export const upgradesController: RequestHandler = async (req, res) => {
18 18 const account = await getAccountForRequest(req);
Modified src/controllers/dynamic/worldStateController.ts +1 -1
Modified src/controllers/pay/getSkuCatalogController.ts +1 -1
Modified src/helpers/inventoryHelpers.ts +1 -1
Modified src/helpers/nemesisHelpers.ts +1 -1
Modified src/services/guildService.ts +1 -1
Modified src/services/inventoryService.ts +1 -1
Modified src/services/itemDataService.ts +1 -1
Modified src/services/missionInventoryUpdateService.ts +1 -1
Modified src/services/saveLoadoutService.ts +1 -1
Modified src/services/worldStateService.ts +1 -1
Deleted static/fixed_responses/gameToBuildVersion.json +0 -41