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

@@ -10,13 +10,12 @@ FFI.cdef[[
};
]]
function Wire.new(self, objref, layer, bounds, sim)
function Wire.new(self, objref, layer, bounds)
local o = {
objref = objref,
layer = layer,
group = nil,
bounds = bounds,
sim = sim,
}
setmetatable(o, self)
self.__index = self
@@ -28,7 +27,7 @@ function Wire.setlayer(self, layer)
Group.removewire(self.group, self)
end
self.layer = layer
Simulation.connectwire(Wire.getsim(self), self)
Simulation.connectwire(GSim, self)
end
function Wire.update(self)
@@ -54,7 +53,3 @@ end
function Wire.getbounds(self)
return self.bounds
end
function Wire.getsim(wire)
return wire.sim
end