feat: lock worldState time via config #1361
@ -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.
 | 
			
		||||
 | 
			
		||||
@ -42,6 +42,7 @@
 | 
			
		||||
    "creditBoost": false,
 | 
			
		||||
    "affinityBoost": false,
 | 
			
		||||
    "resourceBoost": false,
 | 
			
		||||
    "starDays": true
 | 
			
		||||
    "starDays": true,
 | 
			
		||||
    "lockTime": 0
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -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: [],
 | 
			
		||||
 | 
			
		||||
@ -69,6 +69,7 @@ interface IConfig {
 | 
			
		||||
        affinityBoost?: boolean;
 | 
			
		||||
        resourceBoost?: boolean;
 | 
			
		||||
        starDays?: boolean;
 | 
			
		||||
        lockTime?: number;
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user