mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-29 22:03:42 +01:00
Not really important
This commit is contained in:
parent
65b51ad3e5
commit
7745ccd863
14
init.lua
14
init.lua
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user