Compare commits

..

2 Commits

Author SHA1 Message Date
f59fc9ce3b 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
2025-03-28 23:58:48 +01:00
5f9d3abcb1 Config: Rename 'events' to 'worldState' 2025-03-28 23:58:34 +01:00
4 changed files with 11 additions and 8 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`.
- `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

@ -38,10 +38,11 @@
"noDojoResearchTime": false,
"fastClanAscension": false,
"spoofMasteryRank": -1,
"events": {
"worldState": {
"creditBoost": false,
"affinityBoost": 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"
? req.query.buildLabel.split(" ").join("+")
: buildConfig.buildLabel,
Time: Math.round(Date.now() / 1000),
Time: config.worldState?.lockTime || Math.round(Date.now() / 1000),
Goals: [],
GlobalUpgrades: [],
LiteSorties: [],
@ -68,7 +68,7 @@ export const worldStateController: RequestHandler = (req, res) => {
...staticWorldState
};
if (config.events?.starDays) {
if (config.worldState?.starDays) {
worldState.Goals.push({
_id: { $oid: "67a4dcce2a198564d62e1647" },
Activation: { $date: { $numberLong: "1738868400000" } },
@ -117,7 +117,7 @@ export const worldStateController: RequestHandler = (req, res) => {
Nodes: []
};
if (config.events?.creditBoost) {
if (config.worldState?.creditBoost) {
worldState.GlobalUpgrades.push({
_id: { $oid: "5b23106f283a555109666672" },
Activation: { $date: { $numberLong: "1740164400000" } },
@ -129,7 +129,7 @@ export const worldStateController: RequestHandler = (req, res) => {
LocalizeDescTag: ""
});
}
if (config.events?.affinityBoost) {
if (config.worldState?.affinityBoost) {
worldState.GlobalUpgrades.push({
_id: { $oid: "5b23106f283a555109666673" },
Activation: { $date: { $numberLong: "1740164400000" } },
@ -141,7 +141,7 @@ export const worldStateController: RequestHandler = (req, res) => {
LocalizeDescTag: ""
});
}
if (config.events?.resourceBoost) {
if (config.worldState?.resourceBoost) {
worldState.GlobalUpgrades.push({
_id: { $oid: "5b23106f283a555109666674" },
Activation: { $date: { $numberLong: "1740164400000" } },

View File

@ -64,11 +64,12 @@ interface IConfig {
noDojoResearchTime?: boolean;
fastClanAscension?: boolean;
spoofMasteryRank?: number;
events?: {
worldState?: {
creditBoost?: boolean;
affinityBoost?: boolean;
resourceBoost?: boolean;
starDays?: boolean;
lockTime?: number;
};
}