Skip to content
Permalink
Browse files
Default/mapgen: Disable nyancats in singlenode mapgen
  • Loading branch information
paramat committed Jul 27, 2015
1 parent 83c2a88 commit 252dffce78084bc2e0c23222f3fd646256b28512
Showing 1 changed file with 21 additions and 21 deletions.
@@ -635,26 +635,7 @@ end


--
-- 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()
elseif mg_params.mgname ~= "singlenode" then
default.register_ores()
default.register_biomes()
default.register_decorations()
end


--
-- Generate nyan cats in all mapgens
-- Generate nyan cats
--


@@ -708,4 +689,23 @@ function default.generate_nyancats(minp, maxp, seed)
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

0 comments on commit 252dffc

Please sign in to comment.