From 403ebbb15cfbdc24ee1092b5f2819f5890458b62 Mon Sep 17 00:00:00 2001 From: guzzo86 <126430018+guzzo86@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:16:36 -0400 Subject: [PATCH] Create customtemptools.js --- mods/customtemptools.js | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 mods/customtemptools.js diff --git a/mods/customtemptools.js b/mods/customtemptools.js new file mode 100644 index 00000000..00dbcb8f --- /dev/null +++ b/mods/customtemptools.js @@ -0,0 +1,50 @@ +var ct = 100 + +elements.customtemp = { + color: ["#FF0000", "#FF6600", "#FFCC00", "#FFFF00", "#CCFF00", "#66FF00", "#00FF00", "#00FF66", "#00FFCC", "#00FFFF"], + onSelect: function() { + var answer4 = parseInt(prompt("Please input the desired temperature to reach.",(ct||undefined))); + if (!answer4) { return } + ct = answer4; + if (isNaN(answer4)) { + ct = 100 + } + }, + tool: function(pixel) { + pixel.temp = ct, + pixelTempCheck(pixel) + }, + category: "tools", +}; +elements.customheat = { + color: ["#FF0000", "#FFFFFF", "#FF0000"], + onSelect: function() { + var answer4 = parseInt(prompt("Please input the desired temperature increase per tick. (In celsius)",(ct|undefined))); + if (!answer4) { return } + ct = answer4; + if (isNaN(answer4)) { + ct = 100 + } + }, + tool: function(pixel) { + pixel.temp = pixel.temp + ct, + pixelTempCheck(pixel) + }, + category: "tools", +}; +elements.customcool = { + color: ["#0000FF", "#FFFFFF", "#0000FF"], + onSelect: function() { + var answer4 = parseInt(prompt("Please input the desired temperature decrease per tick. (In celsius)",(cc|undefined))); + if (!answer4) { return } + ct = answer4; + if (isNaN(answer4)) { + ct = 100 + } + }, + tool: function(pixel) { + pixel.temp = pixel.temp - ct, + pixelTempCheck(pixel) + }, + category: "tools", +};