mirror of
https://github.com/minetest-mods/craftguide.git
synced 2025-06-28 14:16:16 +02:00
Compare commits
1 Commits
be4aebdacd
...
1.9.1
Author | SHA1 | Date | |
---|---|---|---|
06c5307a45 |
21
init.lua
21
init.lua
@ -1745,23 +1745,16 @@ function craftguide.show(name, item, show_usages)
|
||||
reset_data(data)
|
||||
|
||||
item = reg_items[item] and item or query_item
|
||||
local recipes, usages = get_recipes(item, data, player)
|
||||
|
||||
data.query_item = item
|
||||
data.recipes, data.usages = get_recipes(item, data, player)
|
||||
|
||||
if not data.recipes and not data.usages then
|
||||
if recipes_cache[item] then
|
||||
return false, msg(name, S("You don't know a recipe for this node"))
|
||||
end
|
||||
|
||||
if usages_cache[item] then
|
||||
return false, msg(name, S("You don't know an usage for this node"))
|
||||
end
|
||||
|
||||
if not recipes_cache[item] and not usages_cache[item] then
|
||||
if not recipes and not usages and
|
||||
not recipes_cache[item] and not usages_cache[item] then
|
||||
return false, msg(name, S("No recipe or usage for this node"))
|
||||
end
|
||||
end
|
||||
|
||||
data.query_item = item
|
||||
data.recipes = recipes
|
||||
data.usages = usages
|
||||
|
||||
if sfinv_only then
|
||||
data.show_usages = show_usages
|
||||
|
@ -19,8 +19,6 @@ No item to show=
|
||||
Collect items to reveal more recipes=
|
||||
Show recipe(s) of the pointed node=
|
||||
No node pointed=
|
||||
You don't know a recipe for this node=
|
||||
You don't know an usage for this node=
|
||||
No recipe or usage for this node=
|
||||
Node=
|
||||
Entity=
|
||||
|
Reference in New Issue
Block a user