forked from VoxeLibre/VoxeLibre
fix enchanting of trimmed armor
This commit is contained in:
parent
bc3da8dab8
commit
311beeb31c
|
@ -11,7 +11,6 @@ local function define_items()
|
||||||
for _, overlay in pairs(mcl_armor_trims.overlays) do
|
for _, overlay in pairs(mcl_armor_trims.overlays) do
|
||||||
for mineral, color in pairs(mcl_armor_trims.colors) do
|
for mineral, color in pairs(mcl_armor_trims.colors) do
|
||||||
local new_name = itemname .. "_trimmed_" .. overlay .. "_" .. mineral
|
local new_name = itemname .. "_trimmed_" .. overlay .. "_" .. mineral
|
||||||
minetest.override_item(itemname, {_mcl_armor_trims_trim = new_name})
|
|
||||||
local new_def = table.copy(itemdef)
|
local new_def = table.copy(itemdef)
|
||||||
|
|
||||||
local piece_overlay = overlay
|
local piece_overlay = overlay
|
||||||
|
@ -36,9 +35,13 @@ local function define_items()
|
||||||
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 .. "^(" .. piece_overlay .. "^[colorize:" .. color .. ")"
|
new_def._mcl_armor_texture = new_def._mcl_armor_texture .. "^(" .. piece_overlay .. "^[colorize:" .. color .. ")"
|
||||||
|
|
||||||
new_def.inventory_image = itemdef.inventory_image .. invOverlay
|
new_def.inventory_image = itemdef.inventory_image .. invOverlay
|
||||||
new_def._mcl_armor_trims_trim = new_name
|
|
||||||
|
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
|
register_list[":" .. new_name] = new_def
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue