2023-02-15 22:55:41 +03:00
|
|
|
local stair_oxidization = {
|
|
|
|
{ "cut", "exposed_cut" },
|
|
|
|
{ "cut_inner", "exposed_cut_inner" },
|
|
|
|
{ "cut_outer", "exposed_cut_outer" },
|
|
|
|
{ "exposed_cut", "weathered_cut" },
|
|
|
|
{ "exposed_cut_inner", "weathered_cut_inner" },
|
|
|
|
{ "exposed_cut_outer", "weathered_cut_outer" },
|
|
|
|
{ "weathered_cut", "oxidized_cut" },
|
|
|
|
{ "weathered_cut_inner", "oxidized_cut_inner" },
|
|
|
|
{ "weathered_cut_outer", "oxidized_cut_outer" }
|
2022-05-01 04:11:51 +03:00
|
|
|
}
|
|
|
|
|
2023-02-15 21:41:43 +03:00
|
|
|
local slab_oxidization = {
|
2023-02-15 22:55:41 +03:00
|
|
|
{ "cut", "exposed_cut" },
|
|
|
|
{ "cut_top", "exposed_cut_top" },
|
|
|
|
{ "cut_double", "exposed_cut_double" },
|
|
|
|
{ "exposed_cut", "weathered_cut" },
|
|
|
|
{ "exposed_cut_top", "weathered_cut_top" },
|
|
|
|
{ "exposed_cut_double", "weathered_cut_double" },
|
|
|
|
{ "weathered_cut", "oxidized_cut" },
|
|
|
|
{ "weathered_cut_top", "oxidized_cut_double" },
|
|
|
|
{ "weathered_cut_double", "oxidized_cut_double" },
|
2023-02-15 21:41:43 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
local def
|
|
|
|
local def_variant_oxidized
|
|
|
|
local def_variant_waxed
|
2023-02-15 21:59:39 +03:00
|
|
|
local def_variant_scraped
|
2023-02-15 21:41:43 +03:00
|
|
|
|
2023-02-15 22:55:41 +03:00
|
|
|
-- set up oxidized and waxed variants.
|
|
|
|
for i = 1, #stair_oxidization do
|
|
|
|
-- stairs
|
|
|
|
def = "mcl_stairs:stair_copper_" .. stair_oxidization[i][1]
|
|
|
|
def_variant_oxidized = "mcl_stairs:stair_copper_" .. stair_oxidization[i][2]
|
2023-02-15 21:41:43 +03:00
|
|
|
minetest.override_item(def, { _mcl_oxidized_variant = def_variant_oxidized })
|
|
|
|
|
2023-05-20 18:59:28 +03:00
|
|
|
def_variant_waxed = "mcl_stairs:stair_waxed_copper_" .. stair_oxidization[i][1]
|
2023-02-15 22:55:41 +03:00
|
|
|
minetest.override_item(def, { _mcl_waxed_variant = def_variant_waxed })
|
|
|
|
|
|
|
|
-- slabs
|
|
|
|
def = "mcl_stairs:slab_copper_" .. slab_oxidization[i][1]
|
|
|
|
def_variant_oxidized = "mcl_stairs:slab_copper_" .. slab_oxidization[i][2]
|
2023-02-15 21:41:43 +03:00
|
|
|
minetest.override_item(def, { _mcl_oxidized_variant = def_variant_oxidized })
|
|
|
|
|
2023-02-15 22:55:41 +03:00
|
|
|
def_variant_waxed = "mcl_stairs:slab_waxed_copper_" .. slab_oxidization[i][1]
|
|
|
|
minetest.override_item(def, { _mcl_waxed_variant = def_variant_waxed })
|
2022-05-01 04:11:51 +03:00
|
|
|
end
|
2023-02-15 21:59:39 +03:00
|
|
|
|
|
|
|
-- Set up scraped variants.
|
2023-02-15 22:55:41 +03:00
|
|
|
for i = 1, #stair_oxidization do
|
|
|
|
-- does both stairs and slabs.
|
2023-02-15 21:59:39 +03:00
|
|
|
if i > 3 then
|
2023-02-15 22:55:41 +03:00
|
|
|
def = "mcl_stairs:stair_copper_" .. stair_oxidization[i][1]
|
|
|
|
def_variant_scraped = "mcl_stairs:stair_copper_" .. stair_oxidization[i - 3][1]
|
2023-02-15 21:59:39 +03:00
|
|
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
2023-02-15 22:55:41 +03:00
|
|
|
|
|
|
|
def = "mcl_stairs:slab_copper_" .. slab_oxidization[i][1]
|
|
|
|
def_variant_scraped = "mcl_stairs:slab_copper_" .. slab_oxidization[i - 3][1]
|
2023-02-15 21:59:39 +03:00
|
|
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
|
|
|
end
|
2023-02-15 22:55:41 +03:00
|
|
|
if i > 6 then
|
|
|
|
def = "mcl_stairs:stair_copper_" .. stair_oxidization[i][2]
|
|
|
|
def_variant_scraped = "mcl_stairs:stair_copper_" .. stair_oxidization[i][1]
|
2023-02-15 21:59:39 +03:00
|
|
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
2023-02-15 22:55:41 +03:00
|
|
|
|
|
|
|
def = "mcl_stairs:slab_copper_" .. slab_oxidization[i][2]
|
|
|
|
def_variant_scraped = "mcl_stairs:slab_copper_" .. slab_oxidization[i][1]
|
2023-02-15 21:59:39 +03:00
|
|
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
|
|
|
end
|
|
|
|
end
|
2022-05-04 12:07:04 +03:00
|
|
|
|
2023-02-15 22:55:41 +03:00
|
|
|
-- Set up scraped variants for waxed stairs.
|
|
|
|
local waxed_variants = {
|
|
|
|
{ "waxed_copper_cut", "copper_cut" },
|
|
|
|
{ "waxed_copper_exposed_cut", "copper_exposed_cut" },
|
|
|
|
{ "waxed_copper_weathered_cut", "copper_weathered_cut" },
|
|
|
|
{ "waxed_copper_oxidized_cut", "copper_oxidized_cut" },
|
|
|
|
}
|
|
|
|
|
|
|
|
for i = 1, #waxed_variants do
|
|
|
|
-- stairs
|
|
|
|
def = "mcl_stairs:stair_" .. waxed_variants[i][1]
|
|
|
|
def_variant_scraped = "mcl_stairs:stair_" .. waxed_variants[i][2]
|
|
|
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
|
|
|
|
|
|
|
def = "mcl_stairs:stair_" .. waxed_variants[i][1] .. "_inner"
|
|
|
|
def_variant_scraped = "mcl_stairs:stair_" .. waxed_variants[i][2] .. "_inner"
|
|
|
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
|
|
|
|
|
|
|
def = "mcl_stairs:stair_" .. waxed_variants[i][1] .. "_outer"
|
|
|
|
def_variant_scraped = "mcl_stairs:stair_" .. waxed_variants[i][2] .. "_outer"
|
|
|
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
|
|
|
|
|
|
|
-- slab
|
|
|
|
def = "mcl_stairs:slab_" .. waxed_variants[i][1]
|
|
|
|
def_variant_scraped = "mcl_stairs:slab_" .. waxed_variants[i][2]
|
|
|
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
|
|
|
|
|
|
|
def = "mcl_stairs:slab_" .. waxed_variants[i][1] .. "_top"
|
|
|
|
def_variant_scraped = "mcl_stairs:slab_" .. waxed_variants[i][2] .. "_top"
|
|
|
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
|
|
|
|
|
|
|
def = "mcl_stairs:slab_" .. waxed_variants[i][1] .. "_double"
|
|
|
|
def_variant_scraped = "mcl_stairs:slab_" .. waxed_variants[i][2] .. "_double"
|
|
|
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
|
|
|
|
|
|
|
end
|
|
|
|
|