mirror of
https://github.com/minetest-mods/craftguide.git
synced 2025-02-12 02:10:25 +01:00
Fix crash
This commit is contained in:
parent
001176b124
commit
c9773f1ee9
9
init.lua
9
init.lua
@ -590,10 +590,15 @@ local function get_recipes(item, data, player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local no_recipes = not recipes or #recipes == 0
|
local no_recipes = not recipes or #recipes == 0
|
||||||
|
|
||||||
if no_recipes and not usages then
|
if no_recipes and not usages then
|
||||||
return
|
return
|
||||||
elseif sfinv_only and usages and no_recipes then
|
elseif sfinv_only then
|
||||||
data.show_usages = true
|
if usages and no_recipes then
|
||||||
|
data.show_usages = true
|
||||||
|
elseif recipes and not usages then
|
||||||
|
data.show_usages = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not sfinv_only or (sfinv_only and data.show_usages) then
|
if not sfinv_only or (sfinv_only and data.show_usages) then
|
||||||
|
Loading…
Reference in New Issue
Block a user