make armor upgrade slightly more flexible
parent
d86be83b2b
commit
7136e54615
|
@ -115,8 +115,8 @@ function mcl_armor.register_set(def)
|
|||
groups[k] = v
|
||||
end
|
||||
local upgrade_item = nil
|
||||
if itemstring:find("_diamond") then
|
||||
upgrade_item = itemstring:gsub("_diamond","_netherite")
|
||||
if itemstring:find("_diamond") and def._mcl_upgrade_item_material then
|
||||
upgrade_item = itemstring:gsub("_[%l%d]*$",def._mcl_upgrade_item_material)
|
||||
end
|
||||
|
||||
minetest.register_tool(itemstring, {
|
||||
|
|
|
@ -80,7 +80,7 @@ mcl_armor.register_set({
|
|||
toughness = 2,
|
||||
craft_material = "mcl_core:diamond",
|
||||
_mcl_upgradable = true,
|
||||
_mcl_upgrade_item_add = "_netherite"
|
||||
_mcl_upgrade_item_material = "_netherite"
|
||||
})
|
||||
|
||||
mcl_armor.register_set({
|
||||
|
|
Loading…
Reference in New Issue