init.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. dryleaves = dryleaves or {}
  2. dryleaves.modpath = minetest.get_modpath("dryleaves")
  3. dryleaves.list = {
  4. "dryleaves:leaves",
  5. "dryleaves:jungleleaves",
  6. "dryleaves:dry_leaves",
  7. "dryleaves:plantlike",
  8. }
  9. reload.register_file("dryleaves:core", dryleaves.modpath .. "/functions.lua", true)
  10. minetest.register_node("dryleaves:leaves", {
  11. description = "Dry Leaves",
  12. drawtype = "plantlike",
  13. waving = 1,
  14. visual_scale = 1.4,
  15. walkable = false,
  16. tiles = {"dryleaves_leaves.png"},
  17. paramtype = "light",
  18. groups = utility.dig_groups("leaves", {leafdecay = 3, flammable = 3, leaves = 1, dry_leaves = 1}),
  19. sounds = default.node_sound_leaves_defaults(),
  20. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  21. on_construct = enhanced_leafdecay.make_leaf_constructor({}),
  22. on_timer = enhanced_leafdecay.make_leaf_nodetimer({}),
  23. })
  24. minetest.register_node("dryleaves:jungleleaves", {
  25. description = "Dry Leaves",
  26. drawtype = "plantlike",
  27. waving = 1,
  28. visual_scale = 1.4,
  29. walkable = false,
  30. tiles = {"dryleaves_jungleleaves.png"},
  31. paramtype = "light",
  32. groups = utility.dig_groups("leaves", {leafdecay = 3, flammable = 3, leaves = 1, dry_leaves = 1}),
  33. sounds = default.node_sound_leaves_defaults(),
  34. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  35. on_construct = enhanced_leafdecay.make_leaf_constructor({}),
  36. on_timer = enhanced_leafdecay.make_leaf_nodetimer({}),
  37. })
  38. minetest.register_node("dryleaves:dry_leaves", {
  39. description = "Dry Leaves",
  40. drawtype = "plantlike",
  41. waving = 1,
  42. visual_scale = 1.4,
  43. walkable = false,
  44. tiles = {"darkage_dry_leaves.png"},
  45. paramtype = "light",
  46. groups = utility.dig_groups("leaves", {leafdecay = 3, flammable = 3, leaves = 1, dry_leaves = 1}),
  47. sounds = default.node_sound_leaves_defaults(),
  48. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  49. on_construct = enhanced_leafdecay.make_leaf_constructor({}),
  50. on_timer = enhanced_leafdecay.make_leaf_nodetimer({}),
  51. })
  52. minetest.register_node("dryleaves:plantlike", {
  53. description = "Dry Leaves",
  54. drawtype = "plantlike",
  55. waving = 1,
  56. visual_scale = 1.4,
  57. walkable = false,
  58. tiles = {"default_leaves_plantlike.png"},
  59. paramtype = "light",
  60. groups = utility.dig_groups("leaves", {leafdecay = 3, flammable = 3, leaves = 1, dry_leaves = 1}),
  61. sounds = default.node_sound_leaves_defaults(),
  62. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  63. on_construct = enhanced_leafdecay.make_leaf_constructor({}),
  64. on_timer = enhanced_leafdecay.make_leaf_nodetimer({}),
  65. })
  66. -- All leaf variants are present in Channelwood (generated by mapgen).