mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
make diamond tools upgradeable again
This commit is contained in:
parent
ec7e99019e
commit
5be506830f
1 changed files with 7 additions and 4 deletions
|
@ -167,16 +167,19 @@ minetest.register_node("mcl_smithing_table:table", {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
local stackname = stack:get_name()
|
||||||
|
local def = stack:get_definition()
|
||||||
if
|
if
|
||||||
listname == "upgrade_item"
|
listname == "upgrade_item"
|
||||||
and string.find(stack:get_name(),"mcl_armor:") -- allow any armor piece to go in (in case the player wants to trim them)
|
and def._mcl_armor_element -- allow any armor piece to go in (in case the player wants to trim them)
|
||||||
and not mcl_armor.trims.blacklisted[stack:get_name()]
|
and not mcl_armor.trims.blacklisted[stackname]
|
||||||
|
or def._mcl_upgradable -- for diamond tools
|
||||||
|
|
||||||
or listname == "mineral"
|
or listname == "mineral"
|
||||||
and mcl_smithing_table.is_smithing_mineral(stack:get_name())
|
and mcl_smithing_table.is_smithing_mineral(stackname)
|
||||||
|
|
||||||
or listname == "template"
|
or listname == "template"
|
||||||
and string.find(stack:get_name(),"mcl_armor")
|
and string.find(stackname, "mcl_armor")
|
||||||
then
|
then
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue