Update flipflop.js

This commit is contained in:
felixs-alt 2023-09-26 13:39:19 +02:00 committed by GitHub
parent a8999ba4dc
commit 0e9b52edc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -6,7 +6,6 @@ elements.flipflop = {
color: "#CF300D",
state: "solid",
category: "machines",
conduct: 1,
tick: function(pixel) {
doHeat(pixel)
doBurning(pixel)
@ -17,12 +16,12 @@ elements.flipflop = {
console.log(pixel.powerstate)
if (typeof Output !== "undefined" && typeof Input !== "undefined"){
Output.charge = 0
if (pixel.powerstate == "true" && pixel.charge > 0.2) {
if (pixel.powerstate == "true" && Input.charge > 0.2) {
pixel.powerstate = "false"
pixel.color = "#CF300D"
console.log(pixel.powerstate+"y")
Output.charge = 0
} else if (pixel.powerstate == "false" && pixel.charge > 0.2) {
} else if (pixel.powerstate == "false" && Input.charge > 0.2) {
pixel.powerstate = "true"
console.log(pixel.powerstate+"n")
pixel.color = "#94CF0D"