mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-12-01 22:43:43 +01:00
Fix messages in craft command
This commit is contained in:
parent
5446e0dbdd
commit
2d332913c5
30
init.lua
30
init.lua
@ -1745,23 +1745,23 @@ function craftguide.show(name, item, show_usages)
|
|||||||
reset_data(data)
|
reset_data(data)
|
||||||
|
|
||||||
item = reg_items[item] and item or query_item
|
item = reg_items[item] and item or query_item
|
||||||
|
local recipes, usages = get_recipes(item, data, player)
|
||||||
|
|
||||||
|
if not recipes and not usages then
|
||||||
|
if not recipes_cache[item] and not usages_cache[item] then
|
||||||
|
return false, msg(name, fmt("%s: %s",
|
||||||
|
S("No recipe or usage for this item"),
|
||||||
|
get_desc(item)))
|
||||||
|
end
|
||||||
|
|
||||||
|
return false, msg(name, fmt("%s: %s",
|
||||||
|
S("You don't know a recipe or usage for this item"),
|
||||||
|
get_desc(item)))
|
||||||
|
end
|
||||||
|
|
||||||
data.query_item = item
|
data.query_item = item
|
||||||
data.recipes, data.usages = get_recipes(item, data, player)
|
data.recipes = recipes
|
||||||
|
data.usages = usages
|
||||||
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
|
|
||||||
return false, msg(name, S("No recipe or usage for this node"))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if sfinv_only then
|
if sfinv_only then
|
||||||
data.show_usages = show_usages
|
data.show_usages = show_usages
|
||||||
|
@ -19,9 +19,8 @@ No item to show=
|
|||||||
Collect items to reveal more recipes=
|
Collect items to reveal more recipes=
|
||||||
Show recipe(s) of the pointed node=
|
Show recipe(s) of the pointed node=
|
||||||
No node pointed=
|
No node pointed=
|
||||||
You don't know a recipe for this node=
|
You don't know a recipe or usage for this item=
|
||||||
You don't know an usage for this node=
|
No recipe or usage for this item=
|
||||||
No recipe or usage for this node=
|
|
||||||
Node=
|
Node=
|
||||||
Entity=
|
Entity=
|
||||||
Craftitem=
|
Craftitem=
|
||||||
|
Loading…
Reference in New Issue
Block a user