Door duplication bug solved and more oxidation
parent
f83d1b18cd
commit
ff23d46125
|
@ -9,13 +9,13 @@ minetest.register_abm({
|
|||
if def.groups.door == 1 then
|
||||
if node.name:find("_b_") then
|
||||
local top_pos = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||
minetest.set_node(top_pos, { name = def._mcl_oxidized_variant:gsub("_b_", "_t_"), param2 = node.param2 })
|
||||
minetest.swap_node(top_pos, { name = def._mcl_oxidized_variant:gsub("_b_", "_t_"), param2 = node.param2 })
|
||||
elseif node.name:find("_t_") then
|
||||
local bot_pos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
||||
minetest.set_node(bot_pos, { name = def._mcl_oxidized_variant:gsub("_t_", "_b_"), param2 = node.param2 })
|
||||
minetest.swap_node(bot_pos, { name = def._mcl_oxidized_variant:gsub("_t_", "_b_"), param2 = node.param2 })
|
||||
end
|
||||
end
|
||||
minetest.set_node(pos, { name = def._mcl_oxidized_variant, param2 = node.param2 })
|
||||
minetest.swap_node(pos, { name = def._mcl_oxidized_variant, param2 = node.param2 })
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -31,6 +31,16 @@ function mcl_copper.register_oxidation_and_scraping(mod_name, subname, decay_cha
|
|||
minetest.override_item(oxidized_item.."_b_2", {_mcl_stripped_variant = item.."_b_2"})
|
||||
minetest.override_item(item.."_t_2", {_mcl_oxidized_variant = oxidized_item.."_t_2"})
|
||||
minetest.override_item(oxidized_item.."_t_2", {_mcl_stripped_variant = item.."_t_2"})
|
||||
|
||||
minetest.override_item(item.."_b_3", {_mcl_oxidized_variant = oxidized_item.."_b_3"})
|
||||
minetest.override_item(oxidized_item.."_b_3", {_mcl_stripped_variant = item.."_b_3"})
|
||||
minetest.override_item(item.."_t_3", {_mcl_oxidized_variant = oxidized_item.."_t_3"})
|
||||
minetest.override_item(oxidized_item.."_t_3", {_mcl_stripped_variant = item.."_t_3"})
|
||||
|
||||
minetest.override_item(item.."_b_4", {_mcl_oxidized_variant = oxidized_item.."_b_4"})
|
||||
minetest.override_item(oxidized_item.."_b_4", {_mcl_stripped_variant = item.."_b_4"})
|
||||
minetest.override_item(item.."_t_4", {_mcl_oxidized_variant = oxidized_item.."_t_4"})
|
||||
minetest.override_item(oxidized_item.."_t_4", {_mcl_stripped_variant = item.."_t_4"})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -68,6 +78,16 @@ function mcl_copper.register_waxing_and_scraping(mod_name, subname, decay_chain)
|
|||
minetest.override_item(unwaxed_item.."_b_2", {_mcl_waxed_variant = waxed_item.."_b_2"})
|
||||
minetest.override_item(waxed_item.."_t_2", {_mcl_stripped_variant = unwaxed_item.."_t_2"})
|
||||
minetest.override_item(unwaxed_item.."_t_2", {_mcl_waxed_variant = waxed_item.."_t_2"})
|
||||
|
||||
minetest.override_item(waxed_item.."_b_3", {_mcl_stripped_variant = unwaxed_item.."_b_3"})
|
||||
minetest.override_item(unwaxed_item.."_b_3", {_mcl_waxed_variant = waxed_item.."_b_3"})
|
||||
minetest.override_item(waxed_item.."_t_3", {_mcl_stripped_variant = unwaxed_item.."_t_3"})
|
||||
minetest.override_item(unwaxed_item.."_t_3", {_mcl_waxed_variant = waxed_item.."_t_3"})
|
||||
|
||||
minetest.override_item(waxed_item.."_b_4", {_mcl_stripped_variant = unwaxed_item.."_b_4"})
|
||||
minetest.override_item(unwaxed_item.."_b_4", {_mcl_waxed_variant = waxed_item.."_b_4"})
|
||||
minetest.override_item(waxed_item.."_t_4", {_mcl_stripped_variant = unwaxed_item.."_t_4"})
|
||||
minetest.override_item(unwaxed_item.."_t_4", {_mcl_waxed_variant = waxed_item.."_t_4"})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue