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

Silence stuck-worship.lua spam #1309

Merged
merged 6 commits into from
Oct 2, 2024
Merged

Silence stuck-worship.lua spam #1309

merged 6 commits into from
Oct 2, 2024

Conversation

Bumber64
Copy link
Contributor

Stop fix/stuck-worship.lua from spamming the console every time it shuffles prayer.

@myk002
Copy link
Member

myk002 commented Sep 28, 2024

In general, I want the tools printing out when they do something so the player can see that enabling the tool is actually working. The problem here, of course, is that fixing prayer needs is super frequent. I don't want to remove the output outright, but I'd be open to reducing it somehow.

You could introduce -q/--quiet and -v/--verbose options. The verbose output could be the current full name output. regular output would be the number of units that were unstuck. quiet output would avoid printing the number of unstuck units if that number is 0. would that be better? the control panel registry could then be updated to pass -q.

@Bumber64
Copy link
Contributor Author

Bumber64 commented Sep 28, 2024

quiet output would avoid printing the number of unstuck units if that number is 0.

Should that not just be the default? If you're running it manually, you can assume no output means 0 units. If it's running automatically, then we already want to suppress 0.

Edit: I made it print 0 if you're using verbose. fix/dry-buckets had a quiet option that wasn't documented.

* Update stuck-worship.lua
* Update dry-buckets.rst
* Update stuck-worship.rst
* Update changelog.txt
@myk002
Copy link
Member

myk002 commented Sep 29, 2024

The behavior I suggest (that most other tools conform to, but not fix/dry-buckets) is to print out how many things were affected/changed by default, even if it's 0. This is to give the player some feedback when they run the tool manually that it did what it was supposed to do and didn't just fail.

This is, of course, not required when it is run from repeat, so the control panel is configured to pass -q to many tools to not print out anything when zero things happened.

* Update stuck-worship.rst
* Update stuck-worship.lua
* Update registry.lua
@Bumber64
Copy link
Contributor Author

pre-commit.ci autofix

docs/fix/dry-buckets.rst Show resolved Hide resolved
@myk002 myk002 merged commit 0f84c3a into DFHack:master Oct 2, 2024
10 checks passed
@Bumber64 Bumber64 deleted the worship_spam branch October 2, 2024 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants