From 2a423dd4ae8c9a618c5813ab9d8310cbdf676e6a Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Tue, 25 Jan 2022 19:43:09 -0500 Subject: [PATCH 1/9] added estradiol... ...buffed cluster nuke, added warp bomb, nerfed warp --- mods/randomness.js | 55 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/mods/randomness.js b/mods/randomness.js index 67f4ca53..943d4990 100644 --- a/mods/randomness.js +++ b/mods/randomness.js @@ -5,9 +5,9 @@ elements.warp = { name: "warp", color: "#111111", behavior: [ - "M1%20 AND SW%20|M1%20 AND SW%20|M1%20 AND SW%20", - "M1%20 AND SW%20|DL%0.5|M1%20 AND SW%20", - "M1%20 AND SW%20|M1%20 AND SW%20|M1%20 AND SW%20", + "M1%30 AND SW%30|M1%30 AND SW%30|M1%30 AND SW%30", + "M1%30 AND SW%30|DL%1|M1%30 AND SW%30", + "M1%30 AND SW%30|M1%30 AND SW%30|M1%30 AND SW%30", ], category: "special", state: "gases", @@ -306,7 +306,7 @@ elements.lb1 = { } elements.unnamed_substance_bomb = { - name: "unnamed_bomb", + name: "unnamed bomb", color: "#cdad52", behavior: [ "XX|XX|XX", @@ -316,20 +316,59 @@ elements.unnamed_substance_bomb = { category: "weapons", state: "solid", density: 1300, - }, +}, + +elements.warp_bomb = { + name: "warp bomb", + color: "#422e4a", + behavior: [ + "XX|XX|XX", + "XX|CC:#5b3a69,#382740,#400e61|XX", + "M2|M1 AND EX:15>warp|M2", + ], + category: "weapons", + state: "solid", + density: 1300, +}, elements.cluster_nuke = { color: "#e3f636", behavior: [ - "XX|EX:60>plasma,plasma,nuke,radiation,rad_steam,radiation,rad_steam|XX", - "XX|XX|XX", - "M2|M1 AND EX:60>plasma,plasma,plasma,plasma,radiation,rad_steam,nuke,radiation,rad_steam|M2", + "CR:radiation%5|EX:90>plasma,plasma,plasma,nuke,nuke,nuke,radiation,radiation,radiation,rad_steam,rad_steam,radiation,rad_steam AND CR:radiation%5|CR:radiation%5", + "CR:radiation%5|XX|CR:radiation%5", + "M2 AND CR:radiation%5|M1 AND EX:90>plasma,plasma,plasma,nuke,nuke,nuke,radiation,radiation,radiation,rad_steam,rad_steam,radiation,rad_steam AND CR:radiation%5|M2 AND CR:radiation%5", ], category: "weapons", state: "solid", density: 1500, }, +elements.estradiol = { + color: "#eeeeee", + behavior: behaviors.POWDER, + state: "solid", + category: "solids", + density: 1200, + tempHigh: 173, + category: "powders", +}, + +elements.molten_estradiol = { + tempHigh: 446, + stateHigh: "vaporized_estradiol", +}, + +elements.vaporized_estradiol = { + color: ["#ffbf60","#ffdc60","#ff9d60"], + behavior: behaviors.GAS, + state: "gas", + category: "gases", + hidden: true, + density: 972, + tempLow: 446, + stateLow: "molten_estradiol", +}, + runAfterLoad(function() { elements.tungstensteel.behavior = [ "XX|DL:"+eLists.FAIRY+"|XX", 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 2/9] 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", From 1a332cc8d922f6ed893a3fdbe8df279827811e09 Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Wed, 26 Jan 2022 07:48:48 -0500 Subject: [PATCH 3/9] shortened and buffed superduperheater --- mods/randomness.js | 112 ++++++--------------------------------------- 1 file changed, 15 insertions(+), 97 deletions(-) diff --git a/mods/randomness.js b/mods/randomness.js index 20bfc94d..2be6a424 100644 --- a/mods/randomness.js +++ b/mods/randomness.js @@ -372,105 +372,23 @@ elements.vaporized_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 + for (let i = -4; i < 4; i++) { + for (let j = -4; j < 4; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp += 15 + } + } } + }, + category:"machines", + insulate:true, + state: "solid", +}, - 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 - } +elements.temp222 = { + color: "#222222", + tick: function(pixel) { + pixel.color = "rgb(" + pixel.temp % 256 + ",0,0)" }, category:"machines", insulate:true, From f8a0d95f733f7f9f76d2cb9eb27eeb87ddd05510 Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Wed, 26 Jan 2022 08:03:12 -0500 Subject: [PATCH 4/9] i left a testing thing in --- mods/randomness.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/randomness.js b/mods/randomness.js index 2be6a424..500a8987 100644 --- a/mods/randomness.js +++ b/mods/randomness.js @@ -385,14 +385,16 @@ elements.superduperheater = { state: "solid", }, -elements.temp222 = { - color: "#222222", +elements.tempinccheck = { + color: "#000000", tick: function(pixel) { pixel.color = "rgb(" + pixel.temp % 256 + ",0,0)" }, category:"machines", insulate:true, state: "solid", + hidden: true, + extraInfo: "Debug tool
Changes black to red with increasing heat", }, runAfterLoad(function() { From 0f6d30fe82f9e35607f9ab292e46e8f309fb2738 Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Wed, 26 Jan 2022 08:16:30 -0500 Subject: [PATCH 5/9] added superdupercooler and fixed off-by-one errors --- mods/randomness.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/mods/randomness.js b/mods/randomness.js index 500a8987..048a55ee 100644 --- a/mods/randomness.js +++ b/mods/randomness.js @@ -372,8 +372,8 @@ elements.vaporized_estradiol = { elements.superduperheater = { color: "#ff0000", tick: function(pixel) { - for (let i = -4; i < 4; i++) { - for (let j = -4; j < 4; j++) { + for (let i = -4; i < 5; i++) { + for (let j = -4; j < 5; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { pixelMap[pixel.x+j][pixel.y+i].temp += 15 } @@ -385,6 +385,22 @@ elements.superduperheater = { state: "solid", }, +elements.superdupercooler = { + color: "#0000ff", + tick: function(pixel) { + for (let i = -4; i < 5; i++) { + for (let j = -4; j < 5; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp < -258 ? pixelMap[pixel.x+j][pixel.y+i].temp = -273 : pixelMap[pixel.x+j][pixel.y+i].temp -= 15 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + elements.tempinccheck = { color: "#000000", tick: function(pixel) { From 12c854a5fe4a89b0f48b059d7d58bcdfbfd62fe7 Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Wed, 26 Jan 2022 08:29:33 -0500 Subject: [PATCH 6/9] more op temperature changers because yes --- mods/randomness.js | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/mods/randomness.js b/mods/randomness.js index 048a55ee..f0f97664 100644 --- a/mods/randomness.js +++ b/mods/randomness.js @@ -401,6 +401,70 @@ elements.superdupercooler = { state: "solid", }, +elements.superduperwarmer = { + color: "#00ff00", + tick: function(pixel) { + for (let i = -4; i < 5; i++) { + for (let j = -4; j < 5; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp = 20 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + +elements.supersuperduperheater = { + color: "#ff2200", + tick: function(pixel) { + for (let i = -9; i < 10; i++) { + for (let j = -9; j < 10; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp += 25 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + +elements.supersuperdupercooler = { + color: "#0022ff", + tick: function(pixel) { + for (let i = -9; i < 10; i++) { + for (let j = -9; j < 10; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp < -248 ? pixelMap[pixel.x+j][pixel.y+i].temp = -273 : pixelMap[pixel.x+j][pixel.y+i].temp -= 25 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + +elements.supersuperduperwarmer = { + color: "#22ff22", + tick: function(pixel) { + for (let i = -9; i < 10; i++) { + for (let j = -9; j < 10; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp = 20 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + elements.tempinccheck = { color: "#000000", tick: function(pixel) { From f357f1003789ee9e02f8174c8b3eecced6d4e648 Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Wed, 26 Jan 2022 10:36:44 -0500 Subject: [PATCH 7/9] split tick stuff off into a separate mod 1 of 2 --- mods/randomness_but_tick.js | 247 ++++++++++++++++++++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 mods/randomness_but_tick.js diff --git a/mods/randomness_but_tick.js b/mods/randomness_but_tick.js new file mode 100644 index 00000000..502ae5ea --- /dev/null +++ b/mods/randomness_but_tick.js @@ -0,0 +1,247 @@ +elements.superduperheater = { + color: "#ff0000", + tick: function(pixel) { + for (let i = -4; i < 5; i++) { + for (let j = -4; j < 5; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp += 15 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + +elements.superdupercooler = { + color: "#0000ff", + tick: function(pixel) { + for (let i = -4; i < 5; i++) { + for (let j = -4; j < 5; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp < -258 ? pixelMap[pixel.x+j][pixel.y+i].temp = -273 : pixelMap[pixel.x+j][pixel.y+i].temp -= 15 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + +elements.superduperwarmer = { + color: "#00ff00", + tick: function(pixel) { + for (let i = -4; i < 5; i++) { + for (let j = -4; j < 5; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp = 20 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + +elements.supersuperduperheater = { + color: "#ff2200", + tick: function(pixel) { + for (let i = -9; i < 10; i++) { + for (let j = -9; j < 10; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp += 25 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + +elements.supersuperdupercooler = { + color: "#0022ff", + tick: function(pixel) { + for (let i = -9; i < 10; i++) { + for (let j = -9; j < 10; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp < -248 ? pixelMap[pixel.x+j][pixel.y+i].temp = -273 : pixelMap[pixel.x+j][pixel.y+i].temp -= 25 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + +elements.supersuperduperwarmer = { + color: "#22ff22", + tick: function(pixel) { + for (let i = -9; i < 10; i++) { + for (let j = -9; j < 10; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp = 20 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +}, + +elements.globalheater = { + color: "#ff6666", + tick: function(pixel) { + for (var i = 1; i < width; i++) { + for (var j = 1; j < height; j++) { + if (!isEmpty(i,j)) { + pixelMap[i][j].temp += 1 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", + hidden: true, +}, + +elements.globalcooler = { + color: "#6666ff", + tick: function(pixel) { + for (var i = 1; i < width; i++) { + for (var j = 1; j < height; j++) { + if (!isEmpty(i,j)) { + pixelMap[i][j].temp <= -272 ? pixelMap[i][j].temp = -273 : pixelMap[i][j].temp -= 1 + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", + hidden: true, +}, + +elements.globalwarmer = { + color: "#66ff66", + tick: function(pixel) { + for (var i = 1; i < width; i++) { + for (var j = 1; j < height; j++) { + if (!isEmpty(i,j)) { + pixelMap[i][j].temp = 20 + } + } + } + }, + category: "machines", + insulate: true, + state: "solid", + hidden: true, +}, + +elements.sencc = { //same element neighbor count check + color: "#000000", + uwu: 0, + tick: function(pixel) { + pixel.uwu = 0 + for (let i = -1; i < 2; i++) { + for (let j = -1; j < 2; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { + pixel.uwu += 1 + } + } + } + } + pixel.uwu -= 1 + if(pixel.uwu == undefined || pixel.uwu == null || isNaN(pixel.uwu)) { + pixel.color = "rgb(127,127,127)" + } else { + pixel.color = "rgb(" + (255/8)*pixel.uwu + ",0,0)" + } + }, + category: "machines", + insulate: true, + state: "solid", + hidden: true, +}, + +elements.sencc2 = { //same element neighbor count check + color: "#000000", + uwu: 0, + tick: function(pixel) { + pixel.uwu = 0 + for (let i = -2; i < 3; i++) { + for (let j = -2; j < 3; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { + pixel.uwu += 1 + } + } + } + } + pixel.uwu -= 1 + if(pixel.uwu == undefined || pixel.uwu == null || isNaN(pixel.uwu)) { + pixel.color = "rgb(127,127,127)" + } else { + pixel.color = "rgb(" + (255/24)*pixel.uwu + ",0,0)" + } + }, + category: "machines", + insulate: true, + state: "solid", + hidden: true, +}, + +elements.sencc2b = { //same element neighbor count check + color: "#000000", + uwu: 0, + owo: 0, + tick: function(pixel) { + pixel.uwu = 0 + pixel.owo = 0 + for (let i = -2; i < 3; i++) { + for (let j = -2; j < 3; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { + if(pixel.uwu < 8) { + pixel.uwu += 1 + } else { + pixel.owo += 1 + } + } + } + } + } + pixel.owo -= 1 + if(pixel.uwu == undefined || pixel.uwu == null || isNaN(pixel.uwu) || pixel.owo == undefined || pixel.owo == null || isNaN(pixel.owo)) { + pixel.color = "rgb(127,127,127)" + } else { + pixel.color = "rgb(" + (255/8)*pixel.uwu + "," + (255/16)*pixel.owo + ",0)" + } + }, + category: "machines", + insulate: true, + state: "solid", + hidden: true, +}, + + + elements.tempinccheck = { + color: "#000000", + tick: function(pixel) { + pixel.color = "rgb(" + pixel.temp % 256 + ",0,0)" + }, + category:"machines", + insulate:true, + state: "solid", + hidden: true, + extraInfo: "Debug tool
Changes black to red with increasing heat", +}, + From 5bba787e0face14e19b6be6a013f79b73cdd7580 Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Wed, 26 Jan 2022 10:38:31 -0500 Subject: [PATCH 8/9] split tick stuff off into a separate mod 2 of 2 --- mods/randomness.js | 109 +-------------------------------------------- 1 file changed, 1 insertion(+), 108 deletions(-) diff --git a/mods/randomness.js b/mods/randomness.js index f0f97664..8fe4c944 100644 --- a/mods/randomness.js +++ b/mods/randomness.js @@ -369,114 +369,6 @@ elements.vaporized_estradiol = { stateLow: "molten_estradiol", }, -elements.superduperheater = { - color: "#ff0000", - tick: function(pixel) { - for (let i = -4; i < 5; i++) { - for (let j = -4; j < 5; j++) { - if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { - pixelMap[pixel.x+j][pixel.y+i].temp += 15 - } - } - } - }, - category:"machines", - insulate:true, - state: "solid", -}, - -elements.superdupercooler = { - color: "#0000ff", - tick: function(pixel) { - for (let i = -4; i < 5; i++) { - for (let j = -4; j < 5; j++) { - if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { - pixelMap[pixel.x+j][pixel.y+i].temp < -258 ? pixelMap[pixel.x+j][pixel.y+i].temp = -273 : pixelMap[pixel.x+j][pixel.y+i].temp -= 15 - } - } - } - }, - category:"machines", - insulate:true, - state: "solid", -}, - -elements.superduperwarmer = { - color: "#00ff00", - tick: function(pixel) { - for (let i = -4; i < 5; i++) { - for (let j = -4; j < 5; j++) { - if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { - pixelMap[pixel.x+j][pixel.y+i].temp = 20 - } - } - } - }, - category:"machines", - insulate:true, - state: "solid", -}, - -elements.supersuperduperheater = { - color: "#ff2200", - tick: function(pixel) { - for (let i = -9; i < 10; i++) { - for (let j = -9; j < 10; j++) { - if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { - pixelMap[pixel.x+j][pixel.y+i].temp += 25 - } - } - } - }, - category:"machines", - insulate:true, - state: "solid", -}, - -elements.supersuperdupercooler = { - color: "#0022ff", - tick: function(pixel) { - for (let i = -9; i < 10; i++) { - for (let j = -9; j < 10; j++) { - if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { - pixelMap[pixel.x+j][pixel.y+i].temp < -248 ? pixelMap[pixel.x+j][pixel.y+i].temp = -273 : pixelMap[pixel.x+j][pixel.y+i].temp -= 25 - } - } - } - }, - category:"machines", - insulate:true, - state: "solid", -}, - -elements.supersuperduperwarmer = { - color: "#22ff22", - tick: function(pixel) { - for (let i = -9; i < 10; i++) { - for (let j = -9; j < 10; j++) { - if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { - pixelMap[pixel.x+j][pixel.y+i].temp = 20 - } - } - } - }, - category:"machines", - insulate:true, - state: "solid", -}, - -elements.tempinccheck = { - color: "#000000", - tick: function(pixel) { - pixel.color = "rgb(" + pixel.temp % 256 + ",0,0)" - }, - category:"machines", - insulate:true, - state: "solid", - hidden: true, - extraInfo: "Debug tool
Changes black to red with increasing heat", -}, - runAfterLoad(function() { elements.tungstensteel.behavior = [ "XX|DL:"+eLists.FAIRY+"|XX", @@ -489,3 +381,4 @@ runAfterLoad(function() { "M1|DL:"+eLists.FAIRY+"|M1", ] }); +//dummy edit? From 99f85ec40afd5cd5cb5282ff98448b533db451ba Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Wed, 26 Jan 2022 10:55:38 -0500 Subject: [PATCH 9/9] todo --- mods/randomness_but_tick.js | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/mods/randomness_but_tick.js b/mods/randomness_but_tick.js index 502ae5ea..27b9809b 100644 --- a/mods/randomness_but_tick.js +++ b/mods/randomness_but_tick.js @@ -232,7 +232,42 @@ elements.sencc2b = { //same element neighbor count check hidden: true, }, - +/*elements.superdupersuperduperheater = { + color: "#ff7f00", + uwu: 0, + tick: function(pixel) { + tempInc = 40 + pixel.uwu = 0 + range = 13 + for (let i = -9; i < 10; i++) { + for (let j = -8; j < 9; j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { + pixel.uwu += 1 + } + } + } + } + pixel.uwu -= 1 + if(pixel.uwu == undefined || pixel.uwu == null || isNaN(pixel.uwu)) { + pixel.uwu = 0 + } else { + tempInc += (pixel.uwu*15) + range += (((pixel.uwu+2)/20).toFixed(0)) + } + for (let i = (-1*range); i < (range + 1); i++) { + for (let j = (-1*range); j < (range + 1); j++) { + if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { + pixelMap[pixel.x+j][pixel.y+i].temp += tempInc + } + } + } + }, + category:"machines", + insulate:true, + state: "solid", +},*/ + elements.tempinccheck = { color: "#000000", tick: function(pixel) {