add nil check to thruster index checking

This commit is contained in:
2026-06-25 14:32:32 -05:00
parent f15b8dc2ef
commit 2d30323148

View File

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