mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
make armor upgrade slightly more flexible
This commit is contained in:
parent
d86be83b2b
commit
7136e54615
2 changed files with 3 additions and 3 deletions
|
@ -115,8 +115,8 @@ function mcl_armor.register_set(def)
|
||||||
groups[k] = v
|
groups[k] = v
|
||||||
end
|
end
|
||||||
local upgrade_item = nil
|
local upgrade_item = nil
|
||||||
if itemstring:find("_diamond") then
|
if itemstring:find("_diamond") and def._mcl_upgrade_item_material then
|
||||||
upgrade_item = itemstring:gsub("_diamond","_netherite")
|
upgrade_item = itemstring:gsub("_[%l%d]*$",def._mcl_upgrade_item_material)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_tool(itemstring, {
|
minetest.register_tool(itemstring, {
|
||||||
|
|
|
@ -80,7 +80,7 @@ mcl_armor.register_set({
|
||||||
toughness = 2,
|
toughness = 2,
|
||||||
craft_material = "mcl_core:diamond",
|
craft_material = "mcl_core:diamond",
|
||||||
_mcl_upgradable = true,
|
_mcl_upgradable = true,
|
||||||
_mcl_upgrade_item_add = "_netherite"
|
_mcl_upgrade_item_material = "_netherite"
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_armor.register_set({
|
mcl_armor.register_set({
|
||||||
|
|
Loading…
Reference in a new issue