craftitems.lua 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. local S = minetest.get_translator("default")
  2. minetest.register_craftitem("tf_recipes:grain_milk", {
  3. description = S("Grain milk"),
  4. inventory_image = "tf_recipes_grain_milk.png",
  5. groups = {vessel = 1, drink = 1, food_milk=1},
  6. on_use = minetest.item_eat(2, "vessels:drinking_glass"),
  7. })
  8. minetest.register_craftitem("tf_recipes:frozen_coffee", {
  9. description = S("Frozen Coffee"),
  10. inventory_image = "tf_recipes_frozen_coffee.png",
  11. groups = {vessel = 1, drink = 1, food_milk=1},
  12. on_use = minetest.item_eat(3, "vessels:drinking_glass"),
  13. })
  14. for _,fruit in pairs(tf_recipes.fruits) do
  15. if tf_recipes.bucket ~= nil then
  16. minetest.register_node(":technic_farming:bucket_must_"..fruit[1],{
  17. description = S("Bucket of "..fruit[2].." must"),
  18. inventory_image = 'bucket.png^(batteries_bucket_contents.png^[colorize:'..fruit[3]..':200)',
  19. wield_image = 'bucket.png^(batteries_bucket_contents.png^[colorize:'..fruit[3]..':200)',
  20. tiles = {'bucket.png^(batteries_bucket_contents.png^[colorize:'..fruit[3]..':200)'},
  21. paramtype = "light",
  22. is_ground_content = false,
  23. walkable = false,
  24. groups = {vessel=1,dig_immediate=3,attached_node=1, must = 1},
  25. })
  26. minetest.register_node(":technic_farming:bucket_vinegar_"..fruit[1],{
  27. description = S("Bucket of "..fruit[2].." vinegar"),
  28. inventory_image = 'bucket.png^(batteries_bucket_contents.png^[colorize:'..fruit[3]..':100)',
  29. wield_image = 'bucket.png^(batteries_bucket_contents.png^[colorize:'..fruit[3]..':100)',
  30. tiles = {'bucket.png^(batteries_bucket_contents.png^[colorize:'..fruit[3]..':100)'},
  31. paramtype = "light",
  32. is_ground_content = false,
  33. walkable = false,
  34. groups = {vessel=1,dig_immediate=3,attached_node=1, vinegar = 1},
  35. })
  36. end
  37. if tf_recipes.bottle ~= nil then
  38. minetest.register_node(":technic_farming:bottle_must_"..fruit[1],{
  39. description = S("Bottle of "..fruit[2].." must"),
  40. inventory_image = 'batteries_bottle_contents.png^[colorize:'..fruit[3]..':200',
  41. wield_image = 'batteries_bottle_contents.png^[colorize:'..fruit[3]..':200',
  42. tiles = {'batteries_bottle_contents.png^[colorize:'..fruit[3]..':200'},
  43. paramtype = "light",
  44. is_ground_content = false,
  45. walkable = false,
  46. groups = {vessel=1,dig_immediate=3,attached_node=1, must = 1},
  47. })
  48. end
  49. if tf_recipes.glass ~= nil then
  50. minetest.register_node(":technic_farming:glass_must_"..fruit[1],{
  51. description = S("Glass of "..fruit[2].." must"),
  52. inventory_image = 'batteries_glass_contents.png^[colorize:'..fruit[3]..':200',
  53. wield_image = 'batteries_glass_contents.png^[colorize:'..fruit[3]..':200',
  54. tiles = {'batteries_glass_contents.png^[colorize:'..fruit[3]..':200'},
  55. paramtype = "light",
  56. is_ground_content = false,
  57. walkable = false,
  58. groups = {vessel=1,dig_immediate=3,attached_node=1, must = 1},
  59. })
  60. end
  61. end