space_asteroids.lua 1.2 KB

123456789101112131415161718192021222324252627
  1. if otherworlds.settings.space_asteroids.enable then
  2. -- Approximate realm limits
  3. local YMIN = otherworlds.settings.space_asteroids.YMIN or 5000
  4. local YMAX = otherworlds.settings.space_asteroids.YMAX or 6000
  5. -- Register on_generated function for this layer
  6. minetest.register_on_generated(otherworlds.asteroids.create_on_generated(YMIN, YMAX, {
  7. c_air = minetest.get_content_id("air"),
  8. c_obsidian = minetest.get_content_id("default:obsidian"),
  9. c_stone = minetest.get_content_id("asteroid:stone"),
  10. c_cobble = minetest.get_content_id("asteroid:cobble"),
  11. c_gravel = minetest.get_content_id("asteroid:gravel"),
  12. c_dust = minetest.get_content_id("asteroid:dust"),
  13. c_ironore = minetest.get_content_id("default:stone_with_iron"),
  14. c_copperore = minetest.get_content_id("default:stone_with_copper"),
  15. c_goldore = minetest.get_content_id("default:stone_with_gold"),
  16. c_diamondore = minetest.get_content_id("default:stone_with_diamond"),
  17. c_meseore = minetest.get_content_id("default:stone_with_mese"),
  18. c_waterice = minetest.get_content_id("default:ice"),
  19. c_atmos = minetest.get_content_id("asteroid:atmos"),
  20. c_snowblock = minetest.get_content_id("default:snowblock"),
  21. }))
  22. end