Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pushIngredient (ingredientName)
- for i,v in ipairs(chest.list()) do
- print("Index=",i," Value=",v)
- if v.name==ingredientName then
- station.pullItems("bottom",i,1)
- return
- end
- end
- print("Try restocking, couldn't find ",ingredientName,"!")
- end
- function makeSandwich (sandwichName, count)
- while count>0 do
- pushIngredient("minecraft:bread")
- if sandwichName=="simple" then
- pushIngredient("minecraft:cooked_chicken")
- pushIngredient("farmers_delight:onion")
- pushIngredient("farmers_delight:tomato")
- end
- if sandwichName=="complex" then
- pushIngredient("minecraft:cooked_chicken")
- pushIngredient("farmers_delight:bacon_and_eggs")
- pushIngredient("farmers_delight:onion")
- pushIngredient("farmers_delight:tomato")
- end
- if sandwichName="super" then
- pushIngredient("minecraft:cooked_chicken")
- pushIngredient("farmers_delight:bacon_and_eggs")
- pushIngredient("farmers_delight:onion")
- pushIngredient("farmers_delight:tomato")
- pushIngredient("create_confectionary:ruby_chocolate")
- end
- count=count-1
- end
- end
- chest=peripheral.wrap("bottom")
- station=peripheral.wrap("front")
- while true do
- print("what kind of sandwich do you want (basic, complex, super), and how many?")
- makeSandwich(read(), read())
- print("finished! All ingredients are counted and supplied into the culinary station.")
- end
- --notes: Double check the mod/item IDs.
Add Comment
Please, Sign In to add comment