2024-06-17 03:31:49 +02:00
|
|
|
import { WorldState } from "@/src/models/worldStateModel";
|
2024-06-22 23:56:30 +02:00
|
|
|
import { unixTimesInMs } from "@/src/constants/timeConstants";
|
|
|
|
import {
|
2024-06-26 01:29:02 +02:00
|
|
|
IActiveChallenge,
|
2024-06-22 23:56:30 +02:00
|
|
|
IActiveMission,
|
2024-06-26 01:29:02 +02:00
|
|
|
IJob,
|
2024-06-22 23:56:30 +02:00
|
|
|
ILiteSortie,
|
|
|
|
ISortie,
|
|
|
|
ISyndicateMission,
|
|
|
|
IVoidStorm,
|
2024-07-04 21:42:41 +02:00
|
|
|
IWorldStateDocument
|
2024-06-22 23:56:30 +02:00
|
|
|
} from "@/src/types/worldStateTypes";
|
2024-07-04 21:42:41 +02:00
|
|
|
import { getRandomNodes, getCurrentRotation, getRandomRotation } from "@/src/helpers/worldstateHelpers";
|
|
|
|
import { ExportRegions, ExportNightwave } from "warframe-public-export-plus";
|
2024-06-22 23:56:30 +02:00
|
|
|
import { logger } from "@/src/utils/logger";
|
|
|
|
import {
|
|
|
|
factionSyndicates,
|
|
|
|
neutralJobsSyndicates,
|
|
|
|
neutralSyndicates,
|
|
|
|
restSyndicates,
|
|
|
|
CertusNormalJobs,
|
|
|
|
CertusNarmerJobs,
|
2024-06-26 01:29:02 +02:00
|
|
|
EntratiNormalJobs,
|
|
|
|
missionIndexToMissionTypes,
|
2024-07-04 21:42:41 +02:00
|
|
|
validFissureMissionIndex,
|
2024-06-22 23:56:30 +02:00
|
|
|
omniaNodes,
|
|
|
|
endStates,
|
|
|
|
modifierTypes,
|
|
|
|
voidTiers,
|
|
|
|
FortunaNarmerJobs,
|
2024-06-26 01:29:02 +02:00
|
|
|
FortunaNormalJobs,
|
|
|
|
liteSortiesMissionIndex,
|
|
|
|
EntratiEndlessJobs,
|
2024-07-04 21:42:41 +02:00
|
|
|
normalCircuitRotations,
|
|
|
|
hardCircuitRotations,
|
|
|
|
liteSortiesBosses
|
2024-06-22 23:56:30 +02:00
|
|
|
} from "@/src/constants/worldStateConstants";
|
2024-06-17 03:31:49 +02:00
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
export const createWorldState = () => {
|
|
|
|
let ws = new WorldState() as IWorldStateDocument;
|
|
|
|
ws = updateSyndicateMissions(ws);
|
|
|
|
ws = updateVoidFissures(ws);
|
|
|
|
ws = updateSorties(ws);
|
|
|
|
ws = updateCircuit(ws);
|
|
|
|
ws = updateNightWave(ws);
|
|
|
|
ws = updateNodeOverrides(ws);
|
|
|
|
return ws;
|
2024-06-17 01:32:16 +00:00
|
|
|
};
|
2024-06-17 03:31:49 +02:00
|
|
|
|
|
|
|
export const getWorldState = async () => {
|
|
|
|
let ws = await WorldState.findOne();
|
|
|
|
if (!ws) {
|
2024-07-04 21:42:41 +02:00
|
|
|
ws = createWorldState();
|
2024-06-17 03:31:49 +02:00
|
|
|
}
|
2024-07-04 21:42:41 +02:00
|
|
|
return ws as IWorldStateDocument;
|
2024-06-22 23:56:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export const worldStateRunner = async () => {
|
|
|
|
await getWorldState();
|
|
|
|
setInterval(async () => {
|
2024-07-04 21:42:41 +02:00
|
|
|
try {
|
|
|
|
logger.info("Update worldState");
|
|
|
|
let ws = await getWorldState();
|
|
|
|
ws = updateSyndicateMissions(ws);
|
|
|
|
ws = updateVoidFissures(ws);
|
|
|
|
ws = updateSorties(ws);
|
|
|
|
ws = updateCircuit(ws);
|
|
|
|
ws = updateNightWave(ws);
|
|
|
|
ws = updateNodeOverrides(ws);
|
|
|
|
await ws.save();
|
|
|
|
} catch (error) {
|
|
|
|
logger.error("Failed to update worldState:", error);
|
|
|
|
}
|
2024-06-22 23:56:30 +02:00
|
|
|
}, unixTimesInMs.minute);
|
|
|
|
};
|
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
const updateSyndicateMissions = (ws: IWorldStateDocument) => {
|
2024-06-22 23:56:30 +02:00
|
|
|
const currentDate = Date.now();
|
|
|
|
const oneDayIntervalStart =
|
|
|
|
Math.floor(currentDate / unixTimesInMs.day) * unixTimesInMs.day + 16 * unixTimesInMs.hour;
|
|
|
|
const oneDayIntervalEnd = oneDayIntervalStart + unixTimesInMs.day;
|
|
|
|
|
|
|
|
const neutralJobsIntervalStart = Math.floor(currentDate / (2.5 * unixTimesInMs.hour)) * (2.5 * unixTimesInMs.hour);
|
|
|
|
const neutralJobsIntervalEnd = neutralJobsIntervalStart + 2.5 * unixTimesInMs.hour;
|
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
const neutralSeed = Math.floor(Math.random() * 99999 + 1);
|
2024-06-22 23:56:30 +02:00
|
|
|
|
|
|
|
try {
|
|
|
|
const syndicateArray = ws.SyndicateMissions || [];
|
|
|
|
|
|
|
|
const existingTags = syndicateArray.map(syndicate => syndicate.Tag);
|
|
|
|
|
|
|
|
const createNewSyndicateEntry = (tag: string): ISyndicateMission => {
|
|
|
|
switch (true) {
|
|
|
|
case factionSyndicates.includes(tag):
|
|
|
|
return {
|
|
|
|
Tag: tag,
|
2024-07-04 21:42:41 +02:00
|
|
|
Seed: Math.floor(Math.random() * 99999 + 1),
|
2024-06-22 23:56:30 +02:00
|
|
|
Nodes: getRandomNodes(7),
|
|
|
|
Activation: oneDayIntervalStart,
|
|
|
|
Expiry: oneDayIntervalEnd
|
|
|
|
};
|
|
|
|
case neutralJobsSyndicates.includes(tag):
|
|
|
|
return {
|
|
|
|
Tag: tag,
|
|
|
|
Seed: neutralSeed,
|
|
|
|
Nodes: [],
|
|
|
|
Activation: neutralJobsIntervalStart,
|
|
|
|
Expiry: neutralJobsIntervalEnd,
|
|
|
|
Jobs: getJobs(tag)
|
|
|
|
};
|
|
|
|
case neutralSyndicates.includes(tag):
|
|
|
|
return {
|
|
|
|
Tag: tag,
|
|
|
|
Seed: neutralSeed,
|
|
|
|
Nodes: [],
|
|
|
|
Activation: neutralJobsIntervalStart,
|
|
|
|
Expiry: neutralJobsIntervalEnd
|
|
|
|
};
|
|
|
|
case restSyndicates.includes(tag):
|
|
|
|
return {
|
|
|
|
Tag: tag,
|
2024-07-04 21:42:41 +02:00
|
|
|
Seed: Math.floor(Math.random() * 99999 + 1),
|
2024-06-22 23:56:30 +02:00
|
|
|
Nodes: [],
|
|
|
|
Activation: oneDayIntervalStart,
|
|
|
|
Expiry: oneDayIntervalEnd
|
|
|
|
};
|
|
|
|
default:
|
|
|
|
throw new Error(`Unhandled syndicate tag: ${tag}`);
|
|
|
|
}
|
|
|
|
};
|
2024-06-17 03:31:49 +02:00
|
|
|
|
2024-06-22 23:56:30 +02:00
|
|
|
[...factionSyndicates, ...neutralJobsSyndicates, ...neutralSyndicates, ...restSyndicates].forEach(tag => {
|
|
|
|
if (!existingTags.includes(tag)) {
|
|
|
|
syndicateArray.push(createNewSyndicateEntry(tag));
|
|
|
|
} else {
|
|
|
|
const syndicateIndex = existingTags.indexOf(tag);
|
|
|
|
const shouldUpdate = currentDate >= syndicateArray[syndicateIndex].Expiry;
|
|
|
|
|
|
|
|
if (shouldUpdate) {
|
|
|
|
syndicateArray[syndicateIndex] = {
|
|
|
|
...syndicateArray[syndicateIndex],
|
|
|
|
Tag: tag,
|
|
|
|
Seed:
|
|
|
|
neutralJobsSyndicates.includes(tag) || neutralSyndicates.includes(tag)
|
|
|
|
? neutralSeed
|
2024-07-04 21:42:41 +02:00
|
|
|
: Math.floor(Math.random() * 99999 + 1),
|
2024-06-22 23:56:30 +02:00
|
|
|
Nodes:
|
|
|
|
neutralJobsSyndicates.includes(tag) || neutralSyndicates.includes(tag)
|
|
|
|
? []
|
|
|
|
: getRandomNodes(7),
|
|
|
|
Activation:
|
|
|
|
neutralJobsSyndicates.includes(tag) || neutralSyndicates.includes(tag)
|
|
|
|
? neutralJobsIntervalStart
|
|
|
|
: oneDayIntervalStart,
|
|
|
|
Expiry:
|
|
|
|
neutralJobsSyndicates.includes(tag) || neutralSyndicates.includes(tag)
|
|
|
|
? neutralJobsIntervalEnd
|
|
|
|
: oneDayIntervalEnd,
|
|
|
|
Jobs: neutralJobsSyndicates.includes(tag) ? getJobs(tag) : undefined
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
ws.SyndicateMissions = syndicateArray;
|
|
|
|
|
|
|
|
return ws;
|
|
|
|
} catch (error) {
|
|
|
|
throw new Error(`Error while updating Syndicates ${error}`);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
const getJobs = (tag: string): IJob[] => {
|
|
|
|
const rotation = getCurrentRotation();
|
2024-06-22 23:56:30 +02:00
|
|
|
switch (tag) {
|
|
|
|
case "CetusSyndicate":
|
2024-07-04 21:42:41 +02:00
|
|
|
return [
|
2024-06-22 23:56:30 +02:00
|
|
|
{
|
|
|
|
jobType: CertusNormalJobs[Math.floor(Math.random() * CertusNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/EidolonJobMissionRewards/TierATable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 0,
|
|
|
|
minEnemyLevel: 5,
|
|
|
|
maxEnemyLevel: 15,
|
|
|
|
xpAmounts: [410, 410, 410]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: CertusNormalJobs[Math.floor(Math.random() * CertusNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/EidolonJobMissionRewards/TierBTable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 1,
|
|
|
|
minEnemyLevel: 10,
|
|
|
|
maxEnemyLevel: 30,
|
|
|
|
xpAmounts: [750, 750, 750]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: CertusNormalJobs[Math.floor(Math.random() * CertusNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/EidolonJobMissionRewards/TierCTable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 2,
|
|
|
|
minEnemyLevel: 20,
|
|
|
|
maxEnemyLevel: 40,
|
|
|
|
xpAmounts: [580, 580, 580, 850]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: CertusNormalJobs[Math.floor(Math.random() * CertusNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/EidolonJobMissionRewards/TierDTable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 3,
|
|
|
|
minEnemyLevel: 30,
|
|
|
|
maxEnemyLevel: 50,
|
|
|
|
xpAmounts: [580, 580, 580, 580, 1130]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: CertusNormalJobs[Math.floor(Math.random() * CertusNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/EidolonJobMissionRewards/TierETable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 5,
|
|
|
|
minEnemyLevel: 40,
|
|
|
|
maxEnemyLevel: 60,
|
|
|
|
xpAmounts: [710, 710, 710, 710, 1390]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: CertusNormalJobs[Math.floor(Math.random() * CertusNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/EidolonJobMissionRewards/TierETable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 10,
|
|
|
|
minEnemyLevel: 100,
|
|
|
|
maxEnemyLevel: 100,
|
|
|
|
xpAmounts: [840, 840, 840, 840, 1660]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: CertusNarmerJobs[Math.floor(Math.random() * CertusNarmerJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/EidolonJobMissionRewards/NarmerTable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 0,
|
|
|
|
minEnemyLevel: 50,
|
|
|
|
maxEnemyLevel: 70,
|
|
|
|
xpAmounts: [820, 820, 820, 820, 1610]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
case "SolarisSyndicate":
|
2024-07-04 21:42:41 +02:00
|
|
|
return [
|
2024-06-22 23:56:30 +02:00
|
|
|
{
|
|
|
|
jobType: FortunaNormalJobs[Math.floor(Math.random() * FortunaNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/VenusJobMissionRewards/VenusTierATable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 0,
|
|
|
|
minEnemyLevel: 5,
|
|
|
|
maxEnemyLevel: 15,
|
|
|
|
xpAmounts: [410, 410, 410]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: FortunaNormalJobs[Math.floor(Math.random() * FortunaNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/VenusJobMissionRewards/VenusTierBTable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 1,
|
|
|
|
minEnemyLevel: 10,
|
|
|
|
maxEnemyLevel: 30,
|
|
|
|
xpAmounts: [750, 750, 750]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: FortunaNormalJobs[Math.floor(Math.random() * FortunaNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/VenusJobMissionRewards/VenusTierCTable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 2,
|
|
|
|
minEnemyLevel: 20,
|
|
|
|
maxEnemyLevel: 40,
|
|
|
|
xpAmounts: [580, 580, 580, 850]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: FortunaNormalJobs[Math.floor(Math.random() * FortunaNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/VenusJobMissionRewards/VenusTierDTable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 3,
|
|
|
|
minEnemyLevel: 30,
|
|
|
|
maxEnemyLevel: 50,
|
|
|
|
xpAmounts: [580, 580, 580, 580, 1130]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: FortunaNormalJobs[Math.floor(Math.random() * FortunaNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/VenusJobMissionRewards/VenusTierETable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 5,
|
|
|
|
minEnemyLevel: 40,
|
|
|
|
maxEnemyLevel: 60,
|
|
|
|
xpAmounts: [710, 710, 710, 710, 1390]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: FortunaNormalJobs[Math.floor(Math.random() * FortunaNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/VenusJobMissionRewards/VenusTierETable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 10,
|
|
|
|
minEnemyLevel: 100,
|
|
|
|
maxEnemyLevel: 100,
|
|
|
|
xpAmounts: [840, 840, 840, 840, 1660]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
jobType: FortunaNarmerJobs[Math.floor(Math.random() * FortunaNarmerJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/VenusJobMissionRewards/VenusNarmerTable${rotation}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 0,
|
|
|
|
minEnemyLevel: 50,
|
|
|
|
maxEnemyLevel: 70,
|
|
|
|
xpAmounts: [820, 820, 820, 820, 1610]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
case "EntratiSyndicate":
|
2024-07-04 21:42:41 +02:00
|
|
|
return [
|
2024-06-22 23:56:30 +02:00
|
|
|
{
|
2024-06-26 01:29:02 +02:00
|
|
|
jobType: EntratiNormalJobs[Math.floor(Math.random() * EntratiNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/DeimosMissionRewards/TierATable${getRandomRotation()}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 0,
|
|
|
|
minEnemyLevel: 5,
|
|
|
|
maxEnemyLevel: 15,
|
|
|
|
xpAmounts: [5, 5, 5]
|
|
|
|
},
|
|
|
|
{
|
2024-06-26 01:29:02 +02:00
|
|
|
jobType: EntratiNormalJobs[Math.floor(Math.random() * EntratiNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/DeimosMissionRewards/TierCTable${getRandomRotation()}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 1,
|
|
|
|
minEnemyLevel: 15,
|
|
|
|
maxEnemyLevel: 25,
|
|
|
|
xpAmounts: [9, 9, 9]
|
|
|
|
},
|
|
|
|
{
|
2024-06-26 01:29:02 +02:00
|
|
|
jobType: EntratiEndlessJobs[Math.floor(Math.random() * EntratiEndlessJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/DeimosMissionRewards/TierBTable${getRandomRotation()}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 5,
|
|
|
|
minEnemyLevel: 25,
|
|
|
|
maxEnemyLevel: 30,
|
|
|
|
endless: true,
|
|
|
|
xpAmounts: [14, 14, 14]
|
|
|
|
},
|
|
|
|
{
|
2024-06-26 01:29:02 +02:00
|
|
|
jobType: EntratiNormalJobs[Math.floor(Math.random() * EntratiNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/DeimosMissionRewards/TierDTable${getRandomRotation()}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 2,
|
|
|
|
minEnemyLevel: 30,
|
|
|
|
maxEnemyLevel: 40,
|
|
|
|
xpAmounts: [19, 19, 19, 29]
|
|
|
|
},
|
|
|
|
{
|
2024-06-26 01:29:02 +02:00
|
|
|
jobType: EntratiNormalJobs[Math.floor(Math.random() * EntratiNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/DeimosMissionRewards/TierETable${getRandomRotation()}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 3,
|
|
|
|
minEnemyLevel: 40,
|
|
|
|
maxEnemyLevel: 60,
|
|
|
|
xpAmounts: [21, 21, 21, 21, 41]
|
|
|
|
},
|
|
|
|
{
|
2024-06-26 01:29:02 +02:00
|
|
|
jobType: EntratiNormalJobs[Math.floor(Math.random() * EntratiNormalJobs.length)],
|
2024-07-04 21:42:41 +02:00
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/DeimosMissionRewards/TierETable${getRandomRotation()}Rewards`,
|
2024-06-22 23:56:30 +02:00
|
|
|
masteryReq: 10,
|
|
|
|
minEnemyLevel: 100,
|
|
|
|
maxEnemyLevel: 100,
|
|
|
|
xpAmounts: [25, 25, 25, 25, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/DeimosMissionRewards/VaultBountyTierATable${getCurrentRotation()}Rewards`,
|
|
|
|
masteryReq: 5,
|
|
|
|
minEnemyLevel: 30,
|
|
|
|
maxEnemyLevel: 40,
|
|
|
|
xpAmounts: [2, 2, 2, 4],
|
|
|
|
locationTag: "ChamberB",
|
|
|
|
isVault: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/DeimosMissionRewards/VaultBountyTierBTable${getCurrentRotation()}Rewards`,
|
|
|
|
masteryReq: 5,
|
|
|
|
minEnemyLevel: 40,
|
|
|
|
maxEnemyLevel: 50,
|
|
|
|
xpAmounts: [4, 4, 4, 5],
|
|
|
|
locationTag: "ChamberA",
|
|
|
|
isVault: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
rewards: `/Lotus/Types/Game/MissionDecks/DeimosMissionRewards/VaultBountyTierCTable${getCurrentRotation()}Rewards`,
|
|
|
|
masteryReq: 5,
|
|
|
|
minEnemyLevel: 50,
|
|
|
|
maxEnemyLevel: 60,
|
|
|
|
xpAmounts: [5, 5, 5, 7],
|
|
|
|
locationTag: "ChamberC",
|
|
|
|
isVault: true
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
default:
|
|
|
|
throw new Error(`Error while updating Syndicates: Unknown Jobs syndicate ${tag}`);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
const updateVoidFissures = (ws: IWorldStateDocument) => {
|
2024-06-22 23:56:30 +02:00
|
|
|
const curDate = Date.now();
|
|
|
|
try {
|
2024-07-04 21:42:41 +02:00
|
|
|
const voidFissures = ws.ActiveMissions;
|
2024-06-22 23:56:30 +02:00
|
|
|
const voidStorms = ws.VoidStorms;
|
2024-07-04 21:42:41 +02:00
|
|
|
const voidFissuresByTier: { [key: string]: IActiveMission[] } = {
|
2024-06-22 23:56:30 +02:00
|
|
|
VoidT1: [],
|
|
|
|
VoidT2: [],
|
|
|
|
VoidT3: [],
|
|
|
|
VoidT4: [],
|
|
|
|
VoidT5: [],
|
|
|
|
VoidT6: []
|
|
|
|
};
|
|
|
|
const voidStormsByTier: { [key: string]: IVoidStorm[] } = {
|
|
|
|
VoidT1: [],
|
|
|
|
VoidT2: [],
|
|
|
|
VoidT3: [],
|
|
|
|
VoidT4: [],
|
|
|
|
VoidT5: [],
|
|
|
|
VoidT6: []
|
|
|
|
};
|
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
if (voidFissures) {
|
|
|
|
voidFissures.forEach(mission => {
|
2024-06-22 23:56:30 +02:00
|
|
|
const tier = mission.Modifier;
|
|
|
|
if (tier) {
|
2024-07-04 21:42:41 +02:00
|
|
|
if (!voidFissuresByTier[tier]) {
|
|
|
|
voidFissuresByTier[tier] = [];
|
2024-06-22 23:56:30 +02:00
|
|
|
}
|
2024-07-04 21:42:41 +02:00
|
|
|
voidFissuresByTier[tier].push(mission);
|
2024-06-22 23:56:30 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
if (voidStorms) {
|
|
|
|
voidStorms.forEach(mission => {
|
|
|
|
const tier = mission.ActiveMissionTier;
|
|
|
|
if (tier) {
|
|
|
|
if (!voidStormsByTier[tier]) {
|
|
|
|
voidStormsByTier[tier] = [];
|
|
|
|
}
|
|
|
|
voidStormsByTier[tier].push(mission);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
voidTiers.forEach(voidTier => {
|
2024-07-04 21:42:41 +02:00
|
|
|
if (voidFissuresByTier[voidTier].length < 3) {
|
|
|
|
const nodeData = getRandomFissureNode(false, voidTier == "VoidT6");
|
2024-06-22 23:56:30 +02:00
|
|
|
if (!nodeData.missionIndex) nodeData.missionIndex = 1;
|
|
|
|
const node = {
|
|
|
|
Region: nodeData.systemIndex,
|
2024-07-04 21:42:41 +02:00
|
|
|
Seed: Math.floor(Math.random() * 99999 + 1),
|
2024-06-22 23:56:30 +02:00
|
|
|
Activation: curDate,
|
|
|
|
Expiry: curDate + Math.floor(Math.random() * unixTimesInMs.hour),
|
|
|
|
Node: nodeData.nodeKey,
|
2024-06-26 01:29:02 +02:00
|
|
|
MissionType: missionIndexToMissionTypes[nodeData.missionIndex],
|
2024-06-22 23:56:30 +02:00
|
|
|
Modifier: voidTier,
|
|
|
|
Hard: Math.random() < 0.1
|
|
|
|
} as IActiveMission;
|
2024-07-04 21:42:41 +02:00
|
|
|
voidFissures?.push(node);
|
2024-06-22 23:56:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (voidStormsByTier[voidTier].length < 2) {
|
2024-07-04 21:42:41 +02:00
|
|
|
const nodeData = getRandomFissureNode(true, voidTier == "VoidT6");
|
2024-06-22 23:56:30 +02:00
|
|
|
const node = {
|
|
|
|
Activation: curDate,
|
|
|
|
Expiry: curDate + Math.floor(Math.random() * unixTimesInMs.hour),
|
|
|
|
Node: nodeData.nodeKey,
|
|
|
|
ActiveMissionTier: voidTier
|
|
|
|
} as IVoidStorm;
|
|
|
|
voidStorms?.push(node);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return ws;
|
|
|
|
} catch (error) {
|
2024-07-04 21:42:41 +02:00
|
|
|
throw new Error(`Error while updating VoidFissures: ${error}`);
|
2024-06-22 23:56:30 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
const getRandomFissureNode = (isRailJack: boolean, isOmnia: boolean) => {
|
2024-06-22 23:56:30 +02:00
|
|
|
const validNodes = Object.entries(ExportRegions)
|
2024-06-26 01:29:02 +02:00
|
|
|
.map(([key, node]) => ({ ...node, nodeKey: key }))
|
2024-07-04 21:42:41 +02:00
|
|
|
.filter(node => {
|
|
|
|
if (node.missionIndex && node.missionName) {
|
|
|
|
return (
|
|
|
|
validFissureMissionIndex.includes(node.missionIndex) &&
|
|
|
|
(!node.missionName.includes("Archwing") || !node.missionName.includes("Railjack"))
|
|
|
|
);
|
|
|
|
} else return false;
|
|
|
|
});
|
2024-06-22 23:56:30 +02:00
|
|
|
|
|
|
|
if (isRailJack) {
|
2024-07-04 21:42:41 +02:00
|
|
|
const railJackNodes = Object.keys(ExportRegions).filter(key => key.includes("CrewBattleNode"));
|
2024-06-22 23:56:30 +02:00
|
|
|
const randomKey = railJackNodes[Math.floor(Math.random() * railJackNodes.length)];
|
2024-06-26 01:29:02 +02:00
|
|
|
return { nodeKey: randomKey };
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isOmnia) {
|
|
|
|
const validOmniaNodes = validNodes.filter(node => omniaNodes.includes(node.nodeKey));
|
2024-06-22 23:56:30 +02:00
|
|
|
const randomNode = validOmniaNodes[Math.floor(Math.random() * validOmniaNodes.length)];
|
|
|
|
return {
|
|
|
|
nodeKey: randomNode.nodeKey,
|
|
|
|
systemIndex: randomNode.systemIndex,
|
|
|
|
missionIndex: randomNode.missionIndex
|
|
|
|
};
|
|
|
|
}
|
2024-06-26 01:29:02 +02:00
|
|
|
|
|
|
|
const randomNode = validNodes[Math.floor(Math.random() * validNodes.length)];
|
|
|
|
return {
|
|
|
|
nodeKey: randomNode.nodeKey,
|
|
|
|
systemIndex: randomNode.systemIndex,
|
|
|
|
missionIndex: randomNode.missionIndex
|
|
|
|
};
|
2024-06-22 23:56:30 +02:00
|
|
|
};
|
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
const updateSorties = (ws: IWorldStateDocument) => {
|
2024-06-22 23:56:30 +02:00
|
|
|
const currentDate = Date.now();
|
|
|
|
const oneDayIntervalStart =
|
|
|
|
Math.floor(currentDate / unixTimesInMs.day) * unixTimesInMs.day + 16 * unixTimesInMs.hour;
|
|
|
|
const oneDayIntervalEnd = oneDayIntervalStart + unixTimesInMs.day;
|
|
|
|
const oneWeekIntervalStart =
|
2024-07-04 21:42:41 +02:00
|
|
|
Math.floor(currentDate / unixTimesInMs.week) * unixTimesInMs.week + 16 * unixTimesInMs.hour;
|
|
|
|
const oneWeekIntervalEnd = oneWeekIntervalStart + unixTimesInMs.week;
|
|
|
|
|
|
|
|
type node = {
|
|
|
|
systemIndex: number;
|
|
|
|
missionIndex: number;
|
|
|
|
nodeKey: string;
|
|
|
|
};
|
|
|
|
|
2024-06-22 23:56:30 +02:00
|
|
|
const nodes = Object.entries(ExportRegions).map(([key, node]) => {
|
|
|
|
return {
|
2024-06-26 01:29:02 +02:00
|
|
|
systemIndex: node.systemIndex,
|
|
|
|
missionIndex: node.missionIndex,
|
2024-06-22 23:56:30 +02:00
|
|
|
nodeKey: key
|
2024-07-04 21:42:41 +02:00
|
|
|
} as node;
|
2024-06-22 23:56:30 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
try {
|
|
|
|
const liteSorties: ILiteSortie[] = ws?.LiteSorties;
|
|
|
|
const sorties: ISortie[] = ws?.Sorties;
|
|
|
|
|
|
|
|
[...liteSorties, ...sorties].forEach((sortie, index, array) => {
|
|
|
|
if (currentDate >= sortie.Expiry) array.splice(index, 1);
|
|
|
|
});
|
|
|
|
|
|
|
|
if (liteSorties.length < 1) {
|
2024-06-26 01:29:02 +02:00
|
|
|
const liteSortiesBoss = liteSortiesBosses[Math.floor(Math.random() * liteSortiesBosses.length)];
|
|
|
|
|
|
|
|
const liteSortiesSystemIndex = nodes.filter(node => {
|
|
|
|
switch (liteSortiesBoss) {
|
|
|
|
case "SORTIE_BOSS_AMAR":
|
|
|
|
return node.systemIndex === 3;
|
|
|
|
case "SORTIE_BOSS_NIRA":
|
|
|
|
return node.systemIndex === 4;
|
|
|
|
case "SORTIE_BOSS_PAAZUL":
|
|
|
|
return node.systemIndex === 0;
|
|
|
|
default:
|
|
|
|
throw new Error(`Unknown liteSortiesBoss: ${liteSortiesBoss}`);
|
|
|
|
}
|
|
|
|
});
|
2024-06-25 23:29:45 +00:00
|
|
|
|
2024-06-26 01:29:02 +02:00
|
|
|
const filteredLiteSortiesNodes = liteSortiesMissionIndex.map(missionIndexArray =>
|
2024-06-25 23:29:45 +00:00
|
|
|
liteSortiesSystemIndex.filter(node => missionIndexArray.includes(node.missionIndex))
|
2024-06-26 01:29:02 +02:00
|
|
|
);
|
2024-06-25 23:29:45 +00:00
|
|
|
|
|
|
|
const selectedLiteSortiesNodes = filteredLiteSortiesNodes.map(
|
|
|
|
filteredNodes => filteredNodes[Math.floor(Math.random() * filteredNodes.length)]
|
2024-06-26 01:29:02 +02:00
|
|
|
);
|
2024-06-25 23:29:45 +00:00
|
|
|
|
2024-06-26 01:29:02 +02:00
|
|
|
const sortie = {
|
2024-06-22 23:56:30 +02:00
|
|
|
Activation: oneWeekIntervalStart,
|
|
|
|
Expiry: oneWeekIntervalEnd,
|
|
|
|
Reward: "/Lotus/Types/Game/MissionDecks/ArchonSortieRewards",
|
2024-07-04 21:42:41 +02:00
|
|
|
Seed: Math.floor(Math.random() * 99999 + 1),
|
2024-06-26 01:29:02 +02:00
|
|
|
Boss: liteSortiesBoss,
|
|
|
|
Missions: selectedLiteSortiesNodes.map(node => ({
|
|
|
|
missionType: missionIndexToMissionTypes[node.missionIndex],
|
|
|
|
node: node.nodeKey
|
2024-06-25 23:29:45 +00:00
|
|
|
}))
|
2024-06-22 23:56:30 +02:00
|
|
|
};
|
2024-06-25 23:29:45 +00:00
|
|
|
|
2024-06-22 23:56:30 +02:00
|
|
|
liteSorties.push(sortie);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sorties.length < 1) {
|
2024-06-26 01:29:02 +02:00
|
|
|
const randomState = endStates[Math.floor(Math.random() * endStates.length)];
|
|
|
|
const selectedSortieNodes = Array.from({ length: 3 }, () => {
|
|
|
|
const randomIndex = Math.floor(Math.random() * randomState.regions.length);
|
2024-06-25 23:29:45 +00:00
|
|
|
const filteredNodes = nodes.filter(
|
|
|
|
node =>
|
|
|
|
randomState.regions[randomIndex].systemIndex === node.systemIndex &&
|
|
|
|
randomState.regions[randomIndex].missionIndex.includes(node.missionIndex)
|
2024-06-26 01:29:02 +02:00
|
|
|
);
|
|
|
|
return filteredNodes[Math.floor(Math.random() * filteredNodes.length)];
|
2024-06-22 23:56:30 +02:00
|
|
|
});
|
2024-06-25 23:29:45 +00:00
|
|
|
|
2024-06-22 23:56:30 +02:00
|
|
|
const sortie: ISortie = {
|
|
|
|
Activation: oneDayIntervalStart,
|
|
|
|
Expiry: oneDayIntervalEnd,
|
|
|
|
ExtraDrops: [],
|
|
|
|
Reward: "/Lotus/Types/Game/MissionDecks/SortieRewards",
|
2024-07-04 21:42:41 +02:00
|
|
|
Seed: Math.floor(Math.random() * 99999 + 1),
|
2024-06-26 01:29:02 +02:00
|
|
|
Boss: randomState.bossName,
|
|
|
|
Variants: selectedSortieNodes.map(node => ({
|
|
|
|
missionType: missionIndexToMissionTypes[node.missionIndex],
|
|
|
|
modifierType: modifierTypes[Math.floor(Math.random() * modifierTypes.length)],
|
|
|
|
node: node.nodeKey,
|
|
|
|
tileset: "CorpusShipTileset" // needs more info about tilesets used in nodes
|
|
|
|
})),
|
2024-06-22 23:56:30 +02:00
|
|
|
Twitter: true
|
|
|
|
};
|
2024-06-25 23:29:45 +00:00
|
|
|
sorties.push(sortie);
|
2024-06-22 23:56:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return ws;
|
|
|
|
} catch (error) {
|
|
|
|
throw new Error(`Error while updating Sorties ${error}`);
|
|
|
|
}
|
2024-06-17 01:32:16 +00:00
|
|
|
};
|
2024-06-26 01:29:02 +02:00
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
const updateCircuit = (ws: IWorldStateDocument) => {
|
2024-06-26 01:29:02 +02:00
|
|
|
try {
|
2024-07-04 21:42:41 +02:00
|
|
|
const curWeek = Math.floor(Date.now() / unixTimesInMs.week);
|
|
|
|
const normalIndex = curWeek % normalCircuitRotations.length;
|
|
|
|
const hardIndex = curWeek % hardCircuitRotations.length;
|
2024-06-26 01:29:02 +02:00
|
|
|
ws.EndlessXpChoices = [
|
2024-07-04 21:42:41 +02:00
|
|
|
{ Category: "EXC_NORMAL", Choices: normalCircuitRotations[normalIndex] },
|
|
|
|
{ Category: "EXC_HARD", Choices: hardCircuitRotations[hardIndex] }
|
2024-06-26 01:29:02 +02:00
|
|
|
];
|
|
|
|
return ws;
|
|
|
|
} catch (error) {
|
|
|
|
throw new Error(`Error while updating Circuit ${error}`);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
const updateNightWave = (ws: IWorldStateDocument) => {
|
2024-06-26 01:29:02 +02:00
|
|
|
const currentDate = Date.now();
|
|
|
|
const oneDayIntervalStart =
|
|
|
|
Math.floor(currentDate / unixTimesInMs.day) * unixTimesInMs.day + 16 * unixTimesInMs.hour;
|
|
|
|
const oneDayIntervalEnd = oneDayIntervalStart + unixTimesInMs.day;
|
|
|
|
const oneWeekIntervalStart =
|
2024-07-04 21:42:41 +02:00
|
|
|
Math.floor(currentDate / unixTimesInMs.week) * unixTimesInMs.week + 16 * unixTimesInMs.hour;
|
|
|
|
const oneWeekIntervalEnd = oneWeekIntervalStart + unixTimesInMs.week;
|
|
|
|
|
2024-06-26 01:29:02 +02:00
|
|
|
try {
|
2024-06-25 23:29:45 +00:00
|
|
|
let season = ws.SeasonInfo;
|
|
|
|
if (!season)
|
|
|
|
season = {
|
|
|
|
Activation: 1715796000000,
|
|
|
|
Expiry: 9999999999999,
|
|
|
|
AffiliationTag: "RadioLegionIntermission10Syndicate",
|
|
|
|
Season: 12,
|
|
|
|
Phase: 0,
|
|
|
|
Params: "",
|
|
|
|
ActiveChallenges: [],
|
|
|
|
UsedChallenges: []
|
|
|
|
};
|
|
|
|
const activeChallenges = season.ActiveChallenges.filter(challenge => currentDate < challenge.Expiry);
|
|
|
|
const usedChallenges = season.UsedChallenges;
|
2024-06-26 01:29:02 +02:00
|
|
|
|
|
|
|
const exportChallenges = Object.keys(ExportNightwave.challenges);
|
2024-07-04 21:42:41 +02:00
|
|
|
const filterChallenges = (prefix: string): string[] =>
|
|
|
|
exportChallenges.filter(challenge => challenge.startsWith(prefix));
|
2024-06-26 01:29:02 +02:00
|
|
|
|
|
|
|
const dailyChallenges = filterChallenges("/Lotus/Types/Challenges/Seasons/Daily/");
|
|
|
|
const weeklyChallenges = filterChallenges("/Lotus/Types/Challenges/Seasons/Weekly/");
|
|
|
|
const weeklyHardChallenges = filterChallenges("/Lotus/Types/Challenges/Seasons/WeeklyHard/");
|
|
|
|
|
2024-06-25 23:29:45 +00:00
|
|
|
let dailyCount = 0,
|
|
|
|
weeklyCount = 0,
|
|
|
|
weeklyHardCount = 0;
|
2024-06-26 01:29:02 +02:00
|
|
|
|
|
|
|
activeChallenges.forEach(challenge => {
|
|
|
|
if (challenge.Challenge.startsWith("/Lotus/Types/Challenges/Seasons/Daily/")) dailyCount++;
|
|
|
|
else if (challenge.Challenge.startsWith("/Lotus/Types/Challenges/Seasons/Weekly/")) weeklyCount++;
|
|
|
|
else if (challenge.Challenge.startsWith("/Lotus/Types/Challenges/Seasons/WeeklyHard/")) weeklyHardCount++;
|
|
|
|
});
|
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
const addChallenges = (
|
2024-06-25 23:29:45 +00:00
|
|
|
count: number,
|
|
|
|
limit: number,
|
|
|
|
intervalStart: number,
|
|
|
|
intervalEnd: number,
|
|
|
|
challengesArray: string[],
|
|
|
|
isDaily = false
|
|
|
|
) => {
|
2024-06-26 01:29:02 +02:00
|
|
|
while (count < limit) {
|
2024-06-25 23:29:45 +00:00
|
|
|
challengesArray = challengesArray.filter(challenge => !usedChallenges.includes(challenge));
|
|
|
|
const uniqueName = challengesArray[Math.floor(Math.random() * challengesArray.length)];
|
2024-06-26 01:29:02 +02:00
|
|
|
const challenge: IActiveChallenge = {
|
|
|
|
Activation: intervalStart,
|
|
|
|
Expiry: intervalEnd,
|
|
|
|
Challenge: uniqueName
|
|
|
|
};
|
2024-06-25 23:29:45 +00:00
|
|
|
if (isDaily) {
|
2024-06-26 01:29:02 +02:00
|
|
|
challenge.Daily = true;
|
|
|
|
} else {
|
2024-06-25 23:29:45 +00:00
|
|
|
usedChallenges.push(uniqueName);
|
2024-06-26 01:29:02 +02:00
|
|
|
}
|
|
|
|
activeChallenges.push(challenge);
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-06-26 01:33:51 +02:00
|
|
|
addChallenges(dailyCount, 3, oneDayIntervalStart, oneDayIntervalEnd, dailyChallenges, true);
|
|
|
|
addChallenges(weeklyCount, 5, oneWeekIntervalStart, oneWeekIntervalEnd, weeklyChallenges);
|
|
|
|
addChallenges(weeklyHardCount, 2, oneWeekIntervalStart, oneWeekIntervalEnd, weeklyHardChallenges);
|
2024-06-26 01:29:02 +02:00
|
|
|
|
|
|
|
season = {
|
|
|
|
Activation: season.Activation || 1715796000000,
|
|
|
|
Expiry: season.Expiry || 9999999999999,
|
|
|
|
AffiliationTag: season.AffiliationTag || "RadioLegionIntermission10Syndicate",
|
|
|
|
Season: season.Season || 12,
|
|
|
|
Phase: season.Phase || 0,
|
|
|
|
Params: season.Params || "",
|
|
|
|
ActiveChallenges: activeChallenges,
|
|
|
|
UsedChallenges: usedChallenges
|
2024-06-25 23:29:45 +00:00
|
|
|
};
|
2024-06-26 01:29:02 +02:00
|
|
|
|
2024-06-25 23:29:45 +00:00
|
|
|
ws.SeasonInfo = season;
|
|
|
|
return ws;
|
2024-06-26 01:29:02 +02:00
|
|
|
} catch (error) {
|
2024-07-04 21:42:41 +02:00
|
|
|
throw new Error(`Error while updating NightWave ${error}`);
|
2024-06-26 01:29:02 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-07-04 21:42:41 +02:00
|
|
|
const updateNodeOverrides = (ws: IWorldStateDocument) => {
|
2024-06-26 01:29:02 +02:00
|
|
|
try {
|
2024-07-04 21:42:41 +02:00
|
|
|
const curWeek = Math.floor(Date.now() / unixTimesInMs.week);
|
2024-06-25 23:29:45 +00:00
|
|
|
let overrides = ws.NodeOverrides;
|
|
|
|
if (overrides == undefined || overrides.length < 1) {
|
2024-06-26 01:29:02 +02:00
|
|
|
overrides = [
|
2024-06-25 23:29:45 +00:00
|
|
|
{ Node: "EuropaHUB", Hide: true },
|
|
|
|
{ Node: "ErisHUB", Hide: true },
|
|
|
|
{ Node: "VenusHUB", Hide: true },
|
2024-07-04 21:42:41 +02:00
|
|
|
{ Node: "SolNode802", Seed: curWeek }, // Elite sanctuary onslaught
|
2024-06-26 01:29:02 +02:00
|
|
|
{
|
2024-06-25 23:29:45 +00:00
|
|
|
Node: "EarthHUB",
|
|
|
|
Hide: false,
|
|
|
|
LevelOverride: "/Lotus/Levels/Proc/Hub/RelayStationHubTwoB"
|
2024-06-26 01:29:02 +02:00
|
|
|
},
|
|
|
|
{
|
2024-06-25 23:29:45 +00:00
|
|
|
Node: "MercuryHUB",
|
|
|
|
Hide: true,
|
|
|
|
LevelOverride: "/Lotus/Levels/Proc/Hub/RelayStationHubHydroid"
|
2024-06-26 01:29:02 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
} else {
|
|
|
|
const solNodeIndex = overrides.findIndex(node => node.Node === "SolNode802");
|
|
|
|
|
|
|
|
if (solNodeIndex !== -1) {
|
|
|
|
if (overrides[solNodeIndex].Seed !== curWeek) overrides[solNodeIndex].Seed = curWeek;
|
|
|
|
} else {
|
2024-06-25 23:29:45 +00:00
|
|
|
overrides.push({ Node: "SolNode802", Seed: curWeek });
|
2024-06-26 01:29:02 +02:00
|
|
|
}
|
|
|
|
}
|
2024-06-25 23:29:45 +00:00
|
|
|
ws.NodeOverrides = overrides;
|
2024-06-26 01:29:02 +02:00
|
|
|
return ws;
|
|
|
|
} catch (error) {
|
|
|
|
throw new Error(`Error while updating NodeOverrides ${error}`);
|
|
|
|
}
|
2024-06-25 23:29:45 +00:00
|
|
|
};
|