remove colon syntax from oop
This commit is contained in:
@@ -5,7 +5,7 @@ GateDefinition = {
|
||||
input = function(gate, argv) end
|
||||
}
|
||||
|
||||
function GateDefinition:new(objref, name, description, init, logic, input, global, ports)
|
||||
function GateDefinition.new(self, objref, name, description, init, logic, input, global, ports)
|
||||
|
||||
name = collapseescape(name)
|
||||
init = collapseescape(init)
|
||||
@@ -58,8 +58,8 @@ function GateDefinition:new(objref, name, description, init, logic, input, globa
|
||||
return o
|
||||
end
|
||||
|
||||
function GateDefinition:constructgate(objref, position, rotation)
|
||||
local gate = Gate:new(objref, self)
|
||||
function GateDefinition.constructgate(self, objref, position, rotation)
|
||||
local gate = Gate.new(Gate, objref, self)
|
||||
|
||||
for i = 1, #self.ports do
|
||||
local port = self.ports[i]
|
||||
@@ -84,7 +84,7 @@ function GateDefinition:constructgate(objref, position, rotation)
|
||||
pos[2] = x
|
||||
end
|
||||
|
||||
gate:addport(Port:new(type, dir, {position[1]+pos[1], position[2]+pos[2], position[3]+pos[3]}, port.causeupdate))
|
||||
Gate.addport(gate, Port.new(Port, type, dir, {position[1]+pos[1], position[2]+pos[2], position[3]+pos[3]}, port.causeupdate))
|
||||
end
|
||||
|
||||
return gate
|
||||
|
||||
Reference in New Issue
Block a user