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 options to autonick #360

Merged
merged 7 commits into from
Mar 29, 2022
Merged

add options to autonick #360

merged 7 commits into from
Mar 29, 2022

Conversation

Moth-Tolias
Copy link
Contributor

@Moth-Tolias Moth-Tolias commented Mar 28, 2022

three real changes, whoops.

  • first, listens for -h and --help options. help is also displayed if commands are used, as autonick has none.
  • second, add a dialogue to confirm that the user actually wants to nickname, suppressable with -f / --force require the use of the command all to proceed, eg autonick all. together with 1, this resolves autonick does not listen for "help" or "-help" args dfhack#2050.
  • third, report the number of dwarves given nicknames and if autonick.txt has ran out of names, suppressable with -q / --quiet.

something that might be nice (but that i haven't done yet) is to raise an error if the user is not in fort mode, since it doesn't really make sense to run it anywhere else. another possible improvement would be to assume -f if no console exists, so existing configs don't break.

autonick.lua Outdated Show resolved Hide resolved
autonick.lua Outdated Show resolved Hide resolved
@Moth-Tolias Moth-Tolias requested a review from myk002 March 29, 2022 00:40
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.

other than one minor nit, looks good! could you add a changelog entry?

edit: ok two minor nits. the changelog entry request counts as a nit

autonick.lua Outdated Show resolved Hide resolved
@Moth-Tolias
Copy link
Contributor Author

hopefully this looks ok now.

@Moth-Tolias
Copy link
Contributor Author

missed a couple backticks, whoops! hopefully this should be all good now, for real this time

autonick.lua Outdated Show resolved Hide resolved
@myk002 myk002 merged commit 946fdff into DFHack:master Mar 29, 2022
@Moth-Tolias Moth-Tolias deleted the autonick-options branch March 29, 2022 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

autonick does not listen for "help" or "-help" args
2 participants