Fix crash

This commit is contained in:
Jean-Patrick Guerrero 2020-01-12 09:47:51 +01:00
parent 001176b124
commit c9773f1ee9
1 changed files with 7 additions and 2 deletions

View File

@ -590,10 +590,15 @@ local function get_recipes(item, data, player)
end
local no_recipes = not recipes or #recipes == 0
if no_recipes and not usages then
return
elseif sfinv_only and usages and no_recipes then
data.show_usages = true
elseif sfinv_only then
if usages and no_recipes then
data.show_usages = true
elseif recipes and not usages then
data.show_usages = nil
end
end
if not sfinv_only or (sfinv_only and data.show_usages) then