make sim use proper OOP

This commit is contained in:
Redo0
2021-05-25 14:18:13 -05:00
parent 0963ef8ca8
commit be2df1ef33
8 changed files with 74 additions and 56 deletions

View File

@@ -84,7 +84,7 @@ function GateDefinition.constructgate(self, 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.sim))
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)))
end
return gate