Skip to content

Commit

Permalink
alpha 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewgdewar committed Feb 12, 2025
1 parent 9888949 commit cd34f3c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "MOAR",
"version": "3.0.1-alpha-6",
"version": "3.0.1-alpha-7",
"main": "src/mod.js",
"license": "MIT",
"author": "DewardianDev",
Expand Down
2 changes: 1 addition & 1 deletion src/SpawnZoneChanges/setupSpawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const setupSpawns = (container: DependencyContainer) => {
? {
...point,
Categories: ["Player"],
BotZoneName: point?.BotZoneName ? point.BotZoneName : "",
BotZoneName: "",
CorePointId: 0,
Sides: ["Pmc"],
}
Expand Down
3 changes: 2 additions & 1 deletion src/Spawning/spawnZoneUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export function cleanClosest(
// }
}

function uuidv4() {
export function uuidv4() {
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) =>
(
+c ^
Expand Down Expand Up @@ -315,6 +315,7 @@ export const AddCustomPlayerSpawnPoints = (
Radius: 20,
},
},
isCustom: true,
CorePointId: 0,
DelayToCanSpawnSec: 4,
Id: uuidv4(),
Expand Down
14 changes: 8 additions & 6 deletions src/Spawning/updateSpawnLocations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { globalValues } from "../GlobalValues";
import getSortedSpawnPointList, {
getClosestZone,
getDistance,
uuidv4,
} from "./spawnZoneUtils";

export default function updateSpawnLocations(
Expand Down Expand Up @@ -41,6 +42,7 @@ export default function updateSpawnLocations(
) {
possibleSpawnList.push({
...point,
Id: uuidv4(),
Categories: ["Player"],
BotZoneName: "",
CorePointId: 0,
Expand All @@ -67,16 +69,16 @@ export default function updateSpawnLocations(

const isGZ = map.includes("gz");

const newPMCSpawns = canBeConverted.map((point) => ({
const newPMCSpawns = canBeConverted.filter(({ isCustom }: any) => !isCustom).map((point) => ({
...point,
BotZoneName: isGZ
? "ZoneSandbox"
: getClosestZone(
mapSpawns,
point.Position.x,
point.Position.y,
point.Position.z
),
mapSpawns,
point.Position.x,
point.Position.y,
point.Position.z
),
Categories: ["Coop", Math.random() ? "Group" : "Opposite"],
Sides: ["Pmc"],
CorePointId: 0,
Expand Down

0 comments on commit cd34f3c

Please sign in to comment.