added nil check for transmission list in populateThrusterValues

This commit is contained in:
2026-06-29 19:48:22 -05:00
parent 539fdd92fe
commit ab8d65f477

View File

@@ -426,6 +426,7 @@ local function populateThrusterValues()
local subnetworkId = peripheral.wrap(thruster.name).getSubnetworkAnchorId()
for _, transmissionType in ipairs(TransmissionTypes) do
local transmissions = peripheral.find(transmissionType)
if transmissions ~= nil and transmissions[1] ~= nil then
for _, transmission in ipairs(transmissions) do
if transmission.getSelfId() == subnetworkId then
thruster.transmission = peripheral.getName(transmission)
@@ -433,6 +434,7 @@ local function populateThrusterValues()
end
end
end
end
if thruster.power == nil then
if thruster.type == "thruster" then
thruster.power = thruster.thruster.getPower()