mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-05 09:40:22 +01:00
Merge branch 'master' of https://github.com/minetest-mods/craftguide
This commit is contained in:
commit
17a8c5ddd8
12
init.lua
12
init.lua
|
@ -466,8 +466,10 @@ local function extract_groups(str)
|
|||
end
|
||||
|
||||
local function item_in_recipe(item, recipe)
|
||||
local clean_item = reg_aliases[item] or item
|
||||
for _, recipe_item in pairs(recipe.items) do
|
||||
if recipe_item == item then
|
||||
local clean_recipe_item = reg_aliases[recipe_item] or recipe_item
|
||||
if clean_recipe_item == clean_item then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
@ -575,9 +577,9 @@ local function cache_recipes(output)
|
|||
end
|
||||
|
||||
local function get_recipes(item, data, player)
|
||||
local recipes = recipes_cache[item]
|
||||
local usages = usages_cache[item]
|
||||
|
||||
local clean_item = reg_aliases[item] or item
|
||||
local recipes = recipes_cache[clean_item]
|
||||
local usages = usages_cache[clean_item]
|
||||
if recipes then
|
||||
recipes = apply_recipe_filters(recipes, player)
|
||||
end
|
||||
|
@ -1538,6 +1540,8 @@ local function fields(player, _f)
|
|||
item = sub(item, 1, -5)
|
||||
end
|
||||
|
||||
item = reg_aliases[item] or item
|
||||
|
||||
if sfinv_only then
|
||||
if item ~= data.query_item then
|
||||
data.show_usages = nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user