feat: implement billboard monitor support and remove legacy code

This commit is contained in:
MayaTheShy
2026-03-26 14:16:23 -04:00
parent c1b1713699
commit 8a50bc586d
6 changed files with 378 additions and 627 deletions

View File

@@ -194,6 +194,15 @@ local function main()
log.warn("INIT", "No smelter monitor on %s", cfg.SMELTER_MONITOR_SIDE)
end
-- Billboard monitor (optional — set billboardMonitorSide in .manager_config)
if cfg.BILLBOARD_MONITOR_SIDE ~= "" then
if display.setupBillboardMonitor() then
log.info("INIT", "Billboard monitor: %s", display.billboardMonName)
else
log.warn("INIT", "Billboard monitor not found: %s", cfg.BILLBOARD_MONITOR_SIDE)
end
end
-- Find wired modem for client/turtle communication
for _, name in ipairs(peripheral.getNames()) do
if peripheral.getType(name) == "modem" then
@@ -541,6 +550,23 @@ local function main()
end
end),
-- Task 8b: Billboard dashboard redraw (goals monitor)
resilient("Billboard", function()
if not display.billboardMon then
-- No billboard configured, sleep forever
while true do sleep(3600) end
end
state.billboardNeedsRedraw = true
while true do
if state.billboardNeedsRedraw then
state.billboardNeedsRedraw = false
local bok, berr = pcall(display.drawBillboard)
if not bok then log.error("DRAW", "Billboard: %s", tostring(berr)) end
end
sleep(0.5)
end
end),
-- Task 9: Touch event listener (both monitors)
resilient("Touch-listener", function()
while true do