Advertisement
Guest User

startup.lua

a guest
May 18th, 2021
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.53 KB | None | 0 0
  1. --term.redirect(peripheral.wrap('right'))
  2. -- bee you, citrons.
  3.  
  4. local adjs = {
  5.     "beeoidal","apiaristic","critical","automatic",
  6.     "nuclear","evil","safety","unsafety","grammatical",
  7.     "good","bad","rotational","rotating","autogravitational",
  8.     "systemic","invisibile","invisibility","apiary",
  9.     "apiaristic","fake","real","decoy","communistic",
  10.     "capitalistic","monetary","altruistic",
  11.     "inevitable","insatiable","disagreeable",
  12.     "mind controlling","destruction","diagnostic",
  13.     "impossible","anomalous","levitating",
  14.     "transparent","unknowable","antimemetic",
  15.     "propaganda","memetic","hazardous","status",
  16.     "cognitohazardous","cryogenic","meta",
  17.     "sentient", "invertible", "isomorphic", "pyroclastic",
  18.     "differential", "nonlinear", "optical", "javascriptoidal",
  19.     "intelligent", "unfathomable", "indefatigable",
  20.     "mind controlled", "commutative", "triangular",
  21.     "nanoscale", "web-controlled", "solar", "relativistic",
  22.     "construction", "deconstruction", "set-theoretic",
  23.     "legal", "characteristic", "probabilistic", "convolutional",
  24.     "photonic", "optronic", "silicon", "emulated",
  25.     "metallic", "microwave", "microelectromechanical",
  26.     "geomagnetic", "magnetic", "apionic", "projectional",
  27.     "combinatoric", "reversible", "ominous", "hexagonal",
  28.     "lunar", "spatial", "whole", "half",
  29.     "impartial", "immovable", "unstoppable",
  30.     "subsonic", "supersonic", "blue (insentient)",
  31.     "blue (sentient)", "colourless blue",
  32.     "colourless red", "colorless yellow",
  33.     "furious", "ultrasonic", "sleeping",
  34.     "concurrent", "memory-safe", "self-aware",
  35.     "inflammable", "flammable", "stellar",
  36.     "integrated", "gollarious", "heretic",
  37.     "dangerous", "nonmetallic", "monadic",
  38.     "comonadic", "malleable", "javascript",
  39.     "javascriptoidal", "carcinogenic",
  40.     "crabulous", "crab deployment", "galactic",
  41.     "procedual", "derivation"
  42. }
  43. local nouns = {
  44.     "systems","apioids","bees","apioforms",
  45.     "circles","polygons","fluids","dynamics",
  46.     "servers","apiaries","lemons","lemonsystems",
  47.     "apiosystems","dodecahedra","ideologies",
  48.     "political systems","blockchains","algorithms",
  49.     "cuboids","timelike curves","devices",
  50.     "computers","clusters","nodes",
  51.     "clients","proxies","uplinks",
  52.     "satelites","orbital satelites","lasers",
  53.     "metaspheres","generators","status reports",
  54.     "tables","websites","content","videos",
  55.     "displays","interfaces","reactors","software",
  56.     "spyware","malware","demons","auctions",
  57.     "currency","drones","cognitohazards",
  58.     "apiohazards","cryoapioforms",
  59.     "vectors", "matrices", "stations", "monoids",
  60.     "daemons", "memetics", "signposts", "doors",
  61.     "hexahedra", "planets", "spheres", "monitors",
  62.     "projectiles", "neutrinos", "muons", "ellipsoids",
  63.     "arrays", "tensors", "neural networks", "bismuth",
  64.     "containment", "hives", "polynomials", "monopoles",
  65.     "ideas", "memeplexes"
  66. }
  67. local opinions = {
  68.     "I hate X","I enjoy X","I sometimes experience X",
  69.     "The company really needs more X",
  70.     "We should use less X",
  71.     "For environmental purposes, we should\nuse X",
  72.     "X: good for the economy",
  73.     "X: bad for the economy",
  74.     "I think poorly of X",
  75.     "We need a better solution for X",
  76.     "The X have been malfunctioning recently",
  77.     "We could profit from X",
  78.     "We would lose profit from X",
  79.     "X have had great uptime",
  80.     "X have had terrible uptime",
  81.     "I think X bad",
  82.     "I think X good",
  83.     "X have been problematic; I blame X",
  84.     "X are present in the majority of our facilities",
  85.     "X have not been confirmed to exist",
  86.     "X are a core part of our quarterly strategy",
  87.     "Sometimes X can be found scattered around our facilities",
  88.     "Wait, we have X? Doubtful",
  89.     "There are no X",
  90.     "X have demonstrated antimemetic properties",
  91.     "Maybe X are to be considered harmful",
  92.     "We're looking into integrating X into our X",
  93.     "We should deploy more X",
  94.     "X are an unnecessary burden",
  95.     "Maintanence of X is difficult",
  96.     "We should really automate X",
  97.     "We need to hire X consultants"
  98. }
  99.  
  100. local printer = peripheral.find "printer"
  101.  
  102. function rstring(n)
  103.     local res = ""
  104.     for i=1,n do
  105.         res=res..string.char(math.random(33,255))
  106.     end
  107.     return res
  108. end
  109.  
  110. local preferred = rstring(math.random(7,15))
  111.  
  112. function slow(x,nnl)
  113.     for i=1,#x do
  114.         local c = x:sub(i,i)
  115.         if c=="\n" then
  116.             print("")
  117.         else
  118.             write(c)
  119.         end
  120.         if math.random(0,1)==1 then sleep(0.05) end
  121.     end
  122.     if not nnl then print("") end
  123. end
  124. function shouldbreak(text)
  125.     local x = term.getCursorPos()
  126.     local w = term.getSize()
  127.     if x+#text>w then
  128.         return true
  129.     end
  130.     return false
  131. end
  132. function cprint(t,p,nnl,pp)
  133.     p = p or 0
  134.     pp = pp or 0
  135.     local x,y = term.getCursorPos()
  136.     local w,h = term.getSize()
  137.     term.setCursorPos(w/2-(#t+p)/2,y)
  138.     slow(t,nnl)
  139. end
  140. function header(x)
  141.     cprint(("-"):rep(term.getSize()))
  142.     cprint(x)
  143.     cprint(("-"):rep(term.getSize()))
  144. end
  145. function r(t)
  146.     return t[math.random(1,#t)]
  147. end
  148. function pair()
  149.     return r(adjs).." "..r(nouns)
  150. end
  151. function printStatus()
  152.     local gpair = pair()..": "
  153.     local status = math.random(0,3)==0 and "OFFLINE" or "ONLINE"
  154.     cprint(gpair,#status,true)
  155.     sleep(math.random(1,10)/20)
  156.     if status=="OFFLINE" then
  157.         term.setTextColor(colors.red)
  158.     else
  159.         term.setTextColor(colors.lime)
  160.     end
  161.     cprint(status,-#gpair)
  162.     term.setTextColor(colors.white)
  163. end
  164. function statusreport()
  165.     header("STATUS REPORT")
  166.     for i=1,10 do printStatus() end
  167. end
  168. function giveopinion(isslow)
  169.     local opinion = r(opinions):gsub("X",pair)..". "
  170.     if shouldbreak(opinion) then print("") end
  171.     if isslow then slow(opinion,true) else print(opinion) end
  172. end
  173. function giveopinions(slow)
  174.     header("GENERAL REPORT")
  175.     for i=1,15 do giveopinion(slow) end
  176. end
  177. while true do
  178.     giveopinions(true)
  179.     print("")
  180.     statusreport(true)
  181.     printer.isColour = function() return false end
  182.     printer.getSize = printer.getPageSize
  183.     printer.scroll = function() end
  184.     printer.newPage()
  185.     local ts = os.date "%Y-%m-%d %H:%M"
  186.     printer.setPageTitle("General Report: " .. ts)
  187.     local orig = term.redirect(printer)
  188.     local w,h = term.getSize()
  189.     header "GENERAL REPORT"
  190.     while ({term.getCursorPos()})[2] < h do
  191.         giveopinion(false)
  192.     end
  193.     term.redirect(orig)
  194.     printer.endPage()
  195.     printer.drop(8, 64, "north")
  196. end
  197. sleep(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement