Advertisement
Robinlemon

Write To Monitors

Apr 10th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. local monitors = {peripheral.find("monitor")}
  2.  
  3. local function draw(m)
  4.     local w, h = m.getSize()
  5.     local str = "Robinlemon's Base"
  6.     local w2 = (w - #str) / 2
  7.     local h2 = h / 2
  8.  
  9.     m.setCursorPos(w2, h2)
  10.     m.write(str)
  11. end
  12.  
  13. for _, m in pairs(monitors) do draw(m) end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement