Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add save reminder to Adv mode and change colors based on how long it has been since a save #1384

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
6 changes: 6 additions & 0 deletions internal/notify/notifications.lua
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,12 @@ NOTIFICATIONS_BY_IDX = {
return "Last save: ".. (dfhack.formatInt(minsSinceSave)) ..' mins ago'
end
end,
adv_fn=function ()
local minsSinceSave = dfhack.persistent.getUnsavedSeconds()//60
if minsSinceSave >= 15 then
return "Last save: ".. (dfhack.formatInt(minsSinceSave)) ..' mins ago'
end
end,
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved
on_click=function()
local minsSinceSave = dfhack.persistent.getUnsavedSeconds()//60
local message = 'It has been ' .. dfhack.formatInt(minsSinceSave) .. ' minutes since your last save. \n\nWould you like to save now? ' ..
Expand Down