Advertisement
SirBaconBitz

Foodstuffs startup

Jun 29th, 2014
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. shell.run("menuApi")
  2. os.loadAPI("menuApi")
  3. os.loadAPI("foodstuffs")
  4. menu = {}
  5. currpos = 0
  6. dir = "forward"
  7.  
  8. handle = assert(fs.open("recipes", "r"), "Feck...")
  9. output = handle.readAll()
  10. dest = textutils.unserialize(output)
  11. handle.close()
  12.  
  13. table.insert(menu, { text = "Add Recipe"})
  14. table.insert(menu, { text = "Add Food"})
  15. table.insert(menu, { text = "Update"})
  16. table.insert(menu, { text = "Lua"})
  17. table.insert(menu, { text = "Search"})
  18. for k,v in pairs(dest) do
  19.   table.insert(menu, { text = v[1].name})
  20. end
  21. print("Press any key to continue...")
  22. menuApi.runMenu(menu)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement