Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MonitorSide = "right"
- RedstoneInputsSide = "left"
- CombustionColour = colours.orange
- MEImportColour = colours.magenta
- Monitor = peripheral.wrap(MonitorSide)
- function ClearMonitor()
- Monitor.setTextColor(colours.black)
- Monitor.setBackgroundColor(colours.black)
- Monitor.clear()
- Monitor.setCursorPos(1,1)
- end
- function DrawText(xPos, yPos, text, textColour, backgroundColour)
- Monitor.setBackgroundColor(backgroundColour)
- Monitor.setTextColor(textColour)
- Monitor.setCursorPos(xPos,yPos)
- Monitor.write(text)
- end
- function DrawCenteredHorizontal(xPos, yPos, width, text, textColour, backgroundColour)
- local textLength = string.len(text)
- local centerX = (width / 2) - (textLength / 2)
- DrawText(xPos + centerX, yPos, text, textColour, backgroundColour)
- end
- function Main()
- while true do
- local w, h = Monitor.getSize()
- local inputColours = redstone.getBundledInput(RedstoneInputsSide)
- local isCombustionOn = colours.test(inputColours, CombustionColour)
- local isMEImportOn = colours.test(inputColours, MEImportColour)
- ClearMonitor()
- DrawText(2, 2, "Engines: ", colours.white, colours.black)
- if (isCombustionOn) then DrawText(12, 2, "ONLINE", colours.white, colours.green)
- else DrawText(12, 2, "OFFLINE", colours.white, colours.red) end
- DrawText(2, 4, "MEImport: ", colours.white, colours.black)
- if (isMEImportOn) then DrawText(12, 4, "ONLINE", colours.white, colours.green)
- else DrawText(12, 4, "OFFLINE", colours.white, colours.red) end
- os.sleep(1)
- end
- end
- Main()
RAW Paste Data