Skip to content

Commit

Permalink
Default/mapgen: Disable nyancats in singlenode mapgen
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed Jul 27, 2015
1 parent 83c2a88 commit 252dffc
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions mods/default/mapgen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
--


Expand Down Expand Up @@ -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.