Compare commits

...

9 Commits

62 changed files with 95 additions and 29 deletions

View File

@ -1,7 +1,7 @@
mcl_armor_trims = {
blacklisted = {["mcl_farming:pumpkin_face"]=true, ["mcl_armor:elytra"]=true, ["mcl_armor:elytra_enchanted"]=true},
overlays = {"sentry","dune","coast","wild","tide","ward","vex","rib","snout","eye","spire"},
colors = {"bf352d"}
colors = {["amethyst"]="#8246a5",["gold"]="#ce9627",["emerald"]="#1b9958",["copper"]="#c36447",["diamond"]="#5faed8",["iron"]="#938e88",["lapis"]="#1c306b",["netherite"]="#302a26",["quartz"]="#c9bcb9",["redstone"]="#af2c23"}
}
local function define_items()
@ -9,33 +9,41 @@ local function define_items()
for itemname, itemdef in pairs(minetest.registered_tools) do
if itemdef._mcl_armor_texture and type(itemdef._mcl_armor_texture) == "string" and not mcl_armor_trims.blacklisted[itemname] then
for _, overlay in pairs(mcl_armor_trims.overlays) do
local new_name = itemname .. "_trimmed_" .. overlay
minetest.override_item(itemname, {_mcl_armor_trims_trim = new_name})
local new_def = table.copy(itemdef)
for mineral, color in pairs(mcl_armor_trims.colors) do
local new_name = itemname .. "_trimmed_" .. overlay .. "_" .. mineral
local new_def = table.copy(itemdef)
local piece_overlay = overlay
local invOverlay = ""
if string.find(itemname,"helmet") then
invOverlay = "^helmet_trim.png"
elseif string.find(itemname,"chestplate") then
invOverlay = "^chestplate_trim.png"
elseif string.find(itemname,"leggings") then
invOverlay = "^leggings_trim.png"
piece_overlay = piece_overlay .. "_leggings"
elseif string.find(itemname,"boots") then
invOverlay = "^boots_trim.png"
local piece_overlay = overlay
local invOverlay = ""
if string.find(itemname,"helmet") then
invOverlay = "^(helmet_trim.png"
piece_overlay = piece_overlay .. "_helmet"
elseif string.find(itemname,"chestplate") then
invOverlay = "^(chestplate_trim.png"
piece_overlay = piece_overlay .. "_chestplate"
elseif string.find(itemname,"leggings") then
invOverlay = "^(leggings_trim.png"
piece_overlay = piece_overlay .. "_leggings"
elseif string.find(itemname,"boots") then
invOverlay = "^(boots_trim.png"
piece_overlay = piece_overlay .. "_boots"
end
invOverlay = invOverlay .. "^[colorize:" .. color .. ":150)"
piece_overlay = piece_overlay .. ".png"
new_def.groups.not_in_creative_inventory = 1
new_def.groups.not_in_craft_guide = 1
new_def._mcl_armor_texture = new_def._mcl_armor_texture .. "^(" .. piece_overlay .. "^[colorize:" .. color .. ":150)"
new_def.inventory_image = itemdef.inventory_image .. invOverlay
if string.find(itemname, "_enchanted") then
new_def._mcl_enchanting_enchanted_tool = new_name
else
new_def._mcl_enchanting_enchanted_tool = itemname .. "_enchanted_trimmed_" .. overlay .. "_" .. mineral
end
register_list[":" .. new_name] = new_def
end
piece_overlay = piece_overlay .. ".png"
new_def.groups.not_in_creative_inventory = 0 --set this to 1 later!
new_def.groups.not_in_craft_guide = 1
new_def._mcl_armor_texture = new_def._mcl_armor_texture .. "^(" .. piece_overlay .. "^[colorize:purple)"
new_def.inventory_image = itemdef.inventory_image .. invOverlay
new_def._mcl_armor_trims_trim = new_name
register_list[":" .. new_name] = new_def
end
end
end
@ -46,3 +54,4 @@ local function define_items()
end
minetest.register_on_mods_loaded(define_items)
dofile(minetest.get_modpath(minetest.get_current_modname()).."/templates.lua")

View File

@ -0,0 +1,2 @@
# textdomain: mcl_armor_trims
Smithing Template '@1'=Schiedevorlage '@1'

View File

@ -0,0 +1,2 @@
# textdomain: mcl_armor_trims
Smithing Template '@1'

View File

@ -1,3 +1,4 @@
name = mcl_armor_trims
author = chmodsayshello
optional_depends = mcl_armor
depends = mcl_enchanting, mcl_core, mcl_end

View File

