improve: add buildConfig
This commit is contained in:
parent
61dbdba7fd
commit
74a7a6715f
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
});
|
||||
};
|
||||
|
@ -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 };
|
||||
|
5
static/data/buildConfig.json
Normal file
5
static/data/buildConfig.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"version": "35.5.11",
|
||||
"buildLabel": "2024.05.03.11.35/g98E42og3EdWxS0UueO+PQ",
|
||||
"matchmakingBuildId": "6945333874579955227"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user