Guest User

startup

a guest
Mar 22nd, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. local nativeTerm = term.native or term
  2.  
  3. local function invoke(sMethod, ...)
  4. nativeTerm[sMethod](...)
  5. for k,sSide in pairs(redstone.getSides()) do
  6. if peripheral.isPresent(sSide) and peripheral.getType(sSide) == "monitor" then
  7. peripheral.call(sSide, sMethod, ...)
  8. end
  9. end
  10. end
  11.  
  12. term.write = function(text) invoke("write", text) end
  13. term.scroll = function(n) invoke("scroll", n) end
  14. term.setCursorPos = function(x, y) invoke("setCursorPos", x, y) end
  15. term.setCursorBlink = function(:o/>/> invoke("setCursorBlink", :o/>/> end
  16. term.clear = function() invoke("clear") end
  17. term.clearLine = function() invoke("clearLine") end
  18.  
  19. nativeTerm.clear()
  20. nativeTerm.setCursorPos(1, 1)
  21. print(os.version())
Add Comment
Please, Sign In to add comment