Skip to content

Commit

Permalink
Biome registration: Update due to revert of mgv7 'biomerepeat' option
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed Sep 17, 2017
1 parent bf8404f commit 4ccafd1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions mods/default/mapgen.lua
Expand Up @@ -1445,7 +1445,6 @@ end


-- Biomes for floatlands
-- Used when mgv7 'biomerepeat' flag is false

-- TODO Temporary simple biomes to be replaced by special floatland biomes later.

Expand Down Expand Up @@ -2018,10 +2017,9 @@ end

-- Get setting or default
local mgv7_spflags = minetest.get_mapgen_setting("mgv7_spflags") or
"mountains, ridges, nofloatlands, caverns, biomerepeat"
"mountains, ridges, nofloatlands, caverns"
local captures_float = string.match(mgv7_spflags, "floatlands")
local captures_nofloat = string.match(mgv7_spflags, "nofloatlands")
local captures_nobiorep = string.match(mgv7_spflags, "nobiomerepeat")

-- Get setting or default
-- Make global for mods to use to register floatland biomes
Expand All @@ -2039,12 +2037,11 @@ local mg_name = minetest.get_mapgen_setting("mg_name")
if mg_name == "v6" then
default.register_mgv6_ores()
default.register_mgv6_decorations()
-- Need to check for 'nofloatlands' because that contains
-- 'floatlands' which makes the second condition true.
elseif mg_name == "v7" and
captures_float == "floatlands" and
-- Need to check for 'nofloatlands' because that contains
-- 'floatlands' which makes the second condition true.
captures_nofloat ~= "nofloatlands" and
captures_nobiorep == "nobiomerepeat" then
captures_nofloat ~= "nofloatlands" then
-- Mgv7 with floatlands and floatland biomes
default.register_biomes(default.mgv7_shadow_limit - 1)
default.register_floatland_biomes(
Expand Down

0 comments on commit 4ccafd1

Please sign in to comment.