Skip to content

Commit

Permalink
fix for validation spawner properties with some map edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Sep 20, 2024
1 parent 5d3da80 commit c4a6ed6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/app/helpers/validators/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ export function checkMapSpawners(mod: IModKit): ValidationMessageGroup[] {

mod.maps.forEach((map) => {
map.map.layers[10].objects.forEach((spawner: any) => {
if (!spawner.properties) return;

addModSpawnerCount(spawner.properties.tag as string);
addUsedSpawnerCount(spawner.properties.tag as string);

Expand Down
2 changes: 1 addition & 1 deletion src/app/helpers/validators/npc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function checkNPCUsages(mod: IModKit) {

mod.maps.forEach((map) => {
map.map.layers[10].objects.forEach((spawner: any) => {
if (spawner.properties.lairName) {
if (spawner.properties?.lairName) {
addItemCount(spawner.properties.lairName as string);
}
});
Expand Down

0 comments on commit c4a6ed6

Please sign in to comment.