attempt another fix at transmission nil value population
This commit is contained in:
4
main.lua
4
main.lua
@@ -241,7 +241,7 @@ function PropellerInit()
|
||||
local propellers = {}
|
||||
|
||||
for _, v in ipairs(TransmissionTypes) do
|
||||
local vlist = peripheral.find(v)
|
||||
local vlist = { peripheral.find(v) }
|
||||
if vlist ~= nil and vlist[1] ~= nil then
|
||||
table.insert(transmissions, vlist)
|
||||
end
|
||||
@@ -381,7 +381,7 @@ local function populateThrusterValues()
|
||||
if thruster.type == "rotator" and thruster.transmission == nil then
|
||||
local subnetworkId = peripheral.wrap(thruster.name).getSubnetworkAnchorId()
|
||||
for _, transmissionType in ipairs(TransmissionTypes) do
|
||||
local transmissions = peripheral.find(transmissionType)
|
||||
local transmissions = { peripheral.find(transmissionType) }
|
||||
if transmissions ~= nil and transmissions[1] ~= nil then
|
||||
for _, transmission in ipairs(transmissions) do
|
||||
if transmission.getSelfId() == subnetworkId then
|
||||
|
||||
Reference in New Issue
Block a user