init.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. -- Nature Classic mod
  2. -- Originally by neko259
  3. -- Nature is slowly capturing the world!
  4. local current_mod_name = minetest.get_current_modname()
  5. nature = {}
  6. -- support for i18n
  7. local S = minetest.get_translator("nature_classic")
  8. nature.blossomqueue = {}
  9. nature.blossomqueue_max = 1000
  10. nature.blossom_decay = 2
  11. nature.blossom_trunk = "default:tree"
  12. nature.blossom_node = "nature:blossom"
  13. nature.blossom_leaves = "default:leaves"
  14. nature.blossom_textures = { "default_leaves.png^nature_blossom.png" }
  15. nature.blossom_groups = { snappy = 3, leafdecay = 1, leaves = 1, flammable = 2 }
  16. if minetest.get_modpath("moretrees") then
  17. nature.blossom_decay = moretrees.leafdecay_radius
  18. nature.blossom_trunk = "moretrees:apple_tree_trunk"
  19. nature.blossom_node = "moretrees:apple_blossoms"
  20. nature.blossom_leaves = "moretrees:apple_tree_leaves"
  21. nature.blossom_textures = { "moretrees_apple_tree_leaves.png^nature_blossom.png" }
  22. nature.blossom_groups = { snappy = 3, leafdecay = 1, leaves = 1, flammable = 2, moretrees_leaves = 1 },
  23. minetest.register_alias("nature:blossom", "default:leaves")
  24. end
  25. nature.leaves_blossom_chance = 15
  26. nature.blossom_leaves_chance = 5
  27. nature.blossom_delay = 3600
  28. nature.apple_delay = 3600
  29. nature.apple_chance = 10
  30. nature.apple_spread = 2
  31. nature.meta_blossom_time = "blossom_time"
  32. nature.blossom_duration = nature.blossom_delay
  33. function dumppos(pos)
  34. return "("..pos.x..","..pos.y..","..pos.z..")"
  35. end
  36. dofile(minetest.get_modpath(current_mod_name) .. "/config.lua")
  37. dofile(minetest.get_modpath(current_mod_name) .. "/global_function.lua")
  38. dofile(minetest.get_modpath(current_mod_name) .. "/blossom.lua")
  39. minetest.log("info", S("[Nature Classic] loaded!"))