make states numbers instead of booleans
This commit is contained in:
@ -23,12 +23,12 @@ datablock fxDtsBrickData(LogicGate_GateXnor5_Data){
|
||||
logicInput = "";
|
||||
logicUpdate =
|
||||
"return function(gate) " @
|
||||
" local v = true " @
|
||||
" if Gate.getportstate(gate, 1) then v = not v end " @
|
||||
" if Gate.getportstate(gate, 2) then v = not v end " @
|
||||
" if Gate.getportstate(gate, 3) then v = not v end " @
|
||||
" if Gate.getportstate(gate, 4) then v = not v end " @
|
||||
" if Gate.getportstate(gate, 5) then v = not v end " @
|
||||
" local v = 1 " @
|
||||
" if Gate.getportstate(gate, 1)~=0 then v = 1 - v end " @
|
||||
" if Gate.getportstate(gate, 2)~=0 then v = 1 - v end " @
|
||||
" if Gate.getportstate(gate, 3)~=0 then v = 1 - v end " @
|
||||
" if Gate.getportstate(gate, 4)~=0 then v = 1 - v end " @
|
||||
" if Gate.getportstate(gate, 5)~=0 then v = 1 - v end " @
|
||||
" Gate.setportstate(gate, 6, v) " @
|
||||
"end"
|
||||
;
|
||||
|
Reference in New Issue
Block a user