fix port info messages
This commit is contained in:
parent
968613a3fc
commit
ebc9a7f108
@ -269,7 +269,14 @@ while 1 do
|
|||||||
local def = Gate.getdefinition(gate)
|
local def = Gate.getdefinition(gate)
|
||||||
info = "\\c5" .. def.name .. "<br>"
|
info = "\\c5" .. def.name .. "<br>"
|
||||||
for i = 1, #gate.ports do
|
for i = 1, #gate.ports do
|
||||||
info = info .. (gate.ports[i].state and "\\c2" or "\\c0") .. def.ports[i].name .. (i ~= #gate.ports and " " or "")
|
local port = gate.ports[i]
|
||||||
|
local state
|
||||||
|
if port.type==PortTypes.input then
|
||||||
|
state = Gate.getportstate(gate, i)
|
||||||
|
else
|
||||||
|
state = Port.getstate(port)
|
||||||
|
end
|
||||||
|
info = info .. (state and "\\c2" or "\\c0") .. def.ports[i].name .. (i ~= #gate.ports and " " or "")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user