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 #1384

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

realSquidCoder
Copy link
Contributor

idk why i didnt do this originally

Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also add a changelog entry

Comment on lines +537 to +542
adv_fn=function ()
local minsSinceSave = dfhack.persistent.getUnsavedSeconds()//60
if minsSinceSave >= 15 then
return "Last save: ".. (dfhack.formatInt(minsSinceSave)) ..' mins ago'
end
end,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks identical to the dwarf_fn. Please refactor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is identical. Is there a better way? Can i call the dwarf fn?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can refactor the common code into a function and call that function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants