Update flipflop.js
This commit is contained in:
parent
a8999ba4dc
commit
0e9b52edc5
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue