summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-12-23 18:01:13 +0100
committerWuzzy <almikes@aol.com>2016-12-23 18:01:13 +0100
commitef37c38ca4a28413b6427550f1a717e0dca05cc4 (patch)
tree745b7a2b27502a8ff0bf88c8989e0ad24c416b16
parent825cc52f2956ca9c3c38397d8dfafc9e56fafde0 (diff)
Use red color in error messages
-rw-r--r--init.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/init.lua b/init.lua
index 6d07ccc..90dc64f 100644
--- a/init.lua
+++ b/init.lua
@@ -42,6 +42,7 @@ local DOC_INTRO = S("This is the help.")
local COLOR_NOT_VIEWED = "#00FFFF" -- cyan
local COLOR_VIEWED = "#FFFFFF" -- white
local COLOR_HIDDEN = "#999999" -- gray
+local COLOR_ERROR = "#FF0000" -- red
local CATEGORYFIELDSIZE = {
WIDTH = math.ceil(doc.FORMSPEC.WIDTH / 4),
@@ -755,7 +756,7 @@ function doc.formspec_error_no_categories()
local formstring = "size[8,6]textarea[0.25,0;8,6;;"
formstring = formstring ..
minetest.formspec_escape(
- S("Error: No help available.") .. "\n\n" ..
+ core.colorize(COLOR_ERROR, S("Error: No help available.")) .. "\n\n" ..
S("No categories have been registered, but they are required to provide help.\nThe Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again.")) .. "\n\n" ..
S("Recommended mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia.")
formstring = formstring .. ";]button_exit[3,5;2,1;okay;"..F("OK").."]"
@@ -765,8 +766,7 @@ end
function doc.formspec_error_hidden(category_id, entry_id)
local formstring = "size[8,6]textarea[0.25,0;8,6;;"
formstring = formstring .. minetest.formspec_escape(
- DOC_INTRO .. "\n\n" ..
- S("Error: Access denied.") .. "\n\n" ..
+ core.colorize(COLOR_ERROR, S("Error: Access denied.")) .. "\n\n" ..
S("Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry."))
formstring = formstring .. ";]button_exit[3,5;2,1;okay;"..F("OK").."]"
return formstring
@@ -811,7 +811,7 @@ function doc.generate_entry_list(cid, playername)
if doc.entry_viewed(playername, cid, eid) then
viewedprefix = "#FF4444"
else
- viewedprefix = "#FF0000"
+ viewedprefix = COLOR_ERROR
end
elseif doc.entry_viewed(playername, cid, eid) then
viewedprefix = COLOR_VIEWED