add nil check to thruster index checking
This commit is contained in:
10
main.lua
10
main.lua
@@ -302,11 +302,17 @@ local function checkIfThrusterIsIndexed()
|
||||
local unindexedThrusters = {}
|
||||
|
||||
for _, v in ipairs(ThrusterTypes) do
|
||||
table.insert(thrusters, peripheral.find(v))
|
||||
local thrustersList = peripheral.find(v)
|
||||
if thrustersList then
|
||||
table.insert(thrusters, peripheral.find(v))
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in ipairs(PropellerTypes) do
|
||||
table.insert(thrusters, peripheral.find(v))
|
||||
local thrustersList = peripheral.find(v)
|
||||
if thrustersList then
|
||||
table.insert(thrusters, peripheral.find(v))
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in ipairs(thrusters) do
|
||||
|
||||
Reference in New Issue
Block a user