Advertisement
Agent_Silence

GladiusREWORK

Dec 19th, 2015 (edited)
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. -- Prerequisites
  2. for i,v in pairs(peripheral.getNames()) do -- Find modem
  3.     if peripheral.getType(v) == "modem" then
  4.         music = peripheral.wrap(v)
  5.     end
  6. end
  7.  
  8. local map
  9. local direction
  10.  
  11. -- Map Selection Menu
  12. function startMenu()
  13.     term.setBackgroundColor(colors.white)
  14.     term.clear()
  15.     local w,h = term.getSize()
  16.     term.setCursorPos(math.floor(w / 2 - #"Select Map File" / 2 + .5), 1)
  17.     term.setTextColor(colors.black)
  18.     term.write("Select Map File")
  19.        
  20. end
  21.  
  22.  
  23. -- Create two windows for individual management
  24. local mapDisplay = window.create(term.native(),1,1,29,19)
  25. local guiDisplay = window.create(term.native(),30,1,51,19)
  26.  
  27. -- Update map display
  28. function redrawMap()
  29.     mapDisplay.setBackgroundColor(colors.black)
  30.     mapDisplay.clear()
  31.     -- Draw Turtle Icon
  32.     mapDisplay.setCursorPos(15,10)
  33.     mapDisplay.setBackgroundColor(colors.yellow)
  34.     mapDisplay.setTextColor(colors.black)
  35.     mapDisplay.write("@")
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement