mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 22:33:16 -04:00
fix dirt
This commit is contained in:
parent
93d99667d9
commit
bc8263fdf3
1 changed files with 7 additions and 4 deletions
|
@ -142,6 +142,7 @@ 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 (name == "ignore" or not nodedef) then return end
|
||||||
if ( not ((nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none")) then return end
|
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"
|
||||||
|
@ -163,8 +164,8 @@ 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 (name ~= "ignore" and nodedef
|
if (name == "ignore" or not nodedef) then return end
|
||||||
and not ((nodedef.sunlight_propagates or nodedef.paramtype == "light")
|
if ( not ((nodedef.sunlight_propagates or nodedef.paramtype == "light")
|
||||||
and nodedef.liquidtype == "none")) or (weather
|
and nodedef.liquidtype == "none")) or (weather
|
||||||
and (minetest.get_heat(pos) < -5 or minetest.get_heat(pos) > 60))
|
and (minetest.get_heat(pos) < -5 or minetest.get_heat(pos) > 60))
|
||||||
or name == "default:snow" or name == "default:snowblock" or name == "default:ice"
|
or name == "default:snow" or name == "default:snowblock" or name == "default:ice"
|
||||||
|
@ -182,8 +183,10 @@ 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 (name ~= "ignore" and nodedef and (nodedef.liquidtype ~= "none" or
|
if (name == "ignore" or not nodedef) then return end
|
||||||
(weather and minetest.get_heat(pos) > 3 and name ~= "default:snow" and name ~= "default:snowblock" and name ~= "default:ice")))
|
if (not ((nodedef.sunlight_propagates or nodedef.paramtype == "light")
|
||||||
|
and nodedef.liquidtype == "none") or
|
||||||
|
(weather and minetest.get_heat(pos) > 3 and name ~= "default:snow" and name ~= "default:snowblock" and name ~= "default:ice"))
|
||||||
then
|
then
|
||||||
minetest.set_node(pos, {name = "default:dirt"})
|
minetest.set_node(pos, {name = "default:dirt"})
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue