human fix

This commit is contained in:
slweeb 2024-11-26 17:08:08 -05:00
parent 63cab15308
commit 9713a693f5
1 changed files with 1 additions and 23 deletions

View File

@ -397,28 +397,6 @@ runAfterLoad(function(){
}
}
}
else if (currentElement === "shock") {
if (!isEmpty(x,y,true)) {
// One loop that repeats 5 times if shiftDown else 1 time
for (var j = 0; j < (shiftDown ? 5 : 1); j++) {
var pixel = pixelMap[x][y];
var con = elements[pixel.element].conduct;
if (con == undefined) {continue}
if (Math.random() < con) { // If random number is less than conductivity
if (!pixel.charge && !pixel.chargeCD) {
pixel.charge = 1;
if (elements[pixel.element].colorOn) {
pixel.color = pixelColorPick(pixel);
}
}
}
else if (elements[pixel.element].insulate != true) { // Otherwise heat the pixel (Resistance simulation)
pixel.temp += 0.25;
pixelTempCheck(pixel);
}
}
}
}
else if (elements[currentElement].tool && !(elements[currentElement].canPlace && isEmpty(x,y))) {
// run the tool function on the pixel
if (!isEmpty(x,y,true)) {
@ -434,7 +412,7 @@ runAfterLoad(function(){
if (survivalCount(currentElement) < 1 && elements[currentElement].category !== "tools") {
return;
}
currentPixels.push(new Pixel(x, y, currentElement));
createPixel(currentElement,x,y);
if (elements[currentElement].customColor || elements[currentElement].singleColor) {
pixelMap[x][y].color = pixelColorPick(currentElement,currentColor);
}