diff --git a/config.json b/config.json index 555631c0..8d3121c6 100644 --- a/config.json +++ b/config.json @@ -1,9 +1,6 @@ { "myAddress": "localhost", "autoCreateAccount": true, - "buildLabel": "2024.05.03.11.35/g98E42og3EdWxS0UueO+PQ", - "matchmakingBuildId": "6945333874579955227", - "version": "35.5.11", "skipStoryModeChoice": true, "skipTutorial": true, "unlockAllScans": true, diff --git a/src/controllers/api/loginController.ts b/src/controllers/api/loginController.ts index 01c1b0e7..34cb9eed 100644 --- a/src/controllers/api/loginController.ts +++ b/src/controllers/api/loginController.ts @@ -2,6 +2,7 @@ import { RequestHandler } from "express"; import config from "@/config.json"; +import buildConfig from "@/static/data/buildConfig.json"; import { toLoginRequest } from "@/src/helpers/loginHelpers"; import { Account } from "@/src/models/loginModel"; @@ -43,8 +44,8 @@ const loginController: RequestHandler = async (request, response) => { DTLS: DTLS, IRC: [config.myAddress], HUB: HUB, - BuildLabel: config.buildLabel, - MatchmakingBuildId: config.matchmakingBuildId + BuildLabel: buildConfig.buildLabel, + MatchmakingBuildId: buildConfig.matchmakingBuildId }; response.json(newLoginResponse); @@ -72,8 +73,8 @@ const loginController: RequestHandler = async (request, response) => { DTLS: DTLS, IRC: [config.myAddress], HUB: HUB, - BuildLabel: config.buildLabel, - MatchmakingBuildId: config.matchmakingBuildId + BuildLabel: buildConfig.buildLabel, + MatchmakingBuildId: buildConfig.matchmakingBuildId }; response.json(newLoginResponse); diff --git a/src/controllers/dynamic/worldStateController.ts b/src/controllers/dynamic/worldStateController.ts index 232e6e96..32cfdfa0 100644 --- a/src/controllers/dynamic/worldStateController.ts +++ b/src/controllers/dynamic/worldStateController.ts @@ -1,11 +1,11 @@ import { RequestHandler } from "express"; import worldState from "@/static/fixed_responses/worldState.json"; -import config from "@/config.json"; +import buildConfig from "@/static/data/buildConfig.json"; const worldStateController: RequestHandler = (_req, res) => { res.json({ ...worldState, - BuildLabel: config.buildLabel, + BuildLabel: buildConfig.buildLabel, Time: Math.round(Date.now() / 1000) }); }; diff --git a/src/routes/cache.ts b/src/routes/cache.ts index dba00602..b714c648 100644 --- a/src/routes/cache.ts +++ b/src/routes/cache.ts @@ -1,5 +1,5 @@ import express from "express"; -import config from "@/config.json"; +import buildConfig from "@/static/data/buildConfig.json"; const cacheRouter = express.Router(); @@ -12,7 +12,7 @@ cacheRouter.get("/B.Cache.Windows_en.bin*", (_req, res) => { }); cacheRouter.get(/^\/origin\/[a-zA-Z0-9]+\/[0-9]+\/H\.Cache\.bin.*$/, (_req, res) => { - res.sendFile(`static/data/H.Cache_${config.version}.bin`, { root: "./" }); + res.sendFile(`static/data/H.Cache_${buildConfig.version}.bin`, { root: "./" }); }); export { cacheRouter }; diff --git a/static/data/.gitkeep b/static/data/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/static/data/buildConfig.json b/static/data/buildConfig.json new file mode 100644 index 00000000..5f827cfd --- /dev/null +++ b/static/data/buildConfig.json @@ -0,0 +1,5 @@ +{ + "version": "35.5.11", + "buildLabel": "2024.05.03.11.35/g98E42og3EdWxS0UueO+PQ", + "matchmakingBuildId": "6945333874579955227" +} diff --git a/static/data/items.ts b/static/data/items.ts deleted file mode 100644 index e69de29b..00000000