fix more oop and bugs

This commit is contained in:
Redo0
2021-05-22 18:45:04 -05:00
parent db7e2d06ad
commit 6c997a36fa
4 changed files with 20 additions and 18 deletions

View File

@@ -85,7 +85,7 @@ function Group.addport(self, port)
elseif port.type == PortTypes.input then
self.in_ports[port] = port
self.nin_ports = self.nin_ports + 1
port:setinputstate(self.state)
Port.setinputstate(port, self.state)
end
end
@@ -138,11 +138,11 @@ function Group.setstate(self, state)
if state ~= self.state then
self.state = state
self.updatetick = sim.currenttick
for k, port in pairs(self.in_ports) do
Port.setinputstate(port, state)
end
Simulation.queuegroupfx(sim, self)
end
end