Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bundledSide = "bottom"
- monside = "top"
- tauschen = true
- mon = peripheral.wrap(monside)
- mon.setTextScale(0.75)
- x,y = mon.getSize()
- --nichts mehr ändern
- function midWrite(text, yPos)
- xPos = math.floor((x-#text)/2)
- mon.setCursorPos(xPos,yPos)
- mon.write(text)
- end
- function gui()
- mon.setBackgroundColor(colors.lightGray)
- mon.setTextColor(colors.gray)
- for i=1,y do
- mon.setCursorPos(1,i)
- for j=1,x do
- mon.write(" ")
- end
- end
- mon.setTextColor(colors.cyan)
- midWrite(".:: .::.::::::: .: .::: .::",3)
- midWrite(".:: .::.:: .:: .: :: .: .:: .::",4)
- midWrite(".:: .::.:: .:: .: .:: .:: .:: .::",5)
- midWrite(".:: .::.: .:: .:: .:: .:: .:: .::",6)
- midWrite(".:: .::.:: .:: .:::::: .:: .:: .: .::",7)
- midWrite(".:: .::.:: .:: .:: .:: .:: .: ::",8)
- midWrite(" .::::: .:: .::.:: .::.:: .::",9)
- mon.setTextColor(colors.orange)
- midWrite("Uran Tausch-o-Mat - Status",1)
- mon.setTextColor(colors.gray)
- mon.setCursorPos(2,12)
- mon.write("UU-Matter Vorrat:")
- mon.setCursorPos(2,15)
- mon.write("Uran-Cell Isotope Vorrat:")
- mon.setCursorPos(x-7,12)
- if uu then
- mon.setTextColor(colors.red)
- mon.write("too low")
- else
- mon.setTextColor(colors.green)
- mon.write("ok")
- end
- mon.setCursorPos(x-7,15)
- if urancell then
- mon.setTextColor(colors.red)
- mon.write("too high")
- else
- mon.setTextColor(colors.green)
- mon.write("ok")
- end
- if not uu and not urancell then
- mon.setTextColor(colors.green)
- midWrite("+-+-+-+-+-+-+-+-+-+",18)
- midWrite("|G|E|O|E|F|F|N|E|T|",19)
- midWrite("+-+-+-+-+-+-+-+-+-+",20)
- --rs.setBundledOutput("bottom",colors.lime+colors.blue)
- else
- mon.setTextColor(colors.red)
- midWrite("+-+-+-+-+-+-+-+-+-+-+-+",18)
- midWrite("|G|E|S|C|H|L|O|S|S|E|N|",19)
- midWrite("+-+-+-+-+-+-+-+-+-+-+-+",20)
- --rs.setBundledOutput("bottom",0)
- end
- end
- while true do
- uu = rs.testBundledInput("bottom",colors.magenta)
- urancell = rs.testBundledInput("bottom",colors.purple)
- mon.clear()
- gui()
- event = os.pullEvent()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement