From f71d7e142ab260f2b28f0e4bd0e0e2c3e0d4f476 Mon Sep 17 00:00:00 2001 From: O-01-67 <68935009+O-01-67@users.noreply.github.com> Date: Sun, 22 May 2022 19:34:15 -0400 Subject: [PATCH] background colored dye --- mods/invisible_dye.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 mods/invisible_dye.js diff --git a/mods/invisible_dye.js b/mods/invisible_dye.js new file mode 100644 index 00000000..54790d6f --- /dev/null +++ b/mods/invisible_dye.js @@ -0,0 +1,41 @@ +if(!settings) { + settings = {} +} + +if(!settings.bg) { + settings.bg = "#000000" +} + +elements.invisible_dye = { + color: settings.bg, + behavior: behaviors.LIQUID, + tick: function(pixel) { + var backgroundColor = hexToRGB(settings.bg); + var rgbValue = "rgb("+backgroundColor.r+","+backgroundColor.g+","+backgroundColor.b+")"; + pixel.color = rgbValue; + }, + hardness: 0.8, + breakInto: "invisible_dye_gas", + tempHigh: 110, + stateHigh: "invisible_dye_gas", + category: "special", + state: "solid", + stain: elements.dye.stain, +}; + +elements.invisible_dye_gas = { + color: settings.bg, + behavior: behaviors.GAS, + tick: function(pixel) { + var backgroundColor = hexToRGB(settings.bg); + var rgbValue = "rgb("+backgroundColor.r+","+backgroundColor.g+","+backgroundColor.b+")"; + pixel.color = rgbValue; + }, + hardness: 0.5, + breakInto: "invisible_dye_gas", + tempLow: 109, + stateLow: "invisible_dye", + category: "special", + state: "solid", + stain: elements.spray_paint.stain, +};