forked from mtcontrib/minetest-mod-snow
Fix a couple of errors with first commit.
This commit is contained in:
parent
0a0a6e0fdb
commit
1aa4296680
@ -30,13 +30,13 @@ if maxp.y >= -10 then
|
|||||||
|
|
||||||
--Debugging function
|
--Debugging function
|
||||||
local biomeToString = function(num)
|
local biomeToString = function(num)
|
||||||
if num == 1 or num == 7 or num == 8 then return "normal"
|
if num == 1 or num == 7 or num == 8 or num == 4 then return "normal"
|
||||||
elseif num == 2 then return "icebergs"
|
elseif num == 2 then return "icebergs"
|
||||||
elseif num == 3 then return "icesheet"
|
elseif num == 3 then return "icesheet"
|
||||||
elseif num == 5 then return "icecave"
|
elseif num == 5 then return "icecave"
|
||||||
elseif num == 9 or num == 10 then return "cool"
|
elseif num == 9 or num == 10 then return "cool"
|
||||||
elseif num == 6 then return "icehole"
|
elseif num == 6 then return "icehole"
|
||||||
else return "unknown" end
|
else return "unknown "..num end
|
||||||
end
|
end
|
||||||
|
|
||||||
--Get map specific perlin
|
--Get map specific perlin
|
||||||
@ -62,7 +62,6 @@ if maxp.y >= -10 then
|
|||||||
local test = perlin1:get2d({x=x, y=z})
|
local test = perlin1:get2d({x=x, y=z})
|
||||||
if test > 0.53 then
|
if test > 0.53 then
|
||||||
|
|
||||||
|
|
||||||
-- Find ground level (0...15)
|
-- Find ground level (0...15)
|
||||||
local ground_y = nil
|
local ground_y = nil
|
||||||
for y=maxp.y,0,-1 do
|
for y=maxp.y,0,-1 do
|
||||||
@ -97,6 +96,8 @@ if maxp.y >= -10 then
|
|||||||
else
|
else
|
||||||
env:add_node({x=x,y=ground_y,z=z}, {name="snow:ice"})
|
env:add_node({x=x,y=ground_y,z=z}, {name="snow:ice"})
|
||||||
end
|
end
|
||||||
|
elseif ground_y and env:get_node({x=x,y=ground_y,z=z}).name == "default:leaves" then
|
||||||
|
env:add_node({x=x,y=ground_y+1,z=z}, {name="snow:snow"})
|
||||||
elseif ground_y and node.name == "default:water_source" then
|
elseif ground_y and node.name == "default:water_source" then
|
||||||
if not icesheet and not icecave and not icehole then
|
if not icesheet and not icecave and not icehole then
|
||||||
--Coastal ice.
|
--Coastal ice.
|
||||||
|
Loading…
Reference in New Issue
Block a user