1
0
Fork 0

Door duplication bug solved and more oxidation

copper-adaptation-refs-recovery
JoseDouglas26 2024-02-16 15:32:25 -03:00
parent f83d1b18cd
commit ff23d46125
2 changed files with 23 additions and 3 deletions

View File

@ -9,13 +9,13 @@ minetest.register_abm({
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.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 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.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
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
end, end,
}) })

View File

@ -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(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(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(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 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(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(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(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 end
end end