mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-04 23:31:05 +01:00
armor trims: inventory overlay
This commit is contained in:
parent
c62195662c
commit
b154f2def1
5 changed files with 12 additions and 1 deletions
|
@ -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
BIN
textures/boots_trim.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
BIN
textures/chestplate_trim.png
Normal file
BIN
textures/chestplate_trim.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
BIN
textures/helmet_trim.png
Normal file
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
BIN
textures/leggings_trim.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
Loading…
Reference in a new issue