make simulation non-global
This commit is contained in:
@@ -58,8 +58,8 @@ function GateDefinition.new(self, objref, name, description, init, logic, input,
|
||||
return o
|
||||
end
|
||||
|
||||
function GateDefinition.constructgate(self, objref, position, rotation)
|
||||
local gate = Gate.new(Gate, objref, self)
|
||||
function GateDefinition.constructgate(self, objref, position, rotation, sim)
|
||||
local gate = Gate.new(Gate, objref, self, sim)
|
||||
|
||||
for i = 1, #self.ports do
|
||||
local portd = self.ports[i]
|
||||
@@ -84,7 +84,7 @@ function GateDefinition.constructgate(self, objref, position, rotation)
|
||||
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.addport(gate, Port.new(Port, type, dir, {position[1]+pos[1], position[2]+pos[2], position[3]+pos[3]}, portd.causeupdate, gate.sim))
|
||||
end
|
||||
|
||||
return gate
|
||||
|
||||
Reference in New Issue
Block a user