1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add disable_repair group to prevent tool repair (#7381)

This commit is contained in:
Wuzzy 2018-10-16 06:25:34 +02:00 committed by Paramat
parent b6adb7f09e
commit 40ab3e011d
3 changed files with 33 additions and 1 deletions

View file

@ -579,7 +579,7 @@ static ItemStack craftToolRepair(
IItemDefManager *idef = gamedef->idef();
if (item1.count != 1 || item2.count != 1 || item1.name != item2.name
|| idef->get(item1.name).type != ITEM_TOOL
|| idef->get(item2.name).type != ITEM_TOOL) {
|| itemgroup_get(idef->get(item1.name).groups, "disable_repair") == 1) {
// Failure
return ItemStack();
}