feat: Void Corruption 2025 #2865

Merged
Sainan merged 39 commits from Slayer55555/SpaceNinjaServer:void-alerts into main 2025-10-09 00:28:35 -07:00
Showing only changes of commit 9b1db045a8 - Show all commits

View File

@ -1567,15 +1567,13 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
}
const vcWeeks = [
Sainan marked this conversation as resolved Outdated

There's really no reason to use structuredClone here. You can update IWorldState to also specify readonly IAlert[] for what little value it has.

There's really no reason to use `structuredClone` here. You can update `IWorldState` to also specify `readonly IAlert[]` for what little value it has.
["voidCorruptionWeek1", 0],
["voidCorruptionWeek2", 1],
["voidCorruptionWeek3", 2],
["voidCorruptionWeek4", 3],
["voidCorruptionWeek1", 0],
["voidCorruptionWeek2", 1],
["voidCorruptionWeek3", 2],
["voidCorruptionWeek4", 3],
] as const;
const selected = vcWeeks
.filter(([flag]) => (config.worldState)?.[flag])
.map(([, idx]) => voidCorruptionAlerts[idx]);
const selected = vcWeeks.filter(([flag]) => config.worldState?.[flag]).map(([, idx]) => voidCorruptionAlerts[idx]);
if (selected.length) {
worldState.Alerts = [...worldState.Alerts, ...selected];