forked from VoxeLibre/VoxeLibre
armor trims: inventory overlay
This commit is contained in:
parent
c62195662c
commit
b154f2def1
|
@ -13,12 +13,23 @@ local function define_items()
|
||||||
minetest.override_item(itemname, {_mcl_armor_trims_trim = new_name})
|
minetest.override_item(itemname, {_mcl_armor_trims_trim = new_name})
|
||||||
local new_def = table.copy(itemdef)
|
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_creative_inventory = 0 --set this to 1 later!
|
||||||
new_def.groups.not_in_craft_guide = 1
|
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._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
|
new_def._mcl_armor_trims_trim = new_name
|
||||||
|
|
||||||
register_list[":" .. new_name] = new_def
|
register_list[":" .. new_name] = new_def
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
Loading…
Reference in New Issue