make sim global; make nonessential queues optional

This commit is contained in:
Redo0
2021-05-25 17:11:48 -05:00
parent 53e9423ab1
commit d25893566e
8 changed files with 99 additions and 78 deletions

View File

@@ -58,8 +58,8 @@ function GateDefinition.new(self, objref, name, description, init, logic, input,
return o
end
function GateDefinition.constructgate(def, objref, position, rotation, sim)
local gate = Gate.new(Gate, objref, def, sim)
function GateDefinition.constructgate(def, objref, position, rotation)
local gate = Gate.new(Gate, objref, def)
for i = 1, #def.ports do
local portd = def.ports[i]
@@ -84,7 +84,7 @@ function GateDefinition.constructgate(def, objref, position, rotation, sim)
pos[2] = x
end
Gate.addport(gate, Port.new(Port, type, dir, {position[1]+pos[1], position[2]+pos[2], position[3]+pos[3]}, portd.causeupdate, Gate.getsim(gate)))
Gate.addport(gate, Port.new(Port, type, dir, {position[1]+pos[1], position[2]+pos[2], position[3]+pos[3]}, portd.causeupdate))
end
return gate