feat: rename BILLBOARD_MONITOR_SIDE to BILLBOARD_MONITOR for consistency
This commit is contained in:
@@ -163,25 +163,16 @@ function D.setupSmelterMonitor()
|
||||
end
|
||||
|
||||
function D.setupBillboardMonitor()
|
||||
if not cfg.BILLBOARD_MONITOR_SIDE or cfg.BILLBOARD_MONITOR_SIDE == "" then
|
||||
if not cfg.BILLBOARD_MONITOR or cfg.BILLBOARD_MONITOR == "" then
|
||||
return false
|
||||
end
|
||||
local mon = peripheral.wrap(cfg.BILLBOARD_MONITOR_SIDE)
|
||||
local mon = peripheral.wrap(cfg.BILLBOARD_MONITOR)
|
||||
if mon and mon.setTextScale then
|
||||
D.billboardMon = mon
|
||||
D.billboardMonName = cfg.BILLBOARD_MONITOR_SIDE
|
||||
D.billboardMonName = cfg.BILLBOARD_MONITOR
|
||||
D.billboardMon.setTextScale(0.5)
|
||||
return true
|
||||
end
|
||||
-- Fallback: try to find a monitor with that name on the network
|
||||
for _, name in ipairs(peripheral.getNames()) do
|
||||
if name == cfg.BILLBOARD_MONITOR_SIDE and peripheral.getType(name) == "monitor" then
|
||||
D.billboardMon = peripheral.wrap(name)
|
||||
D.billboardMonName = name
|
||||
D.billboardMon.setTextScale(0.5)
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user