From: paramat Date: Wed, 6 Jul 2016 16:14:39 +0000 (+0100) Subject: Default, flowers: Use 'get_mapgen_setting()' X-Git-Tag: 0.4.15~148 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f17d7911737ea553fa63aeaafa9ef5b7a60d608d;p=oweals%2Fminetest_game.git Default, flowers: Use 'get_mapgen_setting()' --- diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua index 89ded047..7d0b0fd4 100644 --- a/mods/default/mapgen.lua +++ b/mods/default/mapgen.lua @@ -1523,12 +1523,12 @@ end -- Mods using singlenode mapgen can call these functions to enable -- the use of minetest.generate_ores or minetest.generate_decorations -local mg_params = minetest.get_mapgen_params() -if mg_params.mgname == "v6" then +local mg_name = minetest.get_mapgen_setting("mg_name") +if mg_name == "v6" then default.register_ores() default.register_mgv6_decorations() minetest.register_on_generated(default.generate_nyancats) -elseif mg_params.mgname ~= "singlenode" then +elseif mg_name ~= "singlenode" then default.register_biomes() default.register_ores() default.register_decorations() diff --git a/mods/flowers/mapgen.lua b/mods/flowers/mapgen.lua index 59ce97a3..162b11db 100644 --- a/mods/flowers/mapgen.lua +++ b/mods/flowers/mapgen.lua @@ -165,9 +165,9 @@ end -- Mods using singlenode mapgen can call these functions to enable -- the use of minetest.generate_ores or minetest.generate_decorations -local mg_params = minetest.get_mapgen_params() -if mg_params.mgname == "v6" then +local mg_name = minetest.get_mapgen_setting("mg_name") +if mg_name == "v6" then flowers.register_mgv6_decorations() -elseif mg_params.mgname ~= "singlenode" then +elseif mg_name ~= "singlenode" then flowers.register_decorations() end