From 7745ccd863ddab8986f1fa6e08204168aab3f1f0 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Sun, 30 Dec 2018 21:10:39 +0100 Subject: [PATCH] Not really important --- init.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index c961a66..67500ae 100644 --- a/init.lua +++ b/init.lua @@ -72,8 +72,14 @@ craftguide.register_craft({ items = {"default:stone"}, }) -local function colorize(str) - return mt.colorize("#FFFF00", str) +local color_codes = { + red = "#FF0000", + yellow = "#FFFF00", +} + +local function colorize(str, color) + color = color or "yellow" + return mt.colorize(color_codes[color], str) end local function get_fueltime(item) @@ -794,7 +800,7 @@ if not progressive_mode then end 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 init_datas(player, name) end @@ -808,7 +814,7 @@ if not progressive_mode then local no_recipes = not next(recipes) if no_recipes and not is_fuel then - return false, colorize("[craftguide] ") .. + return false, colorize("[craftguide] ", "red") .. S("No recipe for this node:") .. " " .. colorize(node_name) end