From 7608a825fa23a3922232aaefd68fedf748b5a030 Mon Sep 17 00:00:00 2001 From: felixs-alt <114471609+felixs-alt@users.noreply.github.com> Date: Wed, 27 Sep 2023 09:05:35 +0200 Subject: [PATCH] Update flipflop.js --- mods/flipflop.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/flipflop.js b/mods/flipflop.js index 216ee166..af4225f6 100644 --- a/mods/flipflop.js +++ b/mods/flipflop.js @@ -16,16 +16,16 @@ elements.flipflop = { if (typeof Output !== "undefined" && typeof Input !== "undefined") { if (Input.charge > 0.7) { if (pixel.powerstate == "true") { - Input.charge = 0 pixel.powerstate = "false" pixel.color = "#CF300D" Output.charge = 0 - } else { - Input.charge = 0 + } else if (pixel.powerstate == "true") { pixel.powerstate = "true" pixel.color = "#94CF0D" - Output.charge = 5 + Output.charge = 1 } + } else { + Output.charge = 0 } } }