Skip to content

Commit

Permalink
tweak prerelease pack warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lethosor committed Dec 25, 2015
1 parent 7fe71c9 commit d4b631d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions scripts/gui/prerelease-warning.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,25 @@ local gui = require 'gui'
local dlg = require 'gui.dialogs'
local utils = require 'utils'

local message = {
message = {
'This is a prerelease build of DFHack. Some structures are likely', NEWLINE,
'to be incorrect, resulting in crashes or save corruption', NEWLINE,
{pen=COLOR_LIGHTRED, text='Make backups of your saves and avoid saving if possible.'}, NEWLINE,
{pen=COLOR_LIGHTRED, text='Make backups of your saves and avoid saving if possible.'},
}

pack_message = pack_message or [[
This should not be enabled by default in a pack.
If you are seeing this message and did not enable/install DFHack
yourself, please report this to your pack's maintainer.]]

path = dfhack.getHackPath():lower()
if path:find('lnp') or path:find('starter') or path:find('newb') or path:find('lazy') or path:find('pack') then
local pack_msg = [[
Under no circumstances should this be enabled by default in a pack.
If you are seeing this message and did not enable DFHack yourself,
please report this to your pack's maintainer.]]
for _, v in pairs(utils.split_string(pack_msg, '\n')) do
if #pack_message > 0 and (path:find('lnp') or path:find('starter') or path:find('newb') or path:find('lazy') or path:find('pack')) then
for _, v in pairs(utils.split_string(pack_message, '\n')) do
table.insert(message, NEWLINE)
table.insert(message, {text=v, pen=COLOR_LIGHTMAGENTA})
end
pack_message = ''
end

dfhack.print('\n')
Expand Down

0 comments on commit d4b631d

Please sign in to comment.