Default/mapgen: Make register function selection compatible with future mapgens
authorparamat <mat.gregory@virginmedia.com>
Mon, 11 May 2015 04:15:52 +0000 (05:15 +0100)
committerparamat <mat.gregory@virginmedia.com>
Mon, 11 May 2015 04:37:04 +0000 (05:37 +0100)
mods/default/mapgen.lua

index 1766ad83c7f34d04f7abc1393e1c8ada79bd801c..18c523174ba6990e7d73d6df0880fb2482cc6158 100644 (file)
@@ -640,14 +640,10 @@ end
 -- the use of minetest.generate_ores or minetest.generate_decorations
 
 local mg_params = minetest.get_mapgen_params()
-if mg_params.mgname == "v5" then
-       default.register_ores()
-       default.register_biomes()
-       default.register_decorations()
-elseif mg_params.mgname == "v6" then
+if mg_params.mgname == "v6" then
        default.register_ores()
        default.register_mgv6_decorations()
-elseif mg_params.mgname == "v7" then
+elseif mg_params.mgname ~= "singlenode" then
        default.register_ores()
        default.register_biomes()
        default.register_decorations()