Tried fixing fatal color bug

and removed gravity tools because another mod adds them
This commit is contained in:
Lily-129 2022-05-01 18:00:23 -04:00 committed by GitHub
parent ad38d80763
commit cf8ed603b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 74 deletions

View File

@ -1,5 +1,5 @@
elements.igniter = {
color: elements.fire.color,
elements.burn = {
color: ["#FF6B21", "#FFA600", "#FF4000"],
tool: function(pixel) {
pixel.burnStart = pixelTicks;
pixel.burning = true;
@ -8,81 +8,18 @@ elements.igniter = {
excludeRandom: true,
};
elements.extinguisher = {
color: "#bad1e3",
tool: function(pixel) {
if(pixel.burnStart) { delete pixel.burnStart }
pixel.burning = false;
},
category: "tools",
excludeRandom: true,
};
elements.cursed_shock = {
color: ["#ffff00", "#00ff00", "#ffff00", "#00ff00", "#ffff00", "#00ff00", "#ffff00", "#00ff00"],
tool: function(pixel) {
var con = elements[pixel.element].conduct;
if (con == undefined) {con = 0}
if (Math.random() < con || con == 0) { // If random number is less than conductivity, or anyway
if (!pixel.charge && !pixel.chargeCD) {
pixel.charge = 1;
if (elements[pixel.element].colorOn) {
pixel.color = pixelColorPick(pixel);
}
}
}
if(Math.random() > con) {
if (elements[pixel.element].insulate != true) { // Otherwise heat the pixel (Resistance simulation)
pixel.temp += 0.25;
pixelTempCheck(pixel);
}
}
},
category: "tools",
excludeRandom: true,
};
elements.extinguisher = {
color: "#bad1e3",
tool: function(pixel) {
if(pixel.burnStart) { delete pixel.burnStart }
pixel.burning = false;
},
category: "tools",
excludeRandom: true,
};
elements.anti_gravity = {
color: [elements.dirt.color[1],elements.dirt.color[1],elements.oxygen.color,elements.oxygen.color],
tool: function(pixel) {
pixel.r = 2;
},
category: "tools",
excludeRandom: true,
};
elements.normal_gravity = {
color: [elements.oxygen.color,elements.oxygen.color,elements.dirt.color[1],elements.dirt.color[1]],
tool: function(pixel) {
pixel.r = 0;
},
category: "tools",
excludeRandom: true,
};
elements.rg1 = {
color: [elements.dirt.color[14],elements.dirt.color[14],elements.liquid_oxygen.color,elements.liquid_oxygen.color],
tool: function(pixel) {
pixel.r = 1;
},
category: "tools",
excludeRandom: true,
};
elements.rg3 = {
color: [elements.liquid_oxygen.color,elements.liquid_oxygen.color,elements.dirt.color[14],elements.dirt.color[14]],
tool: function(pixel) {
pixel.r = 3;
if(pixel.chargeCD) {
delete pixel.chargeCD;
};
if (!pixel.charge) {
pixel.charge = 1;
if (elements[pixel.element].colorOn) {
pixel.color = pixelColorPick(pixel);
};
};
},
category: "tools",
excludeRandom: true,