background colored dye

This commit is contained in:
O-01-67 2022-05-22 19:34:15 -04:00 committed by GitHub
parent 240d2e9d8b
commit f71d7e142a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 41 additions and 0 deletions

41
mods/invisible_dye.js Normal file
View File

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