forked from VoxeLibre/VoxeLibre
Added scraped variant for waxed slabs / stairs.
This commit is contained in:
parent
b311838041
commit
754db18c42
|
@ -7,28 +7,28 @@ local block_oxidation = {
|
||||||
{ "_weathered_cut", "_oxidized_cut" }
|
{ "_weathered_cut", "_oxidized_cut" }
|
||||||
}
|
}
|
||||||
|
|
||||||
local stair_oxidation = {
|
local stair_oxidization = {
|
||||||
{ "stair", "cut", "exposed_cut" },
|
{ "cut", "exposed_cut" },
|
||||||
{ "stair", "cut_inner", "exposed_cut_inner" },
|
{ "cut_inner", "exposed_cut_inner" },
|
||||||
{ "stair", "cut_outer", "exposed_cut_outer" },
|
{ "cut_outer", "exposed_cut_outer" },
|
||||||
{ "stair", "exposed_cut", "weathered_cut" },
|
{ "exposed_cut", "weathered_cut" },
|
||||||
{ "stair", "exposed_cut_inner", "weathered_cut_inner" },
|
{ "exposed_cut_inner", "weathered_cut_inner" },
|
||||||
{ "stair", "exposed_cut_outer", "weathered_cut_outer" },
|
{ "exposed_cut_outer", "weathered_cut_outer" },
|
||||||
{ "stair", "weathered_cut", "oxidized_cut" },
|
{ "weathered_cut", "oxidized_cut" },
|
||||||
{ "stair", "weathered_cut_inner", "oxidized_cut_inner" },
|
{ "weathered_cut_inner", "oxidized_cut_inner" },
|
||||||
{ "stair", "weathered_cut_outer", "oxidized_cut_outer" }
|
{ "weathered_cut_outer", "oxidized_cut_outer" }
|
||||||
}
|
}
|
||||||
|
|
||||||
local slab_oxidization = {
|
local slab_oxidization = {
|
||||||
{ "slab", "cut", "exposed_cut" },
|
{ "cut", "exposed_cut" },
|
||||||
{ "slab", "cut_top", "exposed_cut_top" },
|
{ "cut_top", "exposed_cut_top" },
|
||||||
{ "slab", "cut_double", "exposed_cut_double" },
|
{ "cut_double", "exposed_cut_double" },
|
||||||
{ "slab", "exposed_cut", "weathered_cut" },
|
{ "exposed_cut", "weathered_cut" },
|
||||||
{ "slab", "exposed_cut_top", "weathered_cut_top" },
|
{ "exposed_cut_top", "weathered_cut_top" },
|
||||||
{ "slab", "exposed_cut_double", "weathered_cut_double" },
|
{ "exposed_cut_double", "weathered_cut_double" },
|
||||||
{ "slab", "weathered_cut", "oxidized_cut" },
|
{ "weathered_cut", "oxidized_cut" },
|
||||||
{ "slab", "weathered_cut_top", "oxidized_cut_double" },
|
{ "weathered_cut_top", "oxidized_cut_double" },
|
||||||
{ "slab", "weathered_cut_double", "oxidized_cut_double" },
|
{ "weathered_cut_double", "oxidized_cut_double" },
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, b in pairs(block_oxidation) do
|
for _, b in pairs(block_oxidation) do
|
||||||
|
@ -41,41 +41,83 @@ local def_variant_waxed
|
||||||
local def_variant_scraped
|
local def_variant_scraped
|
||||||
|
|
||||||
-- register abm, then set up oxidized and waxed variants.
|
-- register abm, then set up oxidized and waxed variants.
|
||||||
for _, s in pairs(stair_oxidation) do
|
for i = 1, #stair_oxidization do
|
||||||
register_oxidation_abm("mcl_stairs:" .. s[1] .. "_copper_" .. s[2])
|
register_oxidation_abm("mcl_stairs:stair_copper_" .. stair_oxidization[i][1])
|
||||||
register_oxidation_abm("mcl_stairs:" .. s[1] .. "_copper_" .. s[2])
|
register_oxidation_abm("mcl_stairs:slab_copper_" .. slab_oxidization[i][1])
|
||||||
|
|
||||||
def = "mcl_stairs:" .. s[1] .. "_copper_" .. s[2]
|
-- stairs
|
||||||
def_variant_oxidized = "mcl_stairs:" .. s[1] .. "_copper_" .. s[3]
|
def = "mcl_stairs:stair_copper_" .. stair_oxidization[i][1]
|
||||||
|
def_variant_oxidized = "mcl_stairs:stair_copper_" .. stair_oxidization[i][2]
|
||||||
minetest.override_item(def, { _mcl_oxidized_variant = def_variant_oxidized })
|
minetest.override_item(def, { _mcl_oxidized_variant = def_variant_oxidized })
|
||||||
|
|
||||||
def_variant_waxed = "mcl_stairs:" .. s[1] .. "_copper_" .. s[2] .. "_waxed"
|
def_variant_waxed = "mcl_stairs:stair_waxed_copper_" .. stair_oxidization[i][2]
|
||||||
minetest.override_item(def, { _mcl_copper_waxed_variant = def_variant_waxed })
|
minetest.override_item(def, { _mcl_copper_waxed_variant = def_variant_waxed })
|
||||||
def = "mcl_stairs:" .. s[1] .. "_copper_" .. s[2]
|
|
||||||
def_variant_oxidized = "mcl_stairs:" .. s[1] .. "_copper_" .. s[3]
|
-- slabs
|
||||||
|
def = "mcl_stairs:slab_copper_" .. slab_oxidization[i][1]
|
||||||
|
def_variant_oxidized = "mcl_stairs:slab_copper_" .. slab_oxidization[i][2]
|
||||||
minetest.override_item(def, { _mcl_oxidized_variant = def_variant_oxidized })
|
minetest.override_item(def, { _mcl_oxidized_variant = def_variant_oxidized })
|
||||||
|
|
||||||
def_variant_waxed = "mcl_stairs:" .. s[1] .. "_copper_" .. s[2] .. "_waxed"
|
def_variant_waxed = "mcl_stairs:slab_waxed_copper_" .. slab_oxidization[i][1]
|
||||||
minetest.override_item(def, { _mcl_copper_waxed_variant = def_variant_waxed })
|
minetest.override_item(def, { _mcl_copper_waxed_variant = def_variant_waxed })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Set up scraped variants.
|
-- Set up scraped variants.
|
||||||
for i=1, #stair_oxidation do
|
for i = 1, #stair_oxidization do
|
||||||
|
-- does both stairs and slabs.
|
||||||
if i > 3 then
|
if i > 3 then
|
||||||
def = "mcl_stairs:" .. stair_oxidation[i][1] .. "_copper_" .. stair_oxidation[i][2]
|
def = "mcl_stairs:stair_copper_" .. stair_oxidization[i][1]
|
||||||
def_variant_scraped="mcl_stairs:" .. stair_oxidation[i-3][1] .. "_copper_" .. stair_oxidation[i-3][2]
|
def_variant_scraped = "mcl_stairs:stair_copper_" .. stair_oxidization[i - 3][1]
|
||||||
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
||||||
def = "mcl_stairs:" .. slab_oxidization[i][1] .. "_copper_" .. slab_oxidization[i][2]
|
|
||||||
def_variant_scraped="mcl_stairs:" .. slab_oxidization[i-3][1] .. "_copper_" .. slab_oxidization[i-3][2]
|
def = "mcl_stairs:slab_copper_" .. slab_oxidization[i][1]
|
||||||
|
def_variant_scraped = "mcl_stairs:slab_copper_" .. slab_oxidization[i - 3][1]
|
||||||
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
||||||
end
|
end
|
||||||
if i > 6 then
|
if i > 6 then
|
||||||
def = "mcl_stairs:" .. stair_oxidation[i][1] .. "_copper_" .. stair_oxidation[i][3]
|
def = "mcl_stairs:stair_copper_" .. stair_oxidization[i][2]
|
||||||
def_variant_scraped="mcl_stairs:" .. stair_oxidation[i][1] .. "_copper_" .. stair_oxidation[i][2]
|
def_variant_scraped = "mcl_stairs:stair_copper_" .. stair_oxidization[i][1]
|
||||||
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
||||||
def = "mcl_stairs:" .. slab_oxidization[i][1] .. "_copper_" .. slab_oxidization[i][3]
|
|
||||||
def_variant_scraped="mcl_stairs:" .. slab_oxidization[i][1] .. "_copper_" .. slab_oxidization[i][2]
|
def = "mcl_stairs:slab_copper_" .. slab_oxidization[i][2]
|
||||||
|
def_variant_scraped = "mcl_stairs:slab_copper_" .. slab_oxidization[i][1]
|
||||||
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
minetest.override_item(def, { _mcl_stripped_variant = def_variant_scraped })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 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
|
||||||
|
|
Loading…
Reference in New Issue