feat: Void Corruption 2025 #2865
@ -41,7 +41,10 @@
 | 
			
		||||
    "naberusNightsOverride": null,
 | 
			
		||||
    "proxyRebellion": false,
 | 
			
		||||
    "proxyRebellionRewardsOverride": 0,
 | 
			
		||||
    "voidCorruption": 0,
 | 
			
		||||
    "voidCorruptionWeek1": false,
 | 
			
		||||
    "voidCorruptionWeek2": false,
 | 
			
		||||
    "voidCorruptionWeek3": false,
 | 
			
		||||
    "voidCorruptionWeek4": false,
 | 
			
		||||
    "galleonOfGhouls": 0,
 | 
			
		||||
    "ghoulEmergenceOverride": null,
 | 
			
		||||
    "plagueStarOverride": null,
 | 
			
		||||
 | 
			
		||||
@ -51,7 +51,10 @@ export interface IConfig {
 | 
			
		||||
        naberusNightsOverride?: boolean;
 | 
			
		||||
        proxyRebellion?: boolean;
 | 
			
		||||
        proxyRebellionRewardsOverride?: number;
 | 
			
		||||
        voidCorruption?: number;
 | 
			
		||||
        voidCorruptionWeek1?: boolean;
 | 
			
		||||
        voidCorruptionWeek2?: boolean;
 | 
			
		||||
        voidCorruptionWeek3?: boolean;
 | 
			
		||||
        voidCorruptionWeek4?: boolean;
 | 
			
		||||
        galleonOfGhouls?: number;
 | 
			
		||||
        ghoulEmergenceOverride?: boolean;
 | 
			
		||||
        plagueStarOverride?: boolean;
 | 
			
		||||
 | 
			
		||||
@ -1566,9 +1566,19 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
 | 
			
		||||
        fullyStockBaro(vt);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const voidCorruptionWeeks = config.worldState?.voidCorruption ?? 0;
 | 
			
		||||
    if (voidCorruptionWeeks > 0) {
 | 
			
		||||
        worldState.Alerts = [...worldState.Alerts, voidCorruptionAlerts[voidCorruptionWeeks - 1]];
 | 
			
		||||
    const vcWeeks = [
 | 
			
		||||
| 
					
	
	
	
	
	
	
	
	 
					
					Sainan marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				 | 
			||||
    ["voidCorruptionWeek1", 0],
 | 
			
		||||
    ["voidCorruptionWeek2", 1],
 | 
			
		||||
    ["voidCorruptionWeek3", 2],
 | 
			
		||||
    ["voidCorruptionWeek4", 3],
 | 
			
		||||
    ] as const;
 | 
			
		||||
 | 
			
		||||
    const selected = vcWeeks
 | 
			
		||||
        .filter(([flag]) => (config.worldState as any)?.[flag])
 | 
			
		||||
        .map(([, idx]) => voidCorruptionAlerts[idx]);
 | 
			
		||||
 | 
			
		||||
    if (selected.length) {
 | 
			
		||||
        worldState.Alerts = [...worldState.Alerts, ...selected];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const isFebruary = date.getUTCMonth() == 1;
 | 
			
		||||
 | 
			
		||||
@ -1233,15 +1233,24 @@
 | 
			
		||||
                                        </select>
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                </div>
 | 
			
		||||
                                <div class="form-group mt-2">
 | 
			
		||||
                                    <label class="form-label" for="worldState.voidCorruption" data-loc="worldState_voidCorruption"></label>
 | 
			
		||||
                                    <select class="form-control" id="worldState.voidCorruption" data-default="0">
 | 
			
		||||
                                        <option value="0" data-loc="disabled"></option>
 | 
			
		||||
                                        <option value="1" data-loc="worldState_week" data-loc-replace="1"></option>
 | 
			
		||||
                                        <option value="2" data-loc="worldState_week" data-loc-replace="2"></option>
 | 
			
		||||
                                        <option value="3" data-loc="worldState_week" data-loc-replace="3"></option>
 | 
			
		||||
                                        <option value="4" data-loc="worldState_week" data-loc-replace="4"></option>
 | 
			
		||||
                                    </select>
 | 
			
		||||
                                    <label class="form-label" data-loc="worldState_voidCorruption"></label>
 | 
			
		||||
                                    <div class="d-flex flex-wrap gap-3">
 | 
			
		||||
                                        <div class="form-check">
 | 
			
		||||
                                            <input class="form-check-input" type="checkbox" id="worldState.voidCorruptionWeek1" />
 | 
			
		||||
                                            <label class="form-check-label" for="worldState.voidCorruptionWeek1" data-loc="worldState_week" data-loc-replace="1"></label>
 | 
			
		||||
                                        </div>
 | 
			
		||||
                                        <div class="form-check">
 | 
			
		||||
                                            <input class="form-check-input" type="checkbox" id="worldState.voidCorruptionWeek2" />
 | 
			
		||||
                                            <label class="form-check-label" for="worldState.voidCorruptionWeek2" data-loc="worldState_week" data-loc-replace="2"></label>
 | 
			
		||||
                                        </div>
 | 
			
		||||
                                        <div class="form-check">
 | 
			
		||||
                                            <input class="form-check-input" type="checkbox" id="worldState.voidCorruptionWeek3" />
 | 
			
		||||
                                            <label class="form-check-label" for="worldState.voidCorruptionWeek3" data-loc="worldState_week" data-loc-replace="3"></label>
 | 
			
		||||
                                        </div>
 | 
			
		||||
                                        <div class="form-check">
 | 
			
		||||
                                            <input class="form-check-input" type="checkbox" id="worldState.voidCorruptionWeek4" />
 | 
			
		||||
                                            <label class="form-check-label" for="worldState.voidCorruptionWeek4" data-loc="worldState_week" data-loc-replace="4"></label>
 | 
			
		||||
                                        </div>
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                <div class="form-group mt-2">
 | 
			
		||||
                                    <label class="form-label" for="worldState.galleonOfGhouls" data-loc="worldState_galleonOfGhouls"></label>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	
There's really no reason to use
structuredClonehere. You can updateIWorldStateto also specifyreadonly IAlert[]for what little value it has.