buildingreplicator no longer sucks as much
This commit is contained in:
parent
a67b70d9c8
commit
3ccdf71f26
|
|
@ -46,13 +46,13 @@ function getRandomPixelCoordinates(pixel, offsetx, offsety, bp, keyobject) {
|
||||||
y = Math.floor(Math.random() * bp.length);
|
y = Math.floor(Math.random() * bp.length);
|
||||||
r = bp[y][x];
|
r = bp[y][x];
|
||||||
r = keyobject[r];
|
r = keyobject[r];
|
||||||
if (r !== undefined) {
|
//if (r !== undefined) {
|
||||||
attempts++;
|
attempts++;
|
||||||
}
|
//}
|
||||||
if (attempts >= maxAttempts) {
|
if (attempts >= maxAttempts) {
|
||||||
return "terminated";
|
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 };
|
return { x, y, r };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -160,7 +160,7 @@ elements.custom_bp_spawner = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var customBP = []
|
var customBP = [[0]]
|
||||||
var customBPKey = {}
|
var customBPKey = {}
|
||||||
let bpsizeH = 15;
|
let bpsizeH = 15;
|
||||||
let bpsizeW = 15;
|
let bpsizeW = 15;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue