From 3ccdf71f26b2d37a10e7ee1cc6042cc9578e9f75 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Wed, 26 Jun 2024 21:05:54 -0400 Subject: [PATCH] buildingreplicator no longer sucks as much --- mods/buildingreplicator.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/buildingreplicator.js b/mods/buildingreplicator.js index 0d7f29fc..fa2fbedf 100644 --- a/mods/buildingreplicator.js +++ b/mods/buildingreplicator.js @@ -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;