mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-29 22:03:42 +01:00
Fix get_filtered_items()
This commit is contained in:
parent
4560457504
commit
b3bba5c2ff
11
init.lua
11
init.lua
@ -180,19 +180,14 @@ local function get_filtered_items(player)
|
|||||||
for i = 1, #init_items do
|
for i = 1, #init_items do
|
||||||
local item = init_items[i]
|
local item = init_items[i]
|
||||||
local recipes = recipes_cache[item]
|
local recipes = recipes_cache[item]
|
||||||
|
local fuel = fuel_cache[item]
|
||||||
|
|
||||||
if not recipes and fuel_cache[item] then
|
if recipes and #apply_recipe_filters(recipes, player) > 0 or
|
||||||
recipes = table_merge(get_item_usages(item), recipes)
|
fuel and #apply_recipe_filters(get_item_usages(item), player) > 0 then
|
||||||
end
|
|
||||||
|
|
||||||
if recipes then
|
|
||||||
recipes = apply_recipe_filters(recipes, player)
|
|
||||||
if #recipes > 0 then
|
|
||||||
c = c + 1
|
c = c + 1
|
||||||
items[c] = item
|
items[c] = item
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
return items
|
return items
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user