start adding c structs for gates and ports
This commit is contained in:
@@ -58,11 +58,11 @@ function GateDefinition.new(self, objref, name, description, init, logic, input,
|
||||
return o
|
||||
end
|
||||
|
||||
function GateDefinition.constructgate(self, objref, position, rotation, sim)
|
||||
local gate = Gate.new(Gate, objref, self, sim)
|
||||
function GateDefinition.constructgate(def, objref, position, rotation, sim)
|
||||
local gate = Gate.new(Gate, objref, def, sim)
|
||||
|
||||
for i = 1, #self.ports do
|
||||
local portd = self.ports[i]
|
||||
for i = 1, #def.ports do
|
||||
local portd = def.ports[i]
|
||||
local type = portd.type
|
||||
local pos = {portd.position[1], portd.position[2], portd.position[3]}
|
||||
local dir = portd.direction
|
||||
|
||||
Reference in New Issue
Block a user