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:
parent
b6adb7f09e
commit
40ab3e011d
3 changed files with 33 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue