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

@@ -32,18 +32,18 @@ function Port.new(self, type, direction, position, causeupdate)
return o
end
function Port.setstate(self, state)
if state ~= self.state then
self.state = state
Simulation.queuegroup(sim, self.group)
function Port.setstate(port, state)
if state ~= port.state then
port.state = state
Simulation.queuegroup(sim, port.group)
end
end
function Port.setinputstate(self, state)
if state ~= self.state then
self.state = state
if self.causeupdate then
Simulation.queuegate(sim, self.gate)
function Port.setinputstate(port, state)
if state ~= port.state then
port.state = state
if port.causeupdate then
Simulation.queuegate(sim, port.gate)
end
end
end