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, +};