simplify worldState logic
This commit is contained in:
parent
e9e8eea801
commit
8d4abe863c
@ -113,8 +113,8 @@ const sortieBossNode: Record<Exclude<TSortieBoss, "SORTIE_BOSS_CORRUPTED_VOR">,
|
||||
SORTIE_BOSS_VOR: "SolNode108"
|
||||
};
|
||||
|
||||
const voidCorruptionAlerts = [
|
||||
{
|
||||
const configAlerts: Record<string, IAlert> = {
|
||||
voidCorruptionWeek1: {
|
||||
_id: { $oid: "677d452e2f324ee7b90f8ccf" },
|
||||
Activation: { $date: { $numberLong: "1736524800000" } },
|
||||
Expiry: { $date: { $numberLong: "2000000000000" } },
|
||||
@ -134,7 +134,7 @@ const voidCorruptionAlerts = [
|
||||
maxEnemyLevel: 15
|
||||
}
|
||||
},
|
||||
{
|
||||
voidCorruptionWeek2: {
|
||||
_id: { $oid: "677d45811daeae9de40e8c0f" },
|
||||
Activation: { $date: { $numberLong: "1737129600000" } },
|
||||
Expiry: { $date: { $numberLong: "2000000000000" } },
|
||||
@ -154,7 +154,7 @@ const voidCorruptionAlerts = [
|
||||
maxWaveNum: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
voidCorruptionWeek3: {
|
||||
_id: { $oid: "677d45a494ad716c90006b9a" },
|
||||
Activation: { $date: { $numberLong: "1737734400000" } },
|
||||
Expiry: { $date: { $numberLong: "2000000000000" } },
|
||||
@ -175,7 +175,7 @@ const voidCorruptionAlerts = [
|
||||
maxEnemyLevel: 35
|
||||
}
|
||||
},
|
||||
{
|
||||
voidCorruptionWeek4: {
|
||||
_id: { $oid: "677d4700682d173abb0e19fe" },
|
||||
Activation: { $date: { $numberLong: "1738339200000" } },
|
||||
Expiry: { $date: { $numberLong: "2000000000000" } },
|
||||
@ -194,7 +194,7 @@ const voidCorruptionAlerts = [
|
||||
maxEnemyLevel: 45
|
||||
}
|
||||
}
|
||||
] satisfies readonly IAlert[];
|
||||
};
|
||||
|
||||
const eidolonJobs: readonly string[] = [
|
||||
"/Lotus/Types/Gameplay/Eidolon/Jobs/AssassinateBountyAss",
|
||||
@ -1566,17 +1566,12 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
|
||||
fullyStockBaro(vt);
|
||||
}
|
||||
|
||||
const vcWeeks = [
|
||||
["voidCorruptionWeek1", 0],
|
||||
["voidCorruptionWeek2", 1],
|
||||
["voidCorruptionWeek3", 2],
|
||||
["voidCorruptionWeek4", 3]
|
||||
] as const;
|
||||
|
||||
const selected = vcWeeks.filter(([flag]) => config.worldState?.[flag]).map(([, idx]) => voidCorruptionAlerts[idx]);
|
||||
|
||||
if (selected.length) {
|
||||
worldState.Alerts = [...worldState.Alerts, ...selected];
|
||||
if (config.worldState) {
|
||||
for (const [key, alert] of Object.entries(configAlerts)) {
|
||||
if (config.worldState[key as keyof typeof config.worldState]) {
|
||||
worldState.Alerts.push(alert);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const isFebruary = date.getUTCMonth() == 1;
|
||||
|
||||
@ -7,7 +7,7 @@ export interface IWorldState {
|
||||
Time: number;
|
||||
InGameMarket: IInGameMarket;
|
||||
Goals: IGoal[];
|
||||
Alerts: readonly IAlert[];
|
||||
Alerts: IAlert[];
|
||||
Sorties: ISortie[];
|
||||
LiteSorties: ILiteSortie[];
|
||||
SyndicateMissions: ISyndicateMissionInfo[];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user