diff --git a/dist/DewardianDev-MOAR-2.6.3.zip b/dist/DewardianDev-MOAR-2.6.4.zip similarity index 75% rename from dist/DewardianDev-MOAR-2.6.3.zip rename to dist/DewardianDev-MOAR-2.6.4.zip index 9a32793..ff57431 100644 Binary files a/dist/DewardianDev-MOAR-2.6.3.zip and b/dist/DewardianDev-MOAR-2.6.4.zip differ diff --git a/package.json b/package.json index a8d8b82..4be0969 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "MOAR", - "version": "2.6.3", + "version": "2.6.4", "main": "src/mod.js", "license": "MIT", "author": "DewardianDev", diff --git a/src/Spawning/buildPmcs.ts b/src/Spawning/buildPmcs.ts index ef7e0d4..52c60d4 100644 --- a/src/Spawning/buildPmcs.ts +++ b/src/Spawning/buildPmcs.ts @@ -38,7 +38,6 @@ export default function buildPmcs( return BotZoneName; }) ), - ...pmcHotZones, ]); // Make labs have only named zones @@ -70,9 +69,17 @@ export default function buildPmcs( `${map} PMC wave count changed from ${pmcWaveCount} to ${totalWaves} due to escapeTimeLimit adjustment` ); } + const timeLimit = locationList[index].base.EscapeTimeLimit * 60; - const waves = buildPmcWaves(pmcWaveCount, timeLimit, config, pmcZones); + const waves = buildPmcWaves( + totalWaves, + timeLimit, + config, + pmcZones, + pmcHotZones + ); + locationList[index].base.BossLocationSpawn = [ ...waves, ...locationList[index].base.BossLocationSpawn, diff --git a/src/Spawning/updateSpawnLocations.ts b/src/Spawning/updateSpawnLocations.ts index c4f9cf4..99ba9ea 100644 --- a/src/Spawning/updateSpawnLocations.ts +++ b/src/Spawning/updateSpawnLocations.ts @@ -12,6 +12,18 @@ export default function updateSpawnLocations( // console.log(map); const limit = mapConfig[map].spawnMinDistance; + const InfiltrationList = [ + ...new Set( + locationList[index].base.SpawnPointParams.filter( + ({ Infiltration }) => Infiltration + ).map(({ Infiltration }) => Infiltration) + ), + ]; + + // console.log(map, InfiltrationList); + const getRandomInfil = (): string => + InfiltrationList[Math.floor(Math.random() * InfiltrationList.length)]; + // console.log(InfiltrationList); // console.log("\n" + map); locationList[index].base.SpawnPointParams.forEach( ( @@ -30,13 +42,11 @@ export default function updateSpawnLocations( !BotZoneName?.toLowerCase().includes("snipe") && DelayToCanSpawnSec < 41 ) { - // Make it so players can spawn anywhere. + // Make it so players/pmcs can spawn anywhere. if ( config.playerOpenZones && !!Infiltration && - (Sides.includes("Pmc") || Sides.includes("All")) && - Categories.length === 1 && - Categories[0] === "Player" + (Sides.includes("Pmc") || Sides.includes("All")) ) { locationList[index].base.SpawnPointParams[innerIndex].Categories = [ "Player", @@ -44,6 +54,10 @@ export default function updateSpawnLocations( innerIndex % 2 === 0 ? "Group" : "Opposite", ]; + locationList[index].base.SpawnPointParams[innerIndex].Sides = [ + "Pmc", + "All", + ]; // console.log( // BotZoneName || "none", // locationList[index].base.SpawnPointParams[innerIndex].Categories, @@ -65,12 +79,21 @@ export default function updateSpawnLocations( if (!Infiltration && config.allOpenZones) { locationList[index].base.SpawnPointParams[innerIndex].Categories = [ + "All", "Bot", "Player", "Coop", innerIndex % 2 === 0 ? "Group" : "Opposite", ]; + + locationList[index].base.SpawnPointParams[innerIndex].Infiltration = + getRandomInfil(); + // console.log( + // locationList[index].base.SpawnPointParams[innerIndex].Infiltration + // ); locationList[index].base.SpawnPointParams[innerIndex].Sides = [ + "Pmc", + "Savage", "All", ]; } diff --git a/src/Spawning/utils.ts b/src/Spawning/utils.ts index 3aa28c2..804bb17 100644 --- a/src/Spawning/utils.ts +++ b/src/Spawning/utils.ts @@ -193,9 +193,23 @@ export const buildPmcWaves = ( pmcTotal: number, escapeTimeLimit: number, config: typeof _config, - bossZones: string[] + bossZones: string[], + hotZones: string[] ): IBossLocationSpawn[] => { + // console.log(pmcTotal) if (!pmcTotal) return []; + const halfIndex = Math.round(bossZones.length * 0.75); //Put hotzones in the 2 - 4 spawns + // console.log(bossZones.length); + bossZones = [ + ...bossZones.slice(0, halfIndex), + ...hotZones, + ...bossZones.slice(halfIndex), + ]; + + // console.log(bossZones.length, hotZones.length); + // console.log(bossZones); + pmcTotal = pmcTotal + hotZones.length; + let { pmcMaxGroupSize, pmcDifficulty, @@ -203,6 +217,7 @@ export const buildPmcWaves = ( morePmcGroups, pmcWaveDistribution, } = config; + const averageTime = (escapeTimeLimit * 0.8) / pmcTotal; const waves: IBossLocationSpawn[] = [];