summaryrefslogtreecommitdiff
path: root/src/craftdef.cpp
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2018-10-16 06:25:34 +0200
committerParamat <paramat@users.noreply.github.com>2018-10-16 05:25:34 +0100
commit40ab3e011de5be83b342e5d2b67c2837294b2d58 (patch)
tree64f5379133fe2c47ee19428d29129cea35e4bab8 /src/craftdef.cpp
parentb6adb7f09e4375f145c3ddb592527c1dd0b026a2 (diff)
downloadminetest-40ab3e011de5be83b342e5d2b67c2837294b2d58.tar.gz
minetest-40ab3e011de5be83b342e5d2b67c2837294b2d58.tar.bz2
minetest-40ab3e011de5be83b342e5d2b67c2837294b2d58.zip
Add disable_repair group to prevent tool repair (#7381)
Diffstat (limited to 'src/craftdef.cpp')
-rw-r--r--src/craftdef.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/craftdef.cpp b/src/craftdef.cpp
index 922ea345e..d64b7e55e 100644
--- a/src/craftdef.cpp
+++ b/src/craftdef.cpp
@@ -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();
}