coffee_recipes.lua 2.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. local S = minetest.get_translator("default")
  2. local recipes = {
  3. {"farming:mint_leaf 3", tf_recipes.glass.." 4","bucket:bucket_water","farming:mint_tea 4","bucket:bucket_empty",4},
  4. {"farming:coffee_beans", tf_recipes.glass.." 4","bucket:bucket_water","farming:coffee_cup 4","bucket:bucket_empty",4},
  5. {"farming:coffee_beans", tf_recipes.glass.." 4","default:ice","farming:coffee_cup 4","bucket:bucket_empty",4},
  6. {"farming:coffee_beans", tf_recipes.glass.." 4","mobs:bucket_milk","tf_recipes:cappuccino 4","bucket:bucket_empty",4},
  7. {"farming:coffee_beans", tf_recipes.glass.." 4","tf_recipes:grain_milk 4","tf_recipes:cappuccino 4","bucket:bucket_empty",4},
  8. {"farming:coffee_beans", tf_recipes.glass.." 4","farming:soy_milk 4","tf_recipes:cappuccino 4","vessels:drinking_glass",4},
  9. {"farming:cocoa_beans", tf_recipes.glass.." 4","bucket:bucket_water","tf_recipes:cocoa_cup 4","bucket:bucket_empty",4},
  10. {"ethereal:lemon", tf_recipes.glass.." 4","bucket:bucket_water","tf_recipes:hot_lemon 4","bucket:bucket_empty",4},
  11. {"farming:barley 8", tf_recipes.glass.." 4","bucket:bucket_water","tf_recipes:grain_milk 4","bucket:bucket_empty",4},
  12. {"farming:oat 8", tf_recipes.glass.." 4","bucket:bucket_water","tf_recipes:grain_milk 4","bucket:bucket_empty",4},
  13. {"farming:rye 8", tf_recipes.glass.." 4","bucket:bucket_water","tf_recipes:grain_milk 4","bucket:bucket_empty",4},
  14. {"farming:wheat 8", tf_recipes.glass.." 4","bucket:bucket_water","tf_recipes:grain_milk 4","bucket:bucket_empty",4},
  15. {"farming:oat 4", tf_recipes.bowl,tf_recipes.glasswater,"farming:porridge",tf_recipes.glass,4},
  16. }
  17. -- register recipes
  18. for _, data in pairs(recipes) do
  19. local boil_time = data[6] or 1
  20. local b_registered = true
  21. for i=1,5 do
  22. if data[i] then
  23. local item_name = string.split(data[i],' ')[1]
  24. b_registered = b_registered and (minetest.registered_items[item_name] ~= nil)
  25. else
  26. print(dump(data[i]))
  27. b_registered = false
  28. end
  29. end
  30. if b_registered then
  31. tf_coffee.register_brewing_recipe({input = {data[1], data[2], data[3]}, output = {data[4],data[5]}, time = boil_time})
  32. end
  33. end