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 1/3] 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; From d2e10334e1545eefcc3e987b5c4dfbbe67ad93cc Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:00:34 -0400 Subject: [PATCH 2/3] piston --- mods/nousersthings.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mods/nousersthings.js b/mods/nousersthings.js index 3b4fd455..315afd65 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -3117,6 +3117,8 @@ elements.piston_ray_emitter = { } let pistonStart = 0 let pistonEnd = 0 +let pistonDistance = 1 +let pistonCooldown = 10 elements.specific_piston_ray_emitter = { color: "#517597", behavior: behaviors.WALL, @@ -3130,12 +3132,18 @@ elements.specific_piston_ray_emitter = { pistonStart = ans2 var ans3 = parseInt(prompt("How offset should the end of the push/pulling be?", "20")) pistonEnd = ans3 + var ans4 = parseInt(prompt("How far should it push the pixels each charge?", "1")) + pistonDistance = ans4 + var ans5 = parseInt(prompt("How many ticks should it wait to be charged again?", "6")) + pistonCooldown = ans5 }, tick: function(pixel){ if (pixelTicks == pixel.start){ pixel.pullOrPush = pullOrPush pixel.pistonStart = pistonStart pixel.pistonEnd = pistonEnd + pixel.pistonDistance = pistonDistance + pixel.pistonCooldown = pistonCooldown } if (!pixel.cooldown){pixel.cooldown = 0} if (pixel.cooldown < 1){ @@ -3145,10 +3153,11 @@ elements.specific_piston_ray_emitter = { var y = pixel.y+coord[1]; if (!isEmpty(x,y, true)){ if (pixelMap[x][y].charge && (pixelMap[x][y].element == "wire" || pixelMap[x][y].element == "insulated_wire")){ - pixel.cooldown = 6 + for (let r = 0; r < pixel.pistonDistance; r++){ + pixel.cooldown = pixel.pistonCooldown var dir = [0-squareCoords[i][0], 0-squareCoords[i][1]] - var startx = pixel.x+(dir[0]*pixel.pistonStart) - var starty = pixel.y+(dir[1]*pixel.pistonStart) + var startx = pixel.x+(dir[0]*(pixel.pistonStart+1)) + var starty = pixel.y+(dir[1]*(pixel.pistonStart+1)) var magnitude = pixel.pistonEnd var endx = startx+(magnitude*dir[0]) var endy = starty+(magnitude*dir[1]) @@ -3168,7 +3177,7 @@ elements.specific_piston_ray_emitter = { } pCoord[0] = lx; pCoord[1] = ly; - } + }} } } }} else {pixel.cooldown -= 1} From e9a64f7974fc90db204a32bfe4bb57e07680d9c0 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Fri, 28 Jun 2024 22:48:35 -0400 Subject: [PATCH 3/3] asdaaaaaaaaaaaaaaa --- mods/nousersthings.js | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/nousersthings.js b/mods/nousersthings.js index 315afd65..a52250b5 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -2835,6 +2835,7 @@ elements.specific_ray_emitter = { var rayans = prompt("Please input the desired element of this ray emitter",(rayElement||undefined)); if (!rayans) { return } rayElement = mostSimilarElement(rayans); + if (rayElement != "ray"){rainbowMode = false} var rayans2 = prompt("Should the ray be stopped by walls? Write true or false.",(rayStoppedByWalls||false)); if (rayans2 == "false"){rayStoppedByWalls = false} else {rayStoppedByWalls = true} var rayans3 = prompt("How much should the beginning of the ray be offset from the emitter?", (specificRayStart||0));