From 53b47488de0112b99505dd578c82d4a2998ce79d Mon Sep 17 00:00:00 2001 From: felixs-alt <114471609+felixs-alt@users.noreply.github.com> Date: Tue, 26 Sep 2023 13:15:54 +0200 Subject: [PATCH] Update flipflop.js --- mods/flipflop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/flipflop.js b/mods/flipflop.js index f111e2d8..a4a93ed6 100644 --- a/mods/flipflop.js +++ b/mods/flipflop.js @@ -14,11 +14,11 @@ elements.flipflop = { let Input = pixelMap[pixel.x-1][pixel.y] if (typeof Output !== "undefined" && typeof Input !== "undefined"){ Output.charge = 0 - if (pixel.powerstate == "true" && Input.charge > 0.2) { + if (pixel.powerstate == "true" && pixel.charge > 0.2) { pixel.powerstate = "false" pixel.color = "#CF300D" Output.charge = 0 - } else if (pixel.powerstate == "false" && Input.charge > 0.2) { + } else if (pixel.powerstate == "false" && pixel.charge > 0.2) { pixel.powerstate = "true" pixel.color = "#94CF0D" Output.charge = 5