Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Monitor Manager
- --This program manages and Draws Items onto a Test Chambers Detail Monitor to show the Tests Environment and other Details about the Test
- --this program is used for Minecraft 1.16.5 CC Tweaked
- local tArg = {..}
- local TestNum = tArg[1]
- local TrackNum = tArg[2]
- local TestItems = tArg[3]
- local TestSection = tArg[4]
- local TestState = tArg[5]
- local Monitor = peripheral.find("monitor")
- start()
- local function start()
- monitor.clear()
- monitor.setBackground("black")
- monitor.writeLine("-------------------")
- monitor.writeLine("TEST BOOT SCREEN")
- monitor.writeLine("-------------------")
- MonitorManager()
- end
- local function MonitorManager()
- if TestState == "Lockdown" then
- monitor.setCursorPos(1,5)
- monitor.writeLine("CHAMBER UNDER LOCKDOWN")
- monitor.writeLine("PLEASE FIND SAFE PLACE TO HIDE")
- monitor.writeLine("WHILE SECURITY ATTEMPTS TO DEAL")
- monitor.writeLine("WITH THE CAUSE OF LOCKDOWN")
- elseif TestState == "Disabled" then
- monitor.clear()
- monitor.setBackground("blue")
- monitor.setCursorPos(1,5)
- monitor.writeLine("Test chamber is disabled")
- monitor.writeLine("please contact the tracks adminstrator")
- monitor.writeLine("if you have any questions or problems")
- monitor.writeLine("relating to this chamber")
- elseif TestState == "Boot" then
- monitor.setCursorPos(1,5)
- monitor.writeLine("Test Boot System")
- monitor.setCursorPos(1,6)
- CenterTest("=====================")
- monitor.setCursorPos(1,7)
- CenterText("Please Wait, System Processing")
- monitor.setCursorPos(1,8)
- CenterText("=====================")
- else
- monitor.clear()
- monitor.setBackground("white")
- monitor.paintutils.drawBox(30,20,70,60,gray)
- end
- end
- local function CenterTest(text)
- local x,y = monitor.getTextScale()
- local x2,y2 = monitor.getCursorPos()
- monitor.setCursorPos(math.ceil((x/2) - (text:len() /2)), y2)
- monitor.write(text)
- end
Add Comment
Please, Sign In to add comment