armor trims: inventory overlay

This commit is contained in:
chmodsayshello 2023-06-07 17:06:53 +02:00
parent c62195662c
commit b154f2def1
5 changed files with 12 additions and 1 deletions

View file

@ -13,12 +13,23 @@ local function define_items()
minetest.override_item(itemname, {_mcl_armor_trims_trim = new_name})
local new_def = table.copy(itemdef)
--TODO: inventory stuff
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"
elseif string.find(itemname,"boots") then
invOverlay = "^boots_trim.png"
end
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 .. "^" .. overlay .. ".png" .. "^[colorize:purple:50"
new_def.inventory_image = itemdef.inventory_image .. invOverlay
new_def._mcl_armor_trims_trim = new_name
register_list[":" .. new_name] = new_def

BIN
textures/boots_trim.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
textures/helmet_trim.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
textures/leggings_trim.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB