use get/set for parameters on ports and wires
This commit is contained in:
20
sim/port.lua
20
sim/port.lua
@@ -66,3 +66,23 @@ function Port.isfalling(self)
|
||||
end
|
||||
return self.group.state == false and (self.group.updatetick == sim.currenttick)
|
||||
end
|
||||
|
||||
function Port.setgate(self, gate)
|
||||
self.gate = gate
|
||||
end
|
||||
|
||||
function Port.setgroup(self, group)
|
||||
self.group = group
|
||||
end
|
||||
|
||||
function Port.getgroup(self)
|
||||
return self.group
|
||||
end
|
||||
|
||||
function Port.gettype(self)
|
||||
return self.type
|
||||
end
|
||||
|
||||
function Port.getstate(self)
|
||||
return self.state
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user