feat: initial steps towards an independent worldState
- BuildLabel is automatically populated from config - News is replaced - Removed contemporary stuff (thermia fractures, flash sales) - "Expiry" fields extended comfortably into the future (closes #197) A lot of stuff that could still be done in this area, but you gotta start somewhere.
This commit is contained in:
		
							parent
							
								
									61450b04bb
								
							
						
					
					
						commit
						d8db19a89e
					
				@ -1,10 +1,13 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import worldState from "@/static/fixed_responses/worldState.json";
 | 
			
		||||
import config from "@/config.json";
 | 
			
		||||
 | 
			
		||||
const worldStateController: RequestHandler = (_req, res) => {
 | 
			
		||||
    const state = worldState;
 | 
			
		||||
    state.Time = Math.round(Date.now() / 1000);
 | 
			
		||||
    res.json(state);
 | 
			
		||||
    res.json({
 | 
			
		||||
        ...worldState,
 | 
			
		||||
        BuildLabel: config.buildLabel,
 | 
			
		||||
        Time: Math.round(Date.now() / 1000)
 | 
			
		||||
    });
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export { worldStateController };
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user