mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-23 06:32:25 +01:00
Default/mapgen: Disable nyancats in singlenode mapgen
This commit is contained in:
parent
83c2a88c91
commit
252dffce78
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user