buildingreplicator no longer sucks as much

This commit is contained in:
JustAGenericUsername 2024-06-26 21:05:54 -04:00
parent a67b70d9c8
commit 3ccdf71f26
1 changed files with 4 additions and 4 deletions

View File

@ -46,13 +46,13 @@ function getRandomPixelCoordinates(pixel, offsetx, offsety, bp, keyobject) {
y = Math.floor(Math.random() * bp.length);
r = bp[y][x];
r = keyobject[r];
if (r !== undefined) {
//if (r !== undefined) {
attempts++;
}
//}
if (attempts >= maxAttempts) {
return "terminated";
}
} while (r === undefined || r === 0 || r === "0" || !isEmpty(pixel.x + x - offsetx, pixel.y + y - offsety, true));
} while (r === undefined || r === 0 || r === "0" || !isEmpty(pixel.x + x - offsetx, pixel.y + y - offsety));
return { x, y, r };
}
@ -160,7 +160,7 @@ elements.custom_bp_spawner = {
}
}
}
var customBP = []
var customBP = [[0]]
var customBPKey = {}
let bpsizeH = 15;
let bpsizeW = 15;