Only show prerelease warning once

develop
lethosor 2016-01-16 11:12:36 -05:00
parent 15a9d7f491
commit ba3731016b
1 changed files with 3 additions and 0 deletions

@ -7,6 +7,8 @@ Shows a warning on world load for pre-release builds.
=end]] =end]]
shown = shown or false
if shown then return end
if not dfhack.isPrerelease() then qerror('not a prerelease build') end if not dfhack.isPrerelease() then qerror('not a prerelease build') end
-- Don't fire during worldgen -- Don't fire during worldgen
if dfhack.internal.getAddress('gametype') and df.global.gametype == df.game_type.NONE then if dfhack.internal.getAddress('gametype') and df.global.gametype == df.game_type.NONE then
@ -54,3 +56,4 @@ dfhack.color(COLOR_RESET)
dfhack.print('\n\n') dfhack.print('\n\n')
dlg.showMessage('Warning', message, COLOR_YELLOW) dlg.showMessage('Warning', message, COLOR_YELLOW)
shown = true