Advertisement
vittoema96

CyberAPINext

Jan 25th, 2022 (edited)
477
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -------------------------------------
  2. -- This program was designed for   --
  3. -- the Minecraft mod ComputerCraft --
  4. -------------------------------------
  5.  
  6. -----------------------------------
  7. --           WARNING             --
  8. -- This program is not meant to  --
  9. -- be downloaded.                --
  10. -- To install CyberOS on your    --
  11. -- ComputerCraft device just run --
  12. -- the following line on it:     --
  13. -- pastebin get qJSSf0qg startup --
  14. -- then restart the device.      --
  15. -----------------------------------
  16.  
  17. -----------------------------------
  18. --     ADVANCED COMPUTER API     --
  19. -- It handles the specific tasks --
  20. -- for the Advanced Computer.    --
  21. -----------------------------------
  22.  
  23.  
  24.  
  25. class = {}
  26. class.__index = class
  27. setmetatable(class, {__index = CyberAPIColor.class})
  28.  
  29. function class:new(shell)
  30.     local self = CyberAPIColor.class:new(shell)
  31.     setmetatable(self, class)
  32.    
  33.     getOrDownloadProgramPanes()
  34.     getOrDownloadLogoAnimation()
  35.    
  36.     return self
  37. end
  38.  
  39. function class:drawIcons(icons)
  40.     for i, name in ipairs(icons) do
  41.         if i<15 then
  42.             img = loadImageTheme("App"..name)
  43.             paintutils.drawImage(img,3+10*((i-1)%5),4+math.floor((i-1)/5)*6)
  44.             CyberAPI.blit(name, "0", "f",3+10*((i-1)%5)+math.floor((7-string.len(name))/2), 8+math.floor((i-1)/5)*6)
  45.         end
  46.     end
  47. end
  48.  
  49. function getOrDownloadProgramPanes()
  50.     if fs.exists(CyberAPIColor.defaultThemeDir.."/OffPane")==false then
  51.         local f = fs.open("themes/Default/OffPrompt", "w")
  52.         f.writeLine("")
  53.         f.writeLine("fffffffffffffffffffffffffffffffffffffffffffffffff")
  54.         f.writeLine("ffff111111111111111114fffffffeeeeeeeeeeeeeeeeecff")
  55.         f.writeLine("ffff1fffffffffffffff14fffffffefffffffffffffffecff")
  56.         f.writeLine("ffff1fff111111114fff14fffffffefffeeeeeeeecfffecff")
  57.         f.writeLine("ffff1ff114fffff114ff14fffffffefeeecfffffeeecfecff")
  58.         f.writeLine("ffff1f114f14ffff114f14fffffffefeecfffffffeecfecff")
  59.         f.writeLine("ffff1f114111114f114f14fffffffefeecffeecffeecfecff")
  60.         f.writeLine("ffff1f114f14ffff114f14fffffffefeeecfeecfeeecfecff")
  61.         f.writeLine("ffff1ff114fffff114ff14fffffffefffeeeeeeeecfffecff")
  62.         f.writeLine("ffff1ffff1111114ffff14fffffffeffffffeecffffffecff")
  63.         f.writeLine("ffff1fffffffffffffff14f88887fefffffffffffffffecff")
  64.         f.writeLine("ffff155555555555555514f85587fe555555555555555ecff")
  65.         f.writeLine("ffff111111111111111114f88887feeeeeeeeeeeeeeeeecff")
  66.         f.writeLine("fffffffffffffffffffffffffffffffffffffffffffffffff")
  67.         f.close()
  68.     end
  69.  
  70.     if fs.exists(CyberAPIColor.defaultThemeDir.."/PaintPane")==false then
  71.         local f = fs.open("themes/Default/PaintPrompt", "w")
  72.         f.writeLine("")
  73.         f.writeLine("fffffffffffffffffffffffffffffffffffffffffffffffff")
  74.         f.writeLine("ffff888888888888888887fffffff888888888888888887ff")
  75.         f.writeLine("ffff8fffffffffffffff87fffffff8fffffffffffffff87ff")
  76.         f.writeLine("ffff8fff55555555dfff87fffffff8ff99999999912bf87ff")
  77.         f.writeLine("ffff8ff55dfffff55dff87fffffff8ff9bffffff1f1bf87ff")
  78.         f.writeLine("ffff8ff5dff55dff5dff87fffffff8ff9bfffff1f19bf87ff")
  79.         f.writeLine("ffff8ff5df5555df5dff87fffffff8ff9bffff1f1f9bf87ff")
  80.         f.writeLine("ffff8ff5dff55dff5dff87fffffff8ff9bfff1f1ff9bf87ff")
  81.         f.writeLine("ffff8ff55dfffff55dff87fffffff8ff9bffcccfff9bf87ff")
  82.         f.writeLine("ffff8ffff555555dffff87fffffff8ff9999fc99999bf87ff")
  83.         f.writeLine("ffff8fffffffffffffff87f88887f8fffffffffffffff87ff")
  84.         f.writeLine("ffff855555555555555587f85587f855555555555555587ff")
  85.         f.writeLine("ffff888888888888888887f88887f888888888888888887ff")
  86.         f.writeLine("fffffffffffffffffffffffffffffffffffffffffffffffff")
  87.         f.close()
  88.     end
  89. end
  90.    
  91.  
  92. function getOrDownloadLogoAnimation()
  93.     if fs.exists(CyberAPIColor.defaultThemeDir.."/logoAnimation")==false then
  94.         fs.makeDir(CyberAPIColor.defaultThemeDir.."/logoAnimation")
  95.         local f = fs.open(CyberAPIColor.defaultThemeDir.."/logoAnimation/bg0", "w")
  96.         f.writeLine("fffffffffffffffffffffffffffffffffffffffffffffffff")
  97.         f.writeLine("fffddddddffffffdfffffffffffffffffffffffffffffffff")
  98.         f.writeLine("fffd555555fffffd5ffffffffffffffffffffffffffffffff")
  99.         f.writeLine("fffd55fffffffffd5ffdddfdfddffffffffffffffffffffff")
  100.         f.writeLine("fffd55fffffdfdfd5dfd555d5d55fffffffffffffffffffff")
  101.         f.writeLine("fffd55fffffd5d5d555d5d5d55f5fffffffffffffffffffff")
  102.         f.writeLine("fffd55fffffd5d5d5d5d555d5ffffffffffffffffffffffff")
  103.         f.writeLine("fffd55dddfff555f555f5dff5fdddddddffffffffffffffff")
  104.         f.writeLine("ffff555555fffd5ffffff55fffd5555555fffffffffffffff")
  105.         f.writeLine("fffffffffffddd5fffffffffffd5ffd555fffffffffffffff")
  106.         f.writeLine("fffffffffffd5d5fffffffffffd5ffd5d5fffddddffffffff")
  107.         f.writeLine("ffffffffffff555fffffffffffd5fd5fd5fddd5555dffffff")
  108.         f.writeLine("ffffffffffffffffffffffffffd5fd5fd5dd55555555fffff")
  109.         f.writeLine("ffffffffffffffffffffffffffd5d5fdd5f555ddfff5fffff")
  110.         f.writeLine("ffffffffffffffffffffffffffd555dd55ff55555ffffffff")
  111.         f.writeLine("fffffffffffffffffffffffffff5555555dddffd55fffffff")
  112.         f.writeLine("fffffffffffffffffffffffffffffffffff55dd555fffffff")
  113.         f.writeLine("ffffffffffffffffffffffffffffffffffff55555ffffffff")
  114.         f.close()
  115.  
  116.         f = fs.open(CyberAPIColor.defaultThemeDir.."/logoAnimation/bg1", "w")
  117.         f.writeLine("fffffffffffffffffffffffffffffffffffffffffffffffff")
  118.         f.writeLine("fffddddddffffffdfffffffffffffffffffffffffffffffff")
  119.         f.writeLine("fffd555555fffffd5ffffffffffffffffffffffffffffffff")
  120.         f.writeLine("fffd55fffffffffd5ffdddfdfddffffffffffffffffffffff")
  121.         f.writeLine("fffd55fffffdfdfd5dfd555ddd5d55fffffffffffffffffff")
  122.         f.writeLine("fffd55fffffd5d5d555d5d5d55f5fffffffffffffffffffff")
  123.         f.writeLine("fffdd55ffffd5d5d5dd5555d5ffffffffffffffffffffffff")
  124.         f.writeLine("fffd55dddfff555f555f5dff5fdddddddffffffffffffffff")
  125.         f.writeLine("ffff555555fffd5ffffff55fffd5555555fffffffffffffff")
  126.         f.writeLine("fffffffffffddd5fffffffffffd5ffd555fffffffffffffff")
  127.         f.writeLine("fffffffffffd5d5fffffffffffd5ffd5d5fffddddffffffff")
  128.         f.writeLine("ffffffffffff555fffffffffffd5fd5fd5fddd5555dffffff")
  129.         f.writeLine("ffffffffffffffffffffffffffd5fd5fd5dd55555555fffff")
  130.         f.writeLine("fffffffffffffffffffffff5555dd5fdd5f555ddfff5fffff")
  131.         f.writeLine("fffffffffffffffffffffffff555dddd55ff55555ffffffff")
  132.         f.writeLine("fffffffffffffffffffffffffff5555555dddffd55fffffff")
  133.         f.writeLine("fffffffffffffffffffffffffffffffffff55dd555fffffff")
  134.         f.writeLine("ffffffffffffffffffffffffffffffffffff55555ffffffff")
  135.         f.close()
  136.  
  137.  
  138.         f = fs.open(CyberAPIColor.defaultThemeDir.."/logoAnimation/bg2", "w")
  139.         f.writeLine("fffffffffffffffffffffffffffffffffffffffffffffffff")
  140.         f.writeLine("fffddddddffffffdfffffffffffffffffffffffffffffffff")
  141.         f.writeLine("fffd555555fffffd5ffffffffffffffffffffffffffffffff")
  142.         f.writeLine("fffd55fffffffffd5ffdddfdfddffffffffffffffffffffff")
  143.         f.writeLine("fffd55fffffdfdfdddfdd55dddd5555555fffffffffffffff")
  144.         f.writeLine("ffdddd55fffd5d5f555d5dddd5f5fffffffffffffffffffff")
  145.         f.writeLine("fffdddd55ff55f5d5dd55d5d5ffffffffffffffffffffffff")
  146.         f.writeLine("fffd555ddfff555f555f5dff5fdddddddffffffffffffffff")
  147.         f.writeLine("ffff555555fffd5ffffff55fffd5555555fffffffffffffff")
  148.         f.writeLine("fffffffffffddd5fffffffffffd5ffd555fffffffffffffff")
  149.         f.writeLine("fffffffffffd5d5fffffffffff55ddd5d5fffddddffffffff")
  150.         f.writeLine("ffffffffffff555fffffffffffd55d5fd5fddd5555dffffff")
  151.         f.writeLine("ffffffffffffffffffff555fddd5f55fdddd55555555fffff")
  152.         f.writeLine("fffffffffffffffffffffff555ddd5fdddf555ddfff5fffff")
  153.         f.writeLine("fffffffffffffffffffffffff55ddddd55ff55dd5dfffffff")
  154.         f.writeLine("fffffffffffffffffffffffffff5555555dddffd55555ffff")
  155.         f.writeLine("fffffffffffffffffffffffffffffffffff55dd555fffffff")
  156.         f.writeLine("ffffffffffffffffffffffffffffffffffff55555ffffffff")
  157.  
  158.         f.close()
  159.  
  160.         f = fs.open(CyberAPIColor.defaultThemeDir.."/logoAnimation/bg3", "w")
  161.         f.writeLine("fffffffffffffffffffffffffffffffffffffffffffffffff")
  162.         f.writeLine("fffddddddffffffdfffffffffffffffffffffffffffffffff")
  163.         f.writeLine("fffd5d5555f5f55d5ffffffffffffffffffffffffffffffff")
  164.         f.writeLine("fffdd5555555fffd5ffdddfdfddffffffffffffffffffffff")
  165.         f.writeLine("ffdd555ffffdfdfdddfdd55dddd5555555fffffffffffffff")
  166.         f.writeLine("ffdd5dddfffd5d5f555d5dddd5f5fffffffffffffffffffff")
  167.         f.writeLine("fff5ddd5dff55f5d5dd55d5d5ffffffffffffffffffffffff")
  168.         f.writeLine("ff555ddddfff555f555f5dff5fdddddddffffffffffffffff")
  169.         f.writeLine("f555555555fffd5ffffff55fffd5555555fffffffffffffff")
  170.         f.writeLine("ffffffdd55fdd55ffffffffffdd5fdd555fffffffffffffff")
  171.         f.writeLine("ffffffd55d555ffffffffffffd55ddd5d5fffddddffffffff")
  172.         f.writeLine("fffffff5555fffffffffffffdd5d555555fddd5555dffffff")
  173.         f.writeLine("ffffffffffffffffffff555dd5555dd55ddd55555555fffff")
  174.         f.writeLine("fffffffffffffffffffffdd555ddd55ddd55555dfff5fffff")
  175.         f.writeLine("fffffffffffffffffffffdd5555d55dd555d555dddfffffff")
  176.         f.writeLine("fffffffffffffffffffffff55555555555dddddd55555ffff")
  177.         f.writeLine("fffffffffffffffffffffffffffffff55dddddd555fffffff")
  178.         f.writeLine("fffffffffffffffffffffffffffffff5555f55555ffffffff")
  179.  
  180.         f.close()
  181.     end
  182. end
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement