more anti-NaN + noResistance property

This commit is contained in:
Laetitia (O-01-67) 2023-03-06 20:00:58 -05:00 committed by GitHub
parent a90e0e5618
commit 505e84d860
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -26,8 +26,8 @@ function doElectricity(pixel) {
};
}
}
else if (elements[newPixel.element].insulate != true) { // Otherwise heat the pixel (Resistance simulation)
newPixel.temp += pixel.charge/4;
else if (elements[newPixel.element].insulate != true && !elements[newPixel.element].noResistance) { // Otherwise heat the pixel (Resistance simulation)
newPixel.temp += isNaN(pixel.charge) ? 0.25 : pixel.charge/4;
pixelTempCheck(newPixel);
}
}