Dirt path covers grass below
This commit is contained in:
parent
7fee79f884
commit
3d9496ec56
@ -243,7 +243,7 @@ minetest.register_abm( -- dirt and grass footsteps becomes dirt with grass if un
|
|||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
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 partialblock = minetest.get_item_group(name, "slab") ~= 0 or minetest.get_item_group(name, "stair") ~= 0
|
local partialblock = minetest.get_item_group(name, "path") ~= 0 or minetest.get_item_group(name, "slab") ~= 0 or minetest.get_item_group(name, "stair") ~= 0
|
||||||
local nodedef = minetest.registered_nodes[name]
|
local nodedef = minetest.registered_nodes[name]
|
||||||
if nodedef and (not partialblock) and (nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none" and (minetest.get_node_light(above) or 0) >= 8 then
|
if nodedef and (not partialblock) and (nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none" and (minetest.get_node_light(above) or 0) >= 8 then
|
||||||
minetest.set_node(pos, {name = "default:dirt_with_grass"})
|
minetest.set_node(pos, {name = "default:dirt_with_grass"})
|
||||||
@ -260,7 +260,7 @@ minetest.register_abm( -- dirt with grass becomes dirt if covered
|
|||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
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 partialblock = minetest.get_item_group(name, "slab") ~= 0 or minetest.get_item_group(name, "stair") ~= 0
|
local partialblock = minetest.get_item_group(name, "path") ~= 0 or minetest.get_item_group(name, "slab") ~= 0 or minetest.get_item_group(name, "stair") ~= 0
|
||||||
local nodedef = minetest.registered_nodes[name]
|
local nodedef = minetest.registered_nodes[name]
|
||||||
if name ~= "ignore" and nodedef and (partialblock) or (not ((nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none")) then
|
if name ~= "ignore" and nodedef and (partialblock) or (not ((nodedef.sunlight_propagates or nodedef.paramtype == "light") and nodedef.liquidtype == "none")) then
|
||||||
minetest.set_node(pos, {name = "default:dirt"})
|
minetest.set_node(pos, {name = "default:dirt"})
|
||||||
|
@ -309,7 +309,7 @@ minetest.register_node(
|
|||||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5-2/16, 0.5}
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5-2/16, 0.5}
|
||||||
},
|
},
|
||||||
tiles = {"default_dirt.png"},
|
tiles = {"default_dirt.png"},
|
||||||
groups = {crumbly = 3, fall_damage_add_percent = -10},
|
groups = {crumbly = 3, path = 1, fall_damage_add_percent = -10},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
})
|
})
|
||||||
@ -342,7 +342,7 @@ minetest.register_node(
|
|||||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5-2/16, 0.5}
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5-2/16, 0.5}
|
||||||
},
|
},
|
||||||
tiles = {"default_dirt.png"},
|
tiles = {"default_dirt.png"},
|
||||||
groups = {crumbly = 3, fall_damage_add_percent = -10},
|
groups = {crumbly = 3, path = 1, fall_damage_add_percent = -10},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user