Advertisement
Greyman27

storage controller

Nov 28th, 2024 (edited)
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. os.loadAPI("grey_api/move.lua")
  2. os.loadAPI("grey_api/util.lua")
  3.  
  4. local raw_input = nil --raw string
  5. local command = nil --tokenized
  6.  
  7. shell.run("clear")
  8. io.input(stdin)
  9. while true do
  10.     io.write(">")
  11.     raw_input = io.read()
  12.    
  13.     command = util.tokenize(raw_input)
  14.     if command[1]=="exit" then
  15.         break
  16.     elseif command[1] == "clear" then
  17.         shell.run("clear")
  18.     elseif command[1] == "help" then
  19.         print(" >exit - exits storage program")
  20.         print(" >help - prints help dialog")
  21.         print(" >clear - clears screen")
  22.         print("")
  23.         print(" >add <count> - adds more chests: count")
  24.         print(" >upgrade <id|type> <id|type> - upgrades chests")
  25.         print(" >get count [type] - gets info about chests")
  26.         print(" >get total capacity - gets total number of items capable ")
  27.     else
  28.         print(" Unknown command. For help use >help")
  29.     end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement