From 8604e260f4ad9d6068977b8f83b00001a245c2d6 Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Tue, 25 Jan 2022 21:49:45 -0500 Subject: [PATCH] tick: test 5x5 heater --- mods/randomness.js | 108 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/mods/randomness.js b/mods/randomness.js index 943d4990..20bfc94d 100644 --- a/mods/randomness.js +++ b/mods/randomness.js @@ -369,6 +369,114 @@ elements.vaporized_estradiol = { stateLow: "molten_estradiol", }, +elements.superduperheater = { + color: "#ff0000", + tick: function(pixel) { + if (!isEmpty(pixel.x-2,pixel.y-2) && !outOfBounds(pixel.x-2,pixel.y-2)) { + pixelMap[pixel.x-2][pixel.y-2].temp += 10 + } + + if (!isEmpty(pixel.x-2,pixel.y-1) && !outOfBounds(pixel.x-2,pixel.y-1)) { + pixelMap[pixel.x-2][pixel.y-1].temp += 10 + } + + if (!isEmpty(pixel.x-2,pixel.y+0) && !outOfBounds(pixel.x-2,pixel.y+0)) { + pixelMap[pixel.x-2][pixel.y+0].temp += 10 + } + + if (!isEmpty(pixel.x-2,pixel.y+1) && !outOfBounds(pixel.x-2,pixel.y+1)) { + pixelMap[pixel.x-2][pixel.y+1].temp += 10 + } + + if (!isEmpty(pixel.x-2,pixel.y+2) && !outOfBounds(pixel.x-2,pixel.y+2)) { + pixelMap[pixel.x-2][pixel.y+2].temp += 10 + } + + if (!isEmpty(pixel.x-1,pixel.y-2) && !outOfBounds(pixel.x-1,pixel.y-2)) { + pixelMap[pixel.x-1][pixel.y-2].temp += 10 + } + + if (!isEmpty(pixel.x-1,pixel.y-1) && !outOfBounds(pixel.x-1,pixel.y-1)) { + pixelMap[pixel.x-1][pixel.y-1].temp += 10 + } + + if (!isEmpty(pixel.x-1,pixel.y+0) && !outOfBounds(pixel.x-1,pixel.y+0)) { + pixelMap[pixel.x-1][pixel.y+0].temp += 10 + } + + if (!isEmpty(pixel.x-1,pixel.y+1) && !outOfBounds(pixel.x-1,pixel.y+1)) { + pixelMap[pixel.x-1][pixel.y+1].temp += 10 + } + + if (!isEmpty(pixel.x-1,pixel.y+2) && !outOfBounds(pixel.x-1,pixel.y+2)) { + pixelMap[pixel.x-1][pixel.y+2].temp += 10 + } + + if (!isEmpty(pixel.x+0,pixel.y-2) && !outOfBounds(pixel.x+0,pixel.y-2)) { + pixelMap[pixel.x+0][pixel.y-2].temp += 10 + } + + if (!isEmpty(pixel.x+0,pixel.y-1) && !outOfBounds(pixel.x+0,pixel.y-1)) { + pixelMap[pixel.x+0][pixel.y-1].temp += 10 + } + + /*if (!isEmpty(pixel.x+0,pixel.y+0) && !outOfBounds(pixel.x+0,pixel.y+0)) { + pixelMap[pixel.x+0][pixel.y+0].temp += 10 + }*/ + + if (!isEmpty(pixel.x+0,pixel.y+1) && !outOfBounds(pixel.x+0,pixel.y+1)) { + pixelMap[pixel.x+0][pixel.y+1].temp += 10 + } + + if (!isEmpty(pixel.x+0,pixel.y+2) && !outOfBounds(pixel.x+0,pixel.y+2)) { + pixelMap[pixel.x+0][pixel.y+2].temp += 10 + } + + if (!isEmpty(pixel.x+1,pixel.y-2) && !outOfBounds(pixel.x+1,pixel.y-2)) { + pixelMap[pixel.x+1][pixel.y-2].temp += 10 + } + + if (!isEmpty(pixel.x+1,pixel.y-1) && !outOfBounds(pixel.x+1,pixel.y-1)) { + pixelMap[pixel.x+1][pixel.y-1].temp += 10 + } + + if (!isEmpty(pixel.x+1,pixel.y+0) && !outOfBounds(pixel.x+1,pixel.y+0)) { + pixelMap[pixel.x+1][pixel.y+0].temp += 10 + } + + if (!isEmpty(pixel.x+1,pixel.y+1) && !outOfBounds(pixel.x+1,pixel.y+1)) { + pixelMap[pixel.x+1][pixel.y+1].temp += 10 + } + + if (!isEmpty(pixel.x+1,pixel.y+2) && !outOfBounds(pixel.x+1,pixel.y+2)) { + pixelMap[pixel.x+1][pixel.y+2].temp += 10 + } + + if (!isEmpty(pixel.x+2,pixel.y-2) && !outOfBounds(pixel.x+2,pixel.y-2)) { + pixelMap[pixel.x+2][pixel.y-2].temp += 10 + } + + if (!isEmpty(pixel.x+2,pixel.y-1) && !outOfBounds(pixel.x+2,pixel.y-1)) { + pixelMap[pixel.x+2][pixel.y-1].temp += 10 + } + + if (!isEmpty(pixel.x+2,pixel.y+0) && !outOfBounds(pixel.x+2,pixel.y+0)) { + pixelMap[pixel.x+2][pixel.y+0].temp += 10 + } + + if (!isEmpty(pixel.x+2,pixel.y+1) && !outOfBounds(pixel.x+2,pixel.y+1)) { + pixelMap[pixel.x+2][pixel.y+1].temp += 10 + } + + if (!isEmpty(pixel.x+2,pixel.y+2) && !outOfBounds(pixel.x+2,pixel.y+2)) { + pixelMap[pixel.x+2][pixel.y+2].temp += 10 + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + runAfterLoad(function() { elements.tungstensteel.behavior = [ "XX|DL:"+eLists.FAIRY+"|XX",