make net states pointers

This commit is contained in:
Redo
2022-11-04 15:39:08 -06:00
parent 20b05812df
commit 9e0c196b63
6 changed files with 25 additions and 22 deletions

View File

@@ -36,11 +36,11 @@ function Port.getconnectionposition(port)
end
function Port.isrising(port)
return port.group.state==1 and (port.group.update_tick == GSim.current_tick)
return port.group.state[0]==1 and (port.group.update_tick[0] == GSim.current_tick)
end
function Port.isfalling(port)
return port.group.state==0 and (port.group.update_tick == GSim.current_tick)
return port.group.state[0]==0 and (port.group.update_tick[0] == GSim.current_tick)
end
function Port.getgate(port)