Not really important

This commit is contained in:
Jean-Patrick Guerrero 2018-12-30 21:10:39 +01:00
parent 65b51ad3e5
commit 7745ccd863
1 changed files with 10 additions and 4 deletions

View File

@ -72,8 +72,14 @@ craftguide.register_craft({
items = {"default:stone"}, items = {"default:stone"},
}) })
local function colorize(str) local color_codes = {
return mt.colorize("#FFFF00", str) red = "#FF0000",
yellow = "#FFFF00",
}
local function colorize(str, color)
color = color or "yellow"
return mt.colorize(color_codes[color], str)
end end
local function get_fueltime(item) local function get_fueltime(item)
@ -794,7 +800,7 @@ if not progressive_mode then
end end
if not node_name then if not node_name then
return false, colorize("[craftguide] ") .. S("No node pointed") return false, colorize("[craftguide] ", "red") .. S("No node pointed")
elseif not datas[name] then elseif not datas[name] then
init_datas(player, name) init_datas(player, name)
end end
@ -808,7 +814,7 @@ if not progressive_mode then
local no_recipes = not next(recipes) local no_recipes = not next(recipes)
if no_recipes and not is_fuel then if no_recipes and not is_fuel then
return false, colorize("[craftguide] ") .. return false, colorize("[craftguide] ", "red") ..
S("No recipe for this node:") .. " " .. S("No recipe for this node:") .. " " ..
colorize(node_name) colorize(node_name)
end end