mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 22:33:16 -04:00
dirtfix
This commit is contained in:
parent
2386003508
commit
93d99667d9
1 changed files with 2 additions and 3 deletions
|
@ -142,13 +142,12 @@ minetest.register_abm({
|
||||||
local above = {x=pos.x, y=pos.y+1, z=pos.z}
|
local above = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||||
local name = minetest.get_node(above).name
|
local name = minetest.get_node(above).name
|
||||||
local nodedef = minetest.registered_nodes[name]
|
local nodedef = minetest.registered_nodes[name]
|
||||||
|
if ( not ((nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none")) then return end
|
||||||
if (weather and minetest.get_heat(pos) < -15) or name == "default:snow" or
|
if (weather and minetest.get_heat(pos) < -15) or name == "default:snow" or
|
||||||
name == "default:snowblock" or name == "default:ice"
|
name == "default:snowblock" or name == "default:ice"
|
||||||
then
|
then
|
||||||
minetest.set_node(pos, {name = "default:dirt_with_snow"})
|
minetest.set_node(pos, {name = "default:dirt_with_snow"})
|
||||||
elseif (not weather or minetest.get_heat(pos) > 5) and
|
elseif (not weather or minetest.get_heat(pos) > 5) and nodedef and
|
||||||
nodedef and (nodedef.sunlight_propagates or nodedef.paramtype == "light") and
|
|
||||||
nodedef.liquidtype == "none" and
|
|
||||||
(minetest.get_node_light(above) or 0) >= 13
|
(minetest.get_node_light(above) or 0) >= 13
|
||||||
then
|
then
|
||||||
minetest.set_node(pos, {name = "default:dirt_with_grass"})
|
minetest.set_node(pos, {name = "default:dirt_with_grass"})
|
||||||
|
|
Loading…
Add table
Reference in a new issue