coffee.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. local S = farming.intllib
  2. -- cold cup of coffee
  3. minetest.register_node(":farming:grain_coffee_cup", {
  4. description = S("Cup of Grain Coffee"),
  5. drawtype = "torchlike", --"plantlike",
  6. tiles = {"farming_coffee_cup.png"},
  7. inventory_image = "farming_coffee_cup.png",
  8. wield_image = "farming_coffee_cup.png",
  9. paramtype = "light",
  10. walkable = false,
  11. selection_box = {
  12. type = "fixed",
  13. fixed = {-0.25, -0.5, -0.25, 0.25, 0.25, 0.25}
  14. },
  15. groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
  16. on_use = minetest.item_eat(2, "vessels:drinking_glass"),
  17. sounds = default.node_sound_glass_defaults(),
  18. })
  19. minetest.register_alias("farming:grain_coffee_cup_hot", "farming:grain_coffee_cup")
  20. minetest.register_craft( {
  21. output = "farming:grain_coffee_cup",
  22. type = "shapeless",
  23. recipe = {"vessels:drinking_glass", "group:food_grain_powder",
  24. "bucket:bucket_water", "group:food_saucepan"},
  25. replacements = {
  26. {"bucket:bucket_water", "bucket:bucket_empty"},
  27. {"group:food_saucepan", "farming:saucepan"},
  28. }
  29. })
  30. minetest.register_craftitem(":farming:grain_coffee", {
  31. description = S("Grain Coffee"),
  32. inventory_image = "farming_roasted_powder.png",
  33. groups = {food_grain_powder = 1, flammable = 2},
  34. })
  35. minetest.register_craft({
  36. type = "shapeless",
  37. output = "farming:grain_coffee",
  38. recipe = {
  39. "group:food_grain_roasted", "group:food_grain_roasted", "farming:coffee_grinder"
  40. },
  41. replacements = {{"group:food_coffee_grinder", "farming:coffee_grinder"}},
  42. })