biomes.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. local modname = minetest.get_current_modname()
  2. local modpath = minetest.get_modpath(modname)
  3. local S = minetest.get_translator("eg_mapgen")
  4. -- Register biomes
  5. -- Grassland biome stack
  6. -- A 'biome stack' is a vertical stack of biomes all having the same heat and
  7. -- humidity points, and therefore all having the same horizontal distribution.
  8. -- In minipeli only one biome stack is registered, more will probably be
  9. -- desired for a developed game.
  10. -- Dry land from beach top to world top
  11. minetest.register_biome({
  12. name = "grassland",
  13. node_top = modname .. ":grass",
  14. depth_top = 1,
  15. node_filler = modname .. ":dirt",
  16. depth_filler = 1,
  17. node_riverbed = modname .. ":sand",
  18. depth_riverbed = 2,
  19. node_cave_liquid = modname .. ":water_source",
  20. node_dungeon = modname .. ":stone_block",
  21. node_dungeon_stair = modname .. ":stone_block_stair",
  22. y_max = 31000,
  23. y_min = 4,
  24. heat_point = 50,
  25. humidity_point = 50,
  26. })
  27. -- The sand of beaches and seabeds
  28. minetest.register_biome({
  29. name = "grassland_sea",
  30. node_top = modname .. ":sand",
  31. depth_top = 1,
  32. node_filler = modname .. ":sand",
  33. depth_filler = 2,
  34. node_riverbed = modname .. ":sand",
  35. depth_riverbed = 2,
  36. node_cave_liquid = modname .. ":water_source",
  37. node_dungeon = modname .. ":stone_block",
  38. node_dungeon_stair = modname .. ":stone_block_stair",
  39. vertical_blend = 1,
  40. y_max = 3,
  41. y_min = -127,
  42. heat_point = 50,
  43. humidity_point = 50,
  44. })
  45. -- Shallow underground
  46. minetest.register_biome({
  47. name = "grassland_under",
  48. node_cave_liquid = modname .. ":water_source",
  49. node_dungeon = modname .. ":stone_block",
  50. node_dungeon_stair = modname .. ":stone_block_stair",
  51. y_max = -128,
  52. y_min = -1023,
  53. heat_point = 50,
  54. humidity_point = 50,
  55. })
  56. -- Deep underground where magma first appears
  57. minetest.register_biome({
  58. name = "grassland_deep",
  59. node_cave_liquid = {modname .. ":water_source", modname .. ":magma_source"},
  60. node_dungeon = modname .. ":stone_block",
  61. node_dungeon_stair = modname .. ":stone_block_stair",
  62. y_max = -512,
  63. y_min = -31000,
  64. heat_point = 60,
  65. humidity_point = 50,
  66. })