forked from VoxeLibre/VoxeLibre
new mcl_copper functions
This commit is contained in:
parent
58df4c65e1
commit
1db17d88da
|
@ -1,11 +1,11 @@
|
|||
mcl_copper.subnodes = {
|
||||
["bars_copper"] = {"", "flat"},
|
||||
["button_copper"] = {"off"},
|
||||
["door"] = {"b_1", "b_2", "b_3", "b_4", "t_1", "t_2", "t_3", "t_4"},
|
||||
--["door"] = {"b_1", "b_2", "b_3", "b_4", "t_1", "t_2", "t_3", "t_4"},
|
||||
["pressure_plate_copper"] = {"off"},
|
||||
["slab_copper"] = {"", "double", "top"},
|
||||
["stair_copper"] = {"", "inner", "outer"},
|
||||
["trapdoor"] = {"", "open"}
|
||||
--["trapdoor"] = {"", "open"}
|
||||
}
|
||||
|
||||
-- Functions used to strip wax from the other half of the door
|
||||
|
@ -61,17 +61,9 @@ end
|
|||
local function register_oxidation_and_scraping(mod_name, subname, decay_chain)
|
||||
local item, oxidized_item
|
||||
|
||||
local slab_oxidization = {
|
||||
{ "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_top" },
|
||||
{ "weathered_cut_double", "oxidized_cut_double" },
|
||||
}
|
||||
for i = 1, #decay_chain - 1 do
|
||||
item = mod_name..":"..subname..decay_chain[i]
|
||||
oxidized_item = mod_name..":"..subname..decay_chain[i + 1]
|
||||
|
||||
for _, subnode in pairs(mcl_copper.subnodes[subname]) do
|
||||
if subnode == "" then
|
||||
|
@ -127,11 +119,9 @@ end
|
|||
local function register_waxing_and_scraping(mod_name, subname, decay_chain)
|
||||
local waxed_item, unwaxed_item
|
||||
|
||||
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 })
|
||||
for i = 1, #decay_chain do
|
||||
waxed_item = mod_name..":"..subname..decay_chain[i]
|
||||
unwaxed_item = mod_name..":"..subname:gsub("waxed_", "")..decay_chain[i]
|
||||
|
||||
for _, subnode in pairs(mcl_copper.subnodes[subname:gsub("waxed_", "")]) do
|
||||
if subnode == "" then
|
||||
|
@ -189,9 +179,9 @@ local decay_chain = {
|
|||
local mods_and_blocks = {
|
||||
{"xpanes", "bars_copper", "bars_waxed_copper"},
|
||||
{"mesecons_button", "button_copper", "button_waxed_copper"},
|
||||
{"mcl_copper", "door", "waxed_door"},
|
||||
--{"mcl_copper", "door", "waxed_door"},
|
||||
{"mcl_copper", "pressure_plate_copper", "pressure_plate_waxed_copper"},
|
||||
{"mcl_copper", "trapdoor", "waxed_trapdoor"}
|
||||
--{"mcl_copper", "trapdoor", "waxed_trapdoor"}
|
||||
}
|
||||
-- Defining variants for almost all blocks registered by other API's.
|
||||
for _, mod_and_blocks in pairs(mods_and_blocks) do
|
||||
|
|
Loading…
Reference in New Issue