Update flipflop.js
This commit is contained in:
parent
132dfa2a2e
commit
7608a825fa
|
|
@ -16,16 +16,16 @@ elements.flipflop = {
|
||||||
if (typeof Output !== "undefined" && typeof Input !== "undefined") {
|
if (typeof Output !== "undefined" && typeof Input !== "undefined") {
|
||||||
if (Input.charge > 0.7) {
|
if (Input.charge > 0.7) {
|
||||||
if (pixel.powerstate == "true") {
|
if (pixel.powerstate == "true") {
|
||||||
Input.charge = 0
|
|
||||||
pixel.powerstate = "false"
|
pixel.powerstate = "false"
|
||||||
pixel.color = "#CF300D"
|
pixel.color = "#CF300D"
|
||||||
Output.charge = 0
|
Output.charge = 0
|
||||||
} else {
|
} else if (pixel.powerstate == "true") {
|
||||||
Input.charge = 0
|
|
||||||
pixel.powerstate = "true"
|
pixel.powerstate = "true"
|
||||||
pixel.color = "#94CF0D"
|
pixel.color = "#94CF0D"
|
||||||
Output.charge = 5
|
Output.charge = 1
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Output.charge = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue