Top layer: small fixes

master
Gael-de-Sailly 2018-02-28 19:38:42 +01:00
parent c47e29a01c
commit 923ffde573
2 changed files with 5 additions and 5 deletions

View File

@ -216,8 +216,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
local nfiller, ntop = 3, 1
local node_deco
if biomes and h >= 0 then
nbiome = value(biomemap, nchunk, npx)
biome = biome_list[nbiome]
local nbiome = value(biomemap, nchunk, npx)
local biome = biome_list[nbiome]
if biome then
stone = biome.stone
filler = biome.filler
@ -246,10 +246,10 @@ minetest.register_on_generated(function(minp, maxp, seed)
local filler_min = math.max(stone_max+1, minp.y)
local filler_max = math.min(h-ntop, maxp.y)
local top_min = math.max(filler_max+1, minp.y)
local top_max = h
local top_max = math.min(h, maxp.y)
if river_here then
top_max = h-1
top_max = math.min(h-1, maxp.y)
end
if stone_min <= stone_max then

View File

@ -57,7 +57,7 @@ for _, biome_raw in ipairs(biomelist) do
if top and #top > 0 then
top = top:split("%s", false, 1, true)
biome.top = id(top[1])
biome.top_depth = tonumber(fill[2] or 1)
biome.top_depth = tonumber(top[2] or 1)
else
biome.top_depth = 0
end