make states numbers instead of booleans
This commit is contained in:
@@ -27,16 +27,16 @@ datablock fxDtsBrickData(LogicGate_Demux1Vertical_Data){
|
||||
logicInput = "";
|
||||
logicUpdate =
|
||||
"return function(gate) " @
|
||||
" if Gate.getportstate(gate, 4) then " @
|
||||
" if Gate.getportstate(gate, 4)~=0 then " @
|
||||
" local idx = 2 + " @
|
||||
" (bool_to_int[Gate.getportstate(gate, 1)] * 1) " @
|
||||
" Gate.setportstate(gate, idx, true) " @
|
||||
" (Gate.getportstate(gate, 1) * 1) " @
|
||||
" Gate.setportstate(gate, idx, 1) " @
|
||||
" if gate.laston~=idx then " @
|
||||
" Gate.setportstate(gate, gate.laston, false) " @
|
||||
" Gate.setportstate(gate, gate.laston, 0) " @
|
||||
" gate.laston = idx " @
|
||||
" end " @
|
||||
" else " @
|
||||
" Gate.setportstate(gate, gate.laston, false) " @
|
||||
" Gate.setportstate(gate, gate.laston, 0) " @
|
||||
" end " @
|
||||
"end"
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user