start adding c structs for gates and ports

This commit is contained in:
Redo0
2021-05-25 14:54:26 -05:00
parent be2df1ef33
commit 8561940777
7 changed files with 86 additions and 43 deletions

View File

@@ -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