mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-23 03:13:44 +01:00
Mitigate the performance regression since fc2d2e5
This commit is contained in:
parent
3f44ae00d2
commit
4560457504
@ -85,7 +85,7 @@ Returns a map of recipe filters, indexed by name.
|
|||||||
|
|
||||||
#### `craftguide.show(player_name, item, show_usages)`
|
#### `craftguide.show(player_name, item, show_usages)`
|
||||||
|
|
||||||
Opens the craft guide with the current filter applied.
|
Opens the Crafting Guide with the current filter applied.
|
||||||
|
|
||||||
* `player_name`: string param.
|
* `player_name`: string param.
|
||||||
* `item`: optional, string param. If set, this item is pre-selected. If the item does not exist or has no recipe, use the player's previous selection. By default, player's previous selection is used
|
* `item`: optional, string param. If set, this item is pre-selected. If the item does not exist or has no recipe, use the player's previous selection. By default, player's previous selection is used
|
||||||
|
2
init.lua
2
init.lua
@ -181,7 +181,7 @@ local function get_filtered_items(player)
|
|||||||
local item = init_items[i]
|
local item = init_items[i]
|
||||||
local recipes = recipes_cache[item]
|
local recipes = recipes_cache[item]
|
||||||
|
|
||||||
if fuel_cache[item] then
|
if not recipes and fuel_cache[item] then
|
||||||
recipes = table_merge(get_item_usages(item), recipes)
|
recipes = table_merge(get_item_usages(item), recipes)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user