Hide repair recipes if disable_repair=1 is set
This commit is contained in:
parent
68c373d2b8
commit
56ff8fbad5
1 changed files with 10 additions and 8 deletions
|
@ -26,14 +26,16 @@ local get_recipes = function(query_item)
|
|||
if recipes == nil then
|
||||
recipes = {}
|
||||
end
|
||||
table.insert(recipes, {
|
||||
type = "normal",
|
||||
width = 0,
|
||||
items = { [1] = query_item, [2] = query_item },
|
||||
output = query_item,
|
||||
-- Special marker for repairing recipes
|
||||
_is_toolrepair = true,
|
||||
})
|
||||
if minetest.get_item_group(query_item, "disable_repair") ~= 1 then
|
||||
table.insert(recipes, {
|
||||
type = "normal",
|
||||
width = 0,
|
||||
items = { [1] = query_item, [2] = query_item },
|
||||
output = query_item,
|
||||
-- Special marker for repairing recipes
|
||||
_is_toolrepair = true,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
return recipes
|
||||
|
|
Reference in a new issue