use get/set for parameters on ports and wires
This commit is contained in:
@@ -180,16 +180,16 @@ while 1 do
|
||||
local ports = {}
|
||||
|
||||
for a = i+9, numports*5+i+8, 5 do
|
||||
local port = {
|
||||
local portd = {
|
||||
type = tonumber(data[a]),
|
||||
position = vectotable(data[a+1]),
|
||||
direction = tonumber(data[a+2]),
|
||||
causeupdate = toboolean(data[a+3]),
|
||||
name = data[a+4],
|
||||
}
|
||||
ports[#ports+1] = port
|
||||
ports[#ports+1] = portd
|
||||
|
||||
if not port.direction then print(line) end
|
||||
if not portd.direction then print(line) end
|
||||
end
|
||||
|
||||
local definition = GateDefinition.new(GateDefitinion, objref, name, desc, init, logic, input, global, ports)
|
||||
@@ -213,7 +213,7 @@ while 1 do
|
||||
elseif data[i] == "SG" then
|
||||
local wire = Simulation.getwirebyref(sim, tonumber(data[i+1]))
|
||||
if wire ~= nil then
|
||||
Group.setstate(wire.group, toboolean(data[i+2]))
|
||||
Group.setstate(Wire.getgroup(wire), toboolean(data[i+2]))
|
||||
end
|
||||
|
||||
i = i + 2
|
||||
|
||||
Reference in New Issue
Block a user