Config: Add worldState.lockTime
All checks were successful
Build / build (22) (push) Successful in 39s
Build / build (18) (push) Successful in 1m16s
Build / build (20) (push) Successful in 1m20s
Build / build (18) (pull_request) Successful in 43s
Build / build (20) (pull_request) Successful in 1m12s
Build / build (22) (pull_request) Successful in 1m25s

This commit is contained in:
Sainan 2025-03-28 23:58:48 +01:00
parent 5f9d3abcb1
commit f59fc9ce3b
4 changed files with 5 additions and 2 deletions

View File

@ -12,3 +12,4 @@ To get an idea of what functionality you can expect to be missing [have a look t
- `logger.level` can be `fatal`, `error`, `warn`, `info`, `http`, `debug`, or `trace`. - `logger.level` can be `fatal`, `error`, `warn`, `info`, `http`, `debug`, or `trace`.
- `myIrcAddresses` can be used to point to an IRC server. If not provided, defaults to `[ myAddress ]`. - `myIrcAddresses` can be used to point to an IRC server. If not provided, defaults to `[ myAddress ]`.
- `worldState.lockTime` will lock the time provided in worldState if nonzero, e.g. `1743202800` for night in POE.

View File

@ -42,6 +42,7 @@
"creditBoost": false, "creditBoost": false,
"affinityBoost": false, "affinityBoost": false,
"resourceBoost": false, "resourceBoost": false,
"starDays": true "starDays": true,
"lockTime": 0
} }
} }

View File

@ -24,7 +24,7 @@ export const worldStateController: RequestHandler = (req, res) => {
typeof req.query.buildLabel == "string" typeof req.query.buildLabel == "string"
? req.query.buildLabel.split(" ").join("+") ? req.query.buildLabel.split(" ").join("+")
: buildConfig.buildLabel, : buildConfig.buildLabel,
Time: Math.round(Date.now() / 1000), Time: config.worldState?.lockTime || Math.round(Date.now() / 1000),
Goals: [], Goals: [],
GlobalUpgrades: [], GlobalUpgrades: [],
LiteSorties: [], LiteSorties: [],

View File

@ -69,6 +69,7 @@ interface IConfig {
affinityBoost?: boolean; affinityBoost?: boolean;
resourceBoost?: boolean; resourceBoost?: boolean;
starDays?: boolean; starDays?: boolean;
lockTime?: number;
}; };
} }