Skip to content

Commit

Permalink
Add error check
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewgdewar committed Jan 21, 2025
1 parent 1269260 commit 686e718
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
Binary file modified dist/DewardianDev-MOAR-2.7.0.zip
Binary file not shown.
14 changes: 8 additions & 6 deletions src/Spawning/buildPmcs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,14 @@ export default function buildPmcs(

const pmcs = [...pmcUSEC, ...pmcBEAR];

// Add hotzones if exist
pmcHotZones.forEach((hotzone) => {
const index = Math.floor(pmcs.length * Math.random());
pmcs[index].BossZone = hotzone;
// console.log(pmcs[index]);
});
if (pmcs.length) {
// Add hotzones if exist
pmcHotZones.forEach((hotzone) => {
const index = Math.floor(pmcs.length * Math.random());
pmcs[index].BossZone = hotzone;
// console.log(pmcs[index]);
});
}

locationList[index].base.BossLocationSpawn = [
...pmcs,
Expand Down
12 changes: 7 additions & 5 deletions src/Spawning/buildScavMarksmanWaves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,13 @@ export default function buildScavMarksmanWaves(
);

// Add hotzones if exist
scavHotZones.forEach((hotzone) => {
const index = Math.floor(scavWaves.length * Math.random());
scavWaves[index].BossZone = hotzone;
// console.log(scavWaves[index].BossZone);
});
if (scavWaves.length) {
scavHotZones.forEach((hotzone) => {
const index = Math.floor(scavWaves.length * Math.random());
scavWaves[index].BossZone = hotzone;
// console.log(scavWaves[index].BossZone);
});
}

// if (map === "laboratory") console.log(snipers, scavWaves)
locationList[index].base.BossLocationSpawn = [
Expand Down

0 comments on commit 686e718

Please sign in to comment.