intermod.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. local S = maple.get_translator
  2. -- integration with bonemeal
  3. if minetest.get_modpath("bonemeal") then
  4. bonemeal:add_sapling(
  5. {
  6. {"maple:maple_sapling", maple.grow_sapling, "soil"}
  7. }
  8. )
  9. end
  10. -- derivative blocks (stairs / microblocks / etc)
  11. if stairs and stairs.mod and stairs.mod == "redo" then
  12. stairs.register_all(
  13. "maple_wood",
  14. "maple:maple_wood",
  15. {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
  16. {"maple_wood.png"},
  17. S("Maple Wood Stair"),
  18. S("Maple Wood Slab"),
  19. default.node_sound_wood_defaults()
  20. )
  21. stairs.register_all(
  22. "maple_tree",
  23. "maple:maple_tree",
  24. {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
  25. {"maple_tree_top.png", "maple_tree_top.png", "maple_tree.png"},
  26. S("Maple Trunk Stair"),
  27. S("Maple Trunk Slab"),
  28. default.node_sound_wood_defaults()
  29. )
  30. elseif minetest.global_exists("stairsplus") then
  31. stairsplus:register_all(
  32. "maple",
  33. "maple_wood",
  34. "maple:maple_wood",
  35. {
  36. description = S("Maple Wood"),
  37. tiles = {"maple_wood.png"},
  38. groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
  39. sounds = default.node_sound_wood_defaults()
  40. }
  41. )
  42. stairsplus:register_all(
  43. "maple",
  44. "maple_tree",
  45. "maple:maple_tree",
  46. {
  47. description = S("Maple Trunk"),
  48. tiles = {"maple_tree_top.png", "maple_tree_top.png", "maple_tree.png"},
  49. groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
  50. sounds = default.node_sound_wood_defaults()
  51. }
  52. )
  53. else
  54. stairs.register_stair_and_slab(
  55. "maple_wood",
  56. "maple:maple_wood",
  57. {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
  58. {"maple_wood.png"},
  59. S("Maple Stair"),
  60. S("Maple Slab"),
  61. default.node_sound_wood_defaults()
  62. )
  63. stairs.register_stair_and_slab(
  64. "maple_tree",
  65. "maple:maple_tree",
  66. {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
  67. {"maple_tree_top.png", "maple_tree_top.png", "maple_tree.png"},
  68. S("Maple Trunk Stair"),
  69. S("Maple Trunk Slab"),
  70. default.node_sound_wood_defaults()
  71. )
  72. end
  73. if doors then
  74. doors.register_fencegate(
  75. "maple:gate_maple_wood",
  76. {
  77. description = S("Maple Wood Fence Gate"),
  78. texture = "maple_wood.png",
  79. material = "maple:maple_wood",
  80. groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
  81. sounds = default.node_sound_wood_defaults()
  82. }
  83. )
  84. end
  85. -- registering the wood type with drawers mod
  86. if minetest.get_modpath("drawers") and default then
  87. drawers.register_drawer(
  88. "maple:maple_drawerk",
  89. {
  90. description = S("Maple Drawers"),
  91. tiles1 = drawers.node_tiles_front_other("drawers_maple_wood_front_1.png", "drawers_maple_wood.png"),
  92. tiles2 = drawers.node_tiles_front_other("drawers_maple_wood_front_2.png", "drawers_maple_wood.png"),
  93. tiles4 = drawers.node_tiles_front_other("drawers_maple_wood_front_4.png", "drawers_maple_wood.png"),
  94. groups = {choppy = 3, oddly_breakable_by_hand = 2},
  95. sounds = drawers.WOOD_SOUNDS,
  96. drawer_stack_max_factor = 4 * 8, -- normal chest size
  97. material = "maple:maple_wood"
  98. }
  99. )
  100. end
  101. -- procedurally-generated arcs
  102. if minetest.get_modpath("pkarcs") then
  103. pkarcs.register_node("maple:maple_wood")
  104. end