mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-26 12:33:43 +01:00
Fix error message in progressive mode
This commit is contained in:
parent
6e744b44b1
commit
e37f1df6d3
14
init.lua
14
init.lua
@ -941,9 +941,10 @@ mt.register_chatcommand("craft", {
|
||||
end
|
||||
end
|
||||
|
||||
local red = mt.colorize("red", "[craftguide] ")
|
||||
|
||||
if not node_name then
|
||||
return false, mt.colorize("red", "[craftguide] ") ..
|
||||
S("No node pointed")
|
||||
return false, red .. S("No node pointed")
|
||||
end
|
||||
|
||||
local data = player_data[name]
|
||||
@ -957,15 +958,18 @@ mt.register_chatcommand("craft", {
|
||||
end
|
||||
|
||||
if not recipes or #recipes == 0 then
|
||||
local ylw = mt.colorize("yellow", node_name)
|
||||
local msg = red .. "%s: " .. ylw
|
||||
|
||||
if is_fuel then
|
||||
recipes = get_item_usages(node_name)
|
||||
if #recipes > 0 then
|
||||
data.show_usages = true
|
||||
end
|
||||
elseif recipes_cache[node_name] then
|
||||
return false, fmt(msg, S("You don't know a recipe for this node"))
|
||||
else
|
||||
return false, mt.colorize("red", "[craftguide] ") ..
|
||||
S("No recipe for this node:") .. " " ..
|
||||
mt.colorize("yellow", node_name)
|
||||
return false, fmt(msg, S("No recipe for this node"))
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user