Default/mapgen: Disable nyancats in singlenode mapgen

This commit is contained in:
paramat 2015-07-26 23:08:47 +01:00
parent 83c2a88c91
commit 252dffce78

View File

@ -635,26 +635,7 @@ end
-- --
-- Detect mapgen to select functions -- Generate nyan cats
--
-- 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
default.register_ores()
default.register_mgv6_decorations()
elseif mg_params.mgname ~= "singlenode" then
default.register_ores()
default.register_biomes()
default.register_decorations()
end
--
-- Generate nyan cats in all mapgens
-- --
@ -708,4 +689,23 @@ function default.generate_nyancats(minp, maxp, seed)
end end
minetest.register_on_generated(default.generate_nyancats) --
-- Detect mapgen to select functions
--
-- 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
default.register_ores()
default.register_mgv6_decorations()
minetest.register_on_generated(default.generate_nyancats)
elseif mg_params.mgname ~= "singlenode" then
default.register_ores()
default.register_biomes()
default.register_decorations()
minetest.register_on_generated(default.generate_nyancats)
end