1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-13 11:40:29 +00:00

Avoid shadowing of names in peripheral.isPresent

Fixes #415
This commit is contained in:
SquidDev 2020-04-21 08:51:49 +01:00
parent cea8be7efa
commit 7c1154ddfc

View File

@ -54,9 +54,9 @@ function isPresent(name)
end
for n = 1, #sides do
local name = sides[n]
if native.getType(name) == "modem" and not native.call(name, "isWireless") and
native.call(name, "isPresentRemote", name)
local side = sides[n]
if native.getType(side) == "modem" and not native.call(side, "isWireless") and
native.call(side, "isPresentRemote", name)
then
return true
end