Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("menuApi")
- os.loadAPI("menuApi")
- os.loadAPI("foodstuffs")
- menu = {}
- currpos = 0
- dir = "forward"
- handle = assert(fs.open("recipes", "r"), "Feck...")
- output = handle.readAll()
- dest = textutils.unserialize(output)
- handle.close()
- table.insert(menu, { text = "Add Recipe"})
- table.insert(menu, { text = "Add Food"})
- table.insert(menu, { text = "Update"})
- table.insert(menu, { text = "Lua"})
- table.insert(menu, { text = "Search"})
- for k,v in pairs(dest) do
- table.insert(menu, { text = v[1].name})
- end
- print("Press any key to continue...")
- menuApi.runMenu(menu)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement