1
0
Fork 0

Copper door textures and other improvements

copper-adaptation-refs-recovery
JoseDouglas26 2024-02-11 18:53:49 -03:00
parent b704c1e773
commit 20888dfe32
46 changed files with 188 additions and 42 deletions

View File

@ -1,23 +1,5 @@
minetest.register_craft({
output = "mcl_copper:block_raw",
recipe = {
{ "mcl_copper:raw_copper", "mcl_copper:raw_copper", "mcl_copper:raw_copper" },
{ "mcl_copper:raw_copper", "mcl_copper:raw_copper", "mcl_copper:raw_copper" },
{ "mcl_copper:raw_copper", "mcl_copper:raw_copper", "mcl_copper:raw_copper" },
},
})
minetest.register_craft({
output = "mcl_copper:block",
recipe = {
{ "mcl_copper:copper_ingot", "mcl_copper:copper_ingot", "mcl_copper:copper_ingot" },
{ "mcl_copper:copper_ingot", "mcl_copper:copper_ingot", "mcl_copper:copper_ingot" },
{ "mcl_copper:copper_ingot", "mcl_copper:copper_ingot", "mcl_copper:copper_ingot" },
},
})
minetest.register_craft({
output = "mcl_copper:block_raw",
output = "mcl_copper:raw_block",
recipe = {
{ "mcl_copper:raw_copper", "mcl_copper:raw_copper", "mcl_copper:raw_copper" },
{ "mcl_copper:raw_copper", "mcl_copper:raw_copper", "mcl_copper:raw_copper" },
@ -109,7 +91,7 @@ end
mcl_copper.register_variants_recipes("cut", "block", 4)
mcl_copper.register_variants_recipes("grate", "block", 4)
--mcl_copper.register_variants_recipes("door", "block", 3)
--mcl_copper.register_variants_recipes("trapdoor", "block", 2)
mcl_copper.register_variants_recipes("trapdoor", "block", 2)
mcl_copper.register_variants_recipes("bulb_off", "block", 4)
local chiseled_materials = {
@ -130,22 +112,18 @@ local waxable_blocks = {
"cut",
"grate",
"chiseled",
"bulb_off",
"block_exposed",
"cut_exposed",
"grate_exposed",
"chiseled_exposed",
"bulb_off_exposed",
"block_weathered",
"cut_weathered",
"grate_weathered",
"chiseled_weathered",
"bulb_off_weathered",
"block_oxidized",
"cut_oxidized",
"grate_oxidized",
"chiseled_oxidized",
"bulb_off_oxidized"
"chiseled_oxidized"
}
for _, w in ipairs(waxable_blocks) do
@ -185,7 +163,7 @@ minetest.register_craft({
minetest.register_craft({
output = "mcl_copper:raw_copper 9",
recipe = {
{ "mcl_copper:block_raw" },
{ "mcl_copper:raw_block" },
},
})
@ -206,6 +184,6 @@ minetest.register_craft({
minetest.register_craft({
type = "cooking",
output = "mcl_copper:block",
recipe = "mcl_copper:block_raw",
recipe = "mcl_copper:raw_block",
cooktime = 90,
})

View File

@ -1,3 +1,6 @@
local lit_desc = "(Lit)"
local pow_desc = "(Powered)"
local mix_desc = "(Lit and Powered)"
mcl_copper.copper_descs = {
["block"] = {
"Block of Copper", "Waxed Block of Copper",
@ -30,22 +33,22 @@ mcl_copper.copper_descs = {
"Oxidized Copper Bulb", "Waxed Oxidized Copper Bulb"
},
["bulb_on"] = {
"Lit Copper Bulb", "Lit Waxed Copper Bulb",
"Lit Exposed Copper Bulb", "Lit Waxed Exposed Copper Bulb",
"Lit Weathered Copper Bulb", "Lit Waxed Weathered Copper Bulb",
"Lit Oxidized Copper Bulb", "Lit Waxed Oxidized Copper Bulb"
{"Copper Bulb", lit_desc}, {"Waxed Copper Bulb", lit_desc},
{"Exposed Copper Bulb", lit_desc}, {"Waxed Exposed Copper Bulb", lit_desc},
{"Weathered Copper Bulb", lit_desc}, {"Waxed Weathered Copper Bulb", lit_desc},
{"Oxidized Copper Bulb", lit_desc}, {"Waxed Oxidized Copper Bulb", lit_desc}
},
["bulb_powered_off"] = {
"Powered Copper Bulb", "Powered Waxed Copper Bulb",
"Powered Exposed Copper Bulb", "Powered Waxed Exposed Copper Bulb",
"Powered Weathered Copper Bulb", "Powered Waxed Weathered Copper Bulb",
"Powered Oxidized Copper Bulb", "Powered Waxed Oxidized Copper Bulb"
{"Copper Bulb", pow_desc}, {"Waxed Copper Bulb", pow_desc},
{"Exposed Copper Bulb", pow_desc}, {"Waxed Exposed Copper Bulb", pow_desc},
{"Weathered Copper Bulb", pow_desc}, {"Waxed Weathered Copper Bulb", pow_desc},
{"Oxidized Copper Bulb", pow_desc}, {"Waxed Oxidized Copper Bulb", pow_desc}
},
["bulb_powered_on"] = {
"Powered Lit Copper Bulb", "Powered Lit Waxed Copper Bulb",
"Powered Lit Exposed Copper Bulb", "Powered Lit Waxed Exposed Copper Bulb",
"Powered Lit Weathered Copper Bulb", "Powered Lit Waxed Weathered Copper Bulb",
"Powered Lit Oxidized Copper Bulb", "Powered Lit Waxed Oxidized Copper Bulb"
{"Copper Bulb", mix_desc}, {"Waxed Copper Bulb", mix_desc},
{"Exposed Copper Bulb", mix_desc}, {"Waxed Exposed Copper Bulb", mix_desc},
{"Weathered Copper Bulb", mix_desc}, {"Waxed Weathered Copper Bulb", mix_desc},
{"Oxidized Copper Bulb", mix_desc}, {"Waxed Oxidized Copper Bulb", mix_desc}
}
}

View File

@ -130,3 +130,13 @@ for i = 1, #oxidized_stairs do
def_variant_waxed = "mcl_stairs:stair_waxed_copper_" .. oxidized_stairs[i]
minetest.override_item(def, { _mcl_waxed_variant = def_variant_waxed })
end
minetest.register_alias("mcl_copper:raw_block", "mcl_copper:block_raw")
minetest.register_alias("mcl_copper:cut", "mcl_copper:block_cut")
minetest.register_alias("mcl_copper:waxed_cut", "mcl_copper:waxed_block_cut")
minetest.register_alias("mcl_copper:cut_exposed", "mcl_copper:block_exposed_cut")
minetest.register_alias("mcl_copper:waxed_cut_exposed", "mcl_copper:waxed_block_exposed_cut")
minetest.register_alias("mcl_copper:cut_weathered", "mcl_copper:block_weathered_cut")
minetest.register_alias("mcl_copper:waxed_cut_weathered", "mcl_copper:waxed_block_weathered_cut")
minetest.register_alias("mcl_copper:cut_oxidized", "mcl_copper:block_oxidized_cut")
minetest.register_alias("mcl_copper:waxed_cut_oxidized", "mcl_copper:waxed_block_oxidized_cut")

View File

@ -55,3 +55,62 @@ Waxed Weathered Copper=Cobre Desgastado Encerado
Weathered cut copper is a decorative block.=Cobre lapidado desgastado é um bloco decorativo.
Weathered Cut Copper=Cobre Lapidado Desgastado
Waxed Weathered Cut Copper=Cobre Lapidado Desgastado Encerado
Copper Grate=Grade de Cobre
Waxed Copper Grate=Grade de Cobre Encerada
Copper grate is a decorative block.=Grade de cobre é um bloco decorativo.
Exposed Copper Grate=Grade de Cobre Exposto
Waxed Exposed Copper Grate=Grade de Cobre Exposto Encerada
Exposed copper grate is a decorative block.=Grade de cobre exposto é um bloco decorativo.
Weathered Copper Grate=Grade de Cobre Desgastado
Waxed Weathered Copper Grate=Grade de Cobre Desgastado Encerada
Weathered opper grate is a decorative block.=Grade de cobre de desgastado é um bloco decorativo.
Oxidized Copper Grate=Grade de Cobre Oxidado
Waxed Oxidized Copper Grate=Grade de Cobre Oxidado Encerada
Oxidized copper grate is a decorative block.=Grade de cobre oxidado é um bloco decorativo.
Chiseled Copper=Cobre Talhado
Waxed Chiseled Copper=Cobre Talhado Encerado
Chiseled copper is a decorative block.=Cobre talhado é um bloco decorativo.
Exposed Chiseled Copper=Cobre Talhado Exposto
Waxed Exposed Chiseled Copper=Cobre Talhado Exposto Encerado
Exposed chiseled copper is a decorative block.=Cobre talhado exposto é um bloco decorativo.
Weathered Chiseled Copper=Cobre Talhado Desgastado
Waxed Weathered Chiseled Copper=Cobre Talhado Desgastado Encerado
Weathered chiseled copper is a decorative block.=Cobre talhado desgastado é um bloco decorativo.
Oxidized Chiseled Copper=Cobre Talhado Oxidado
Waxed Oxidized Chiseled Copper=Cobre Talhado Oxidado Encerado
Oxidized chiseled copper is a decorative block.=Cobre talhado oxidado é um bloco decorativo.
Copper Bulb=Bulbo de Cobre
Waxed Copper Bulb=Bulbo de Cobre Encerado
Copper bulb is a decorative block and a light source.=Bulbo de cobre é um bloco decorativo e uma fonte de luz.
Copper bulb is a decorative block and a light source when lited.=Bulbo de cobre é um bloco decorativo e uma fonte de luz quando aceso.
Exposed Copper Bulb=Bulbo de Cobre Exposto
Waxed Exposed Copper Bulb=Bulbo de Cobre Exposto Encerado
Exposed copper bulb is a decorative block and a light source.=Bulbo de cobre exposto é um bloco decorativo e uma fonte de luz.
Exposed copper bulb is a decorative block and a light source when lited.=Bulbo de cobre exposto é um bloco decorativo e uma fonte de luz quando aceso.
Weathered Copper Bulb=Bulbo de Cobre Desgastado
Waxed Weathered Copper Bulb=Bulbo de Cobre Desgastado Encerado
Weathered copper bulb is a decorative block and a light source.=Bulbo de cobre desgastado é um bloco decorativo e uma fonte de luz.
Weathered copper bulb is a decorative block and a light source when lited.=Bulbo de cobre desgastado é um bloco decorativo e uma fonte de luz quando aceso.
Oxidized Copper Bulb=Bulbo de Cobre Oxidado
Waxed Oxidized Copper Bulb=Bulbo de Cobre Oxidado Encerado
Oxidized copper bulb is a decorative block and a light source.=Bulbo de cobre oxidado é um bloco decorativo e uma fonte de luz.
Oxidized copper bulb is a decorative block and a light source when lited.=Bulbo de cobre oxidado é um bloco decorativo e uma fonte de luz quando aceso.
Copper Door=Porta de Cobre
Waxed Copper Door=Porta de Cobre Encerada
Exposed Copper Door=Porta de Cobre Exposto
Waxed Exposed Copper Door=Porta de Cobre Exposto Encerada
Weathered Copper Door=Porta de Cobre Desgastado
Waxed Weathered Copper Door=Porta de Cobre Desgastado Encerada
Oxidized Copper Door=Porta de Cobre Oxidado
Waxed Oxidized Copper Door=Porta de Cobre Oxidado Encerada
Copper Trapdoor=Alçapão de Cobre
Waxed Copper Trapdoor=Alçapão de Cobre Encerado
Exposed Copper Trapdoor=Alçapão de Cobre Exposto
Waxed Exposed Copper Trapdoor=Alçapão de Cobre Exposto Encerado
Weathered Copper Trapdoor=Alçapão de Cobre Desgastado
Waxed Weathered Copper Trapdoor=Alçapão de Cobre Desgastado Encerado
Oxidized Copper Trapdoor=Alçapão de Cobre Oxidado
Waxed Oxidized Copper Trapdoor=Alçapão de Cobre Oxidado Encerado
@1 (Lit)=@1 (Aceso)
@1 (Powered)=@1 (Energizado)
@1 (Lit and Powered)=@1 (Aceso e Energizado)

View File

@ -55,3 +55,62 @@ Waxed Weathered Copper=
Weathered cut copper is a decorative block.=
Weathered Cut Copper=
Waxed Weathered Cut Copper=
Copper Grate=
Waxed Copper Grate=
Copper grate is a decorative block.=
Exposed Copper Grate=
Waxed Exposed Copper Grate=
Exposed copper grate is a decorative block.=
Weathered Copper Grate=
Waxed Weathered Copper Grate=
Weathered copper grate is a decorative block.=
Oxidized Copper Grate=
Waxed Oxidized Copper Grate=
Oxidized copper grate is a decorative block.=
Chiseled Copper=
Waxed Chiseled Copper=
Chiseled copper is a decorative block.=
Exposed Chiseled Copper=
Waxed Exposed Chiseled Copper=
Exposed chiseled copper is a decorative block.=
Weathered Chiseled Copper=
Waxed Weathered Chiseled Copper=
Weathered chiseled copper is a decorative block.=
Oxidized Chiseled Copper=
Waxed Oxidized Chiseled Copper=
Oxidized chiseled copper is a decorative block.=
Copper Bulb=
Waxed Copper Bulb=
Copper bulb is a decorative block and a light source.=
Copper bulb is a decorative block and a light source when lited.=
Exposed Copper Bulb=
Waxed Exposed Copper Bulb=
Exposed copper bulb is a decorative block and a light source.=
Exposed copper bulb is a decorative block and a light source when lited.=
Weathered Copper Bulb=
Waxed Weathered Copper Bulb=
Weathered copper bulb is a decorative block and a light source.=
Weathered copper bulb is a decorative block and a light source when lited.=
Oxidized Copper Bulb=
Waxed Oxidized Copper Bulb=
Oxidized copper bulb is a decorative block and a light source.=
Oxidized copper bulb is a decorative block and a light source when lited.=
Copper Door=
Waxed Copper Door=
Exposed Copper Door=
Waxed Exposed Copper Door=
Weathered Copper Door=
Waxed Weathered Copper Door=
Oxidized Copper Door=
Waxed Oxidized Copper Door=
Copper Trapdoor=
Waxed Copper Trapdoor=
Exposed Copper Trapdoor=
Waxed Exposed Copper Trapdoor=
Weathered Copper Trapdoor=
Waxed Weathered Copper Trapdoor=
Oxidized Copper Trapdoor=
Waxed Oxidized Copper Trapdoor=
@1 (Lit)=
@1 (Powered)=
@1 (Lit and Powered)=

View File

@ -1,6 +1,7 @@
local S = minetest.get_translator("mcl_copper")
function mcl_copper.register_copper_variants(name, definitions)
local description, drop
local light_level = nil
local oxidized_variant, stripped_variant, waxed_variant
local mcl_copper_groups = table.copy(definitions.groups)
@ -18,6 +19,16 @@ function mcl_copper.register_copper_variants(name, definitions)
}
for i = 1, #names do
if type(mcl_copper.copper_descs[name][i]) == "string" then
description = S(mcl_copper.copper_descs[name][i])
elseif type(mcl_copper.copper_descs[name][i]) == "table" then
description = S("@1 "..mcl_copper.copper_descs[name][i][2], S(mcl_copper.copper_descs[name][i][1]))
end
if definitions.drop then
drop = "mcl_copper:"..names[i]:gsub(name, definitions.drop)
end
if names[i]:find("waxed") then
mcl_copper_groups.waxed = 1
stripped_variant = "mcl_copper:"..names[i-1]
@ -37,8 +48,9 @@ function mcl_copper.register_copper_variants(name, definitions)
end
minetest.register_node("mcl_copper:"..names[i], {
description = S(mcl_copper.copper_descs[name][i]),
description = description,
drawtype = definitions.drawtype or "normal",
drop = drop or nil,
groups = mcl_copper_groups,
is_ground_content = false,
light_source = light_level,
@ -123,6 +135,26 @@ function mcl_copper.register_copper_variants(name, definitions)
_mcl_blast_resistance = 3,
_mcl_hardness = 3
})
if names[i]:find("waxed") then
minetest.override_item("mcl_copper:"..names[i]:gsub(name, "trapdoor"), {
_mcl_stripped_variant = "mcl_copper:"..names[i-1]:gsub(name, "trapdoor")
})
else
if not names[i]:find("oxidized") then
minetest.override_item("mcl_copper:"..names[i]:gsub(name, "trapdoor"), {
_mcl_oxidized_variant = "mcl_copper:"..names[i+2]:gsub(name, "trapdoor")
})
end
if i ~= 1 then
minetest.override_item("mcl_copper:"..names[i]:gsub(name, "trapdoor"), {
_mcl_stripped_variant = "mcl_copper:"..names[i-2]:gsub(name, "trapdoor")
})
end
minetest.override_item("mcl_copper:"..names[i]:gsub(name, "trapdoor"), {
_mcl_waxed_variant = "mcl_copper:"..names[i+1]:gsub(name, "trapdoor")
})
end
end
end
end
@ -141,7 +173,7 @@ minetest.register_node("mcl_copper:stone_with_copper", {
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
})
minetest.register_node("mcl_copper:block_raw", {
minetest.register_node("mcl_copper:raw_block", {
description = S("Block of Raw Copper"),
_doc_items_longdesc = S("A block used for compact raw copper storage."),
tiles = {"mcl_copper_raw_block.png"},
@ -154,12 +186,14 @@ minetest.register_node("mcl_copper:block_raw", {
mcl_copper.register_copper_variants("block", {
groups = {pickaxey = 2, building_block = 1},
--_mcl_doors = true,
_mcl_doors = true,
})
mcl_copper.register_copper_variants("cut", {
groups = {pickaxey = 2, building_block = 1},
_mcl_stairs = true,
})
mcl_copper.register_copper_variants("grate", {
drawtype = "allfaces",
groups = {pickaxey = 2, building_block = 1, disable_suffocation = 1},
@ -182,6 +216,7 @@ mcl_copper.register_copper_variants("bulb_off", {
})
mcl_copper.register_copper_variants("bulb_on", {
drop = "bulb_off",
groups = {pickaxey = 2, building_block = 1, not_in_creative_inventory = 1},
light_source = 14,
mesecons = {
@ -195,6 +230,7 @@ mcl_copper.register_copper_variants("bulb_on", {
})
mcl_copper.register_copper_variants("bulb_powered_off", {
drop = "bulb_off",
groups = {pickaxey = 2, building_block = 1, not_in_creative_inventory = 1},
mesecons = {
effector = {
@ -206,6 +242,7 @@ mcl_copper.register_copper_variants("bulb_powered_off", {
})
mcl_copper.register_copper_variants("bulb_powered_on", {
drop = "bulb_off",
groups = {pickaxey = 2, building_block = 1, not_in_creative_inventory = 1},
light_source = 14,
mesecons = {

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B