remove colon syntax from oop
This commit is contained in:
11
sim/wire.lua
11
sim/wire.lua
@@ -1,8 +1,9 @@
|
||||
|
||||
Wire = {
|
||||
logictype = 0
|
||||
}
|
||||
|
||||
function Wire:new(objref, layer, bounds)
|
||||
function Wire.new(self, objref, layer, bounds)
|
||||
local o = {
|
||||
objref = objref,
|
||||
layer = layer,
|
||||
@@ -14,14 +15,14 @@ function Wire:new(objref, layer, bounds)
|
||||
return o
|
||||
end
|
||||
|
||||
function Wire:setlayer(layer)
|
||||
function Wire.setlayer(self, layer)
|
||||
if self.group ~= nil then
|
||||
self.group:removewire(self)
|
||||
Group.removewire(self.group, self)
|
||||
end
|
||||
self.layer = layer
|
||||
sim:connectwire(self)
|
||||
Simulation.connectwire(sim, self)
|
||||
end
|
||||
|
||||
function Wire:update()
|
||||
function Wire.update(self)
|
||||
client:send("WU\t" .. bool_to_int[self.group.state] .. "\t" .. self.objref .. "\n")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user