forked from OpenWF/SpaceNinjaServer
		
	feat: worldState.allTheFissures (#2313)
Closes #2294 Reviewed-on: OpenWF/SpaceNinjaServer#2313 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									0ba641a2ac
								
							
						
					
					
						commit
						764cdd1ab8
					
				@ -34,4 +34,5 @@ SpaceNinjaServer requires a `config.json`. To set it up, you can copy the [confi
 | 
			
		||||
  - `RadioLegion2Syndicate` for The Emissary
 | 
			
		||||
  - `RadioLegionIntermissionSyndicate` for Intermission I
 | 
			
		||||
  - `RadioLegionSyndicate` for The Wolf of Saturn Six
 | 
			
		||||
- `allTheFissures` can be set to `normal` or `hard` to enable all fissures either in normal or steel path, respectively.
 | 
			
		||||
- `worldState.circuitGameModes` can be provided with an array of valid game modes (`Survival`, `VoidFlood`, `Excavation`, `Defense`, `Exterminate`, `Assassination`, `Alchemy`)
 | 
			
		||||
 | 
			
		||||
@ -74,6 +74,7 @@
 | 
			
		||||
    "vallisOverride": "",
 | 
			
		||||
    "duviriOverride": "",
 | 
			
		||||
    "nightwaveOverride": "",
 | 
			
		||||
    "allTheFissures": "",
 | 
			
		||||
    "circuitGameModes": null
 | 
			
		||||
  },
 | 
			
		||||
  "dev": {
 | 
			
		||||
 | 
			
		||||
@ -81,6 +81,7 @@ export interface IConfig {
 | 
			
		||||
        vallisOverride?: string;
 | 
			
		||||
        duviriOverride?: string;
 | 
			
		||||
        nightwaveOverride?: string;
 | 
			
		||||
        allTheFissures?: string;
 | 
			
		||||
        circuitGameModes?: string[];
 | 
			
		||||
    };
 | 
			
		||||
    dev?: {
 | 
			
		||||
 | 
			
		||||
@ -1524,6 +1524,25 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const populateFissures = async (worldState: IWorldState): Promise<void> => {
 | 
			
		||||
    if (config.worldState?.allTheFissures) {
 | 
			
		||||
        let i = 0;
 | 
			
		||||
        for (const [tier, nodes] of Object.entries(fissureMissions)) {
 | 
			
		||||
            for (const node of nodes) {
 | 
			
		||||
                const meta = ExportRegions[node];
 | 
			
		||||
                worldState.ActiveMissions.push({
 | 
			
		||||
                    _id: { $oid: (i++).toString().padStart(8, "0") + "8e0c70ba050f1eb7" },
 | 
			
		||||
                    Region: meta.systemIndex + 1,
 | 
			
		||||
                    Seed: 1337,
 | 
			
		||||
                    Activation: { $date: { $numberLong: "1000000000000" } },
 | 
			
		||||
                    Expiry: { $date: { $numberLong: "2000000000000" } },
 | 
			
		||||
                    Node: node,
 | 
			
		||||
                    MissionType: eMissionType[meta.missionIndex].tag,
 | 
			
		||||
                    Modifier: tier,
 | 
			
		||||
                    Hard: config.worldState.allTheFissures == "hard"
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    } else {
 | 
			
		||||
        const fissures = await Fissure.find({});
 | 
			
		||||
        for (const fissure of fissures) {
 | 
			
		||||
            const meta = ExportRegions[fissure.Node];
 | 
			
		||||
@ -1539,6 +1558,7 @@ export const populateFissures = async (worldState: IWorldState): Promise<void> =
 | 
			
		||||
                Hard: fissure.Hard
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const idToBountyCycle = (id: string): number => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user