From 505e84d860cbb05d07f70ac99bb4eb44d75b66f7 Mon Sep 17 00:00:00 2001 From: "Laetitia (O-01-67)" <68935009+O-01-67@users.noreply.github.com> Date: Mon, 6 Mar 2023 20:00:58 -0500 Subject: [PATCH] more anti-NaN + noResistance property --- mods/doElectricity changes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/doElectricity changes.js b/mods/doElectricity changes.js index a7d0e139..9d7fc59b 100644 --- a/mods/doElectricity changes.js +++ b/mods/doElectricity changes.js @@ -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); } }