返回提交历史
Modified
src/controllers/dynamic/worldStateController.ts
+6
-3
Modified
static/fixed_responses/worldState.json
+120
-1285
XFEstudio/XFESpaceNinjaServer
feat: initial steps towards an independent worldState (#213)
722b4961
代码差异
2 个文件
+126
-1288
@@ -1,10 +1,13 @@
1
1
import { RequestHandler } from "express";
2
2
import worldState from "@/static/fixed_responses/worldState.json";
3
import config from "@/config.json";
3
4
4
5
const worldStateController: RequestHandler = (_req, res) => {
5
const state = worldState;
6
state.Time = Math.round(Date.now() / 1000);
7
res.json(state);
6
res.json({
7
...worldState,
8
BuildLabel: config.buildLabel,
9
Time: Math.round(Date.now() / 1000)
10
});
8
11
};
9
12
10
13
export { worldStateController };