diff --git a/config-vanilla.json b/config-vanilla.json index c11e8621..990b017e 100644 --- a/config-vanilla.json +++ b/config-vanilla.json @@ -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, diff --git a/src/services/configService.ts b/src/services/configService.ts index a9dabaa4..c3d41987 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -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; diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index 9b03bf17..6363440b 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -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 = [ + ["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; diff --git a/static/webui/index.html b/static/webui/index.html index bc5c6406..216b34d8 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -1233,16 +1233,25 @@ -