forked from DFHack/dfhack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathno-dfhack-init.lua
More file actions
43 lines (32 loc) · 1.08 KB
/
Copy pathno-dfhack-init.lua
File metadata and controls
43 lines (32 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
-- Shows the warning about missing configuration file.
--[[
BEGIN_DOCS
.. _scripts/gui/no-dfhack-init:
gui/no-dfhack-init
==================
Shows a warning at startup if no valid ``dfhack.init`` file is found.
END_DOCS
]]
local gui = require 'gui'
local dlg = require 'gui.dialogs'
local dfhack_init = { text = 'dfhack.init', pen = COLOR_LIGHTCYAN }
local dfhack_init_example = { text = 'dfhack.init-example', pen = COLOR_LIGHTCYAN }
local message = {
'The ', dfhack_init, ' configuration file is missing. To customize', NEWLINE,
'your DFHack installation, rename the ', dfhack_init_example, ' file', NEWLINE,
'to ', dfhack_init, ' and edit it to suit your needs.', NEWLINE, NEWLINE,
'For now, ', dfhack_init_example, ' will be used instead.'
}
dfhack.print('\n')
for k,v in ipairs(message) do
if type(v) == 'table' then
dfhack.color(v.pen)
dfhack.print(v.text)
else
dfhack.color(COLOR_YELLOW)
dfhack.print(v)
end
end
dfhack.color(COLOR_RESET)
dfhack.print('\n\n')
dlg.showMessage('DFHack is not configured', message, COLOR_YELLOW)