Fix door param2 change when scrapping or waxing
parent
ff23d46125
commit
787ef17925
|
@ -20,10 +20,10 @@ function mcl_honey.wax_block(pos, node, player, itemstack, pointed_thing)
|
||||||
if def.groups.door == 1 then
|
if def.groups.door == 1 then
|
||||||
if node.name:find("_b_") then
|
if node.name:find("_b_") then
|
||||||
local top_pos = { x = pos.x, y = pos.y + 1, z = pos.z }
|
local top_pos = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||||
minetest.swap_node(top_pos, { name = def._mcl_waxed_variant:gsub("_b_", "_t_") })
|
minetest.swap_node(top_pos, { name = def._mcl_waxed_variant:gsub("_b_", "_t_"), param2 = node.param2 })
|
||||||
elseif node.name:find("_t_") then
|
elseif node.name:find("_t_") then
|
||||||
local bot_pos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
local bot_pos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
||||||
minetest.swap_node(bot_pos, { name = def._mcl_waxed_variant:gsub("_t_", "_b_") })
|
minetest.swap_node(bot_pos, { name = def._mcl_waxed_variant:gsub("_t_", "_b_"), param2 = node.param2 })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
|
@ -414,10 +414,10 @@ local function make_stripped_trunk(itemstack, placer, pointed_thing)
|
||||||
local pt_under = pointed_thing.under
|
local pt_under = pointed_thing.under
|
||||||
if node_name:find("_b_") then
|
if node_name:find("_b_") then
|
||||||
local top_pos = {x = pt_under.x, y = pt_under.y + 1, z = pt_under.z}
|
local top_pos = {x = pt_under.x, y = pt_under.y + 1, z = pt_under.z}
|
||||||
minetest.swap_node(top_pos, {name=noddef._mcl_stripped_variant:gsub("_b_", "_t_")})
|
minetest.swap_node(top_pos, {name=noddef._mcl_stripped_variant:gsub("_b_", "_t_"), param2=node.param2})
|
||||||
elseif node_name:find("_t_") then
|
elseif node_name:find("_t_") then
|
||||||
local bot_pos = {x = pt_under.x, y = pt_under.y - 1, z = pt_under.z}
|
local bot_pos = {x = pt_under.x, y = pt_under.y - 1, z = pt_under.z}
|
||||||
minetest.swap_node(bot_pos, {name=noddef._mcl_stripped_variant:gsub("_t_", "_b_")})
|
minetest.swap_node(bot_pos, {name=noddef._mcl_stripped_variant:gsub("_t_", "_b_"), param2=node.param2})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
minetest.swap_node(pointed_thing.under, {name=noddef._mcl_stripped_variant, param2=node.param2})
|
minetest.swap_node(pointed_thing.under, {name=noddef._mcl_stripped_variant, param2=node.param2})
|
||||||
|
|
Loading…
Reference in New Issue