Compare commits

..

2 Commits
1.9 ... 1.9a

Author SHA1 Message Date
8e2903be03 Fix messages in craft command 2019-10-04 01:00:04 +02:00
5446e0dbdd Update README + API 2019-10-04 00:45:49 +02:00
2 changed files with 10 additions and 15 deletions

View File

@ -1745,24 +1745,20 @@ 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 and not usages then
if not recipes_cache[item] and not usages_cache[item] then
return false, msg(name, S("No recipe or usage for this node"))
end
return false, msg(name, S("You don't know a recipe or usage for this node"))
end
data.query_item = item
data.recipes = recipes
data.usages = usages
if sfinv_only then
data.show_usages = show_usages
end
@ -1791,7 +1787,7 @@ register_command("craft", {
end
if not node_name then
return false, clr("red", "[craftguide] ") .. S("No node pointed")
return false, msg(name, S("No node pointed"))
end
return true, craftguide.show(name, node_name)

View File

@ -19,8 +19,7 @@ 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=
You don't know a recipe or usage for this node=
No recipe or usage for this node=
Node=
Entity=