@ -0,0 +1,46 @@
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
for _, template_name in pairs(mcl_armor_trims.overlays) do
minetest.register_craftitem(modname .. ":" .. template_name, {
description = S("Smithing Template '@1'", template_name),
inventory_image = template_name .. "_armor_trim_smithing_template.png",
})
minetest.register_craft({
output = modname .. ":" .. template_name .. " 2",
recipe = {
{"mcl_core:diamond",modname .. ":" .. template_name,"mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:cobble","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
end
--temp craft recipies
minetest.register_craft({
output = modname .. ":eye",
recipe = {
{"mcl_core:diamond","mcl_end:ender_eye","mcl_core:diamond"},
{"mcl_core:diamond","mcl_end:ender_eye","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
minetest.register_craft({
output = modname .. ":ward",
recipe = {
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:apple_gold_enchanted","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
minetest.register_craft({
output = modname .. ":snout",
recipe = {
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:goldblock","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})

View File

@ -188,6 +188,7 @@ mcl_structures.register_structure("nether_bulwark",{
stacks_max = 1,
items = {
{ itemstring = "mcl_compass:lodestone" },
{ itemstring = "mcl_armor_trims:rib" },
}
}}
},

View File

@ -69,6 +69,7 @@ mcl_structures.register_structure("desert_temple",{
{ itemstring = "mcl_mobitems:diamond_horse_armor", weight = 5, },
{ itemstring = "mcl_core:diamond", weight = 5, amount_min = 1, amount_max = 3 },
{ itemstring = "mcl_core:apple_gold_enchanted", weight = 2, },
{ itemstring = "mcl_armor_trims:dune", weight = 20, amount_min = 2, amount_max = 2},
}
},
{

View File

@ -58,6 +58,7 @@ mcl_structures.register_structure("end_shipwreck",{
{ itemstring = "mcl_core:diamond", weight = 3, amount_min = 2, amount_max = 7 },
{ itemstring = "mcl_mobitems:saddle", weight = 3, },
{ itemstring = "mcl_core:emerald", weight = 2, amount_min = 1, amount_max = 3 },
{ itemstring = "mcl_armor_trims:spire", amount_min = 1, amount_max = 1 },
{ itemstring = "mcl_books:book", weight = 1, func = function(stack, pr)
mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr)
end },

View File

@ -38,6 +38,7 @@ mcl_structures.register_structure("jungle_temple",{
{ itemstring = "mcl_mobitems:gold_horse_armor", weight = 1, },
{ itemstring = "mcl_mobitems:diamond_horse_armor", weight = 1, },
{ itemstring = "mcl_core:apple_gold_enchanted", weight = 2, },
{ itemstring = "mcl_armor_trims:wild", amount_min = 1, amount_max = 1, },
}
}}
}

View File

@ -44,6 +44,7 @@ mcl_structures.register_structure("pillager_outpost",{
{ itemstring = "mcl_books:book", weight = 1, func = function(stack, pr)
mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr)
end },
{ itemstring = "mcl_armor_trims:sentry"},
}
},
{

View File

@ -166,7 +166,7 @@ mcl_structures.register_structure("shipwreck",{
{ itemstring = "mcl_clock:clock", weight = 1, amount_min = 1, amount_max = 1 },
{ itemstring = "mcl_compass:compass", weight = 1, amount_min = 1, amount_max = 1 },
{ itemstring = "mcl_maps:empty_map", weight = 1, amount_min = 1, amount_max = 1 },
{ itemstring = "mcl_armor_trims:coast", weight = 20, amount_min = 2, amount_max = 2},
}
},
}

View File

@ -63,6 +63,7 @@ mcl_structures.register_structure("woodland_cabin",{
{ itemstring = "mcl_armor:chestplate_chain", weight = 1, },
{ itemstring = "mcl_armor:chestplate_diamond", weight = 1, },
{ itemstring = "mcl_core:apple_gold_enchanted", weight = 2, },
{ itemstring = "mcl_armor_trims:vex", amount_max = 1, },
}
}}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
textures/coast_boots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

BIN
textures/coast_helmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
textures/dune_boots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

BIN
textures/dune_helmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
textures/eye_boots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

BIN
textures/eye_chestplate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 711 B

BIN
textures/eyes_helmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
textures/rib_chestplate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

BIN
textures/rib_helmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
textures/sentry_boots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 B

BIN
textures/sentry_helmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
textures/snout_boots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

BIN
textures/snout_helmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
textures/spire_boots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

BIN
textures/spire_helmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
textures/tide_boots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

BIN
textures/tide_helmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

BIN
textures/vex_boots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

BIN
textures/vex_chestplate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

BIN
textures/vex_helmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
textures/ward_boots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

BIN
textures/ward_helmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
textures/wild_boots.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

BIN
textures/wild_helmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B