Advertisement
KaychenHH

EssenceControl V2

Aug 14th, 2021 (edited)
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.34 KB | None | 0 0
  1. --
  2. -- EssenceControl v2.0.1
  3. -- Essence-Watchdog and Essence-Autocrafter
  4. --
  5. -- written in 07/2021 by Kay Michaelsen
  6. -- revised in 08/2021 by Kay Michaelsen
  7. --
  8. -- added in v2:
  9. -- complete new GUI
  10. -- variable number of displays
  11. -- auto-transfer of crafted items
  12. --
  13. mon = {}
  14. aMon = 0
  15.  
  16. mon[1] = peripheral.wrap("monitor_4")
  17. mon[2] = peripheral.wrap("monitor_35")
  18. mon[3] = peripheral.wrap("top")
  19. aMon = 3
  20.  
  21. refst1 = peripheral.wrap("left")
  22. refst2 = peripheral.wrap("refinedstorage_1")
  23.  
  24. function MonInit(moni)
  25.  
  26.     if not (moni == nil) then
  27.         moni.setTextScale(0.5)
  28.         moni.setCursorPos(3,1)
  29.         moni.setBackgroundColor(colors.black)
  30.         moni.setTextColor(colors.white)
  31.         moni.clear()
  32.         moni.setBackgroundColor(colors.blue)
  33.         moni.setTextColor(colors.orange)
  34.         moni.write(" * Pup City Essence-Watchdog & AutoCrafter * ")
  35.     end
  36.  
  37. end
  38.  
  39. mNr = 0
  40. for mNr = 1, aMon do
  41.     MonInit(mon[mNr])
  42. end
  43.  
  44. rs = refst1.getItems()
  45. rp = refst1.getPatterns()
  46.  
  47. fUL = {}
  48. mENGE = {}
  49. mIN = {}
  50. pAT = {}
  51. pOnce = {}
  52. Anzahl = 0
  53.  
  54. iName = {}
  55. iPos = {}
  56.  
  57. pName = {}
  58. pItem = {}
  59. pAnz = {}
  60. AnzP = 0
  61. PatternName ="-"
  62.  
  63. Zeile = 0
  64. Offset = 0
  65.  
  66. fUL[0] = "Name der Essence"
  67. mENGE[0] = 0
  68. mIN[0] = 0
  69. pAT[0] = "Pattern"
  70. pOnce[0] = false
  71. pName[0] = "Name Pattern"
  72. pItem[0] = "Name Item"
  73. pAnz[0] = 0
  74. iName[0] = "Name der Essence"
  75. iPos[0] = 0
  76.  
  77. retval = false
  78.  
  79.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement