Advertisement
osmarks

init_screens

Aug 28th, 2019
917
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. local palmap = { 32768, 4096, 8192, 2, 2048, 1024, 512, 256, 128, 16384, 32, 16, 8, 4, 64, 1 }
  2. local default_palette = { 0x000000, 0x7F664C, 0x57A64E, 0xF2B233, 0x3366CC, 0xB266E5, 0x4C99B2, 0x999999, 0x4C4C4C, 0xCC4C4C, 0x7FCC19, 0xDEDE6C, 0x99B2F2, 0xE57FD8, 0xF2B2CC, 0xFFFFFF }
  3.  
  4. local function init_screen(t)
  5.     for i, c in pairs(default_palette) do
  6.         t.setPaletteColor(palmap[i], c)
  7.     end
  8. end
  9.  
  10. for _, m in pairs{peripheral.find("monitor"), term.native()} do init_screen(m) end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement