-
Notifications
You must be signed in to change notification settings - Fork 218
New Feature: autotraining
#1411
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
Conversation
Code for dwarves to hit the gym when they yearn for the gains. Assigns Dwarves to a military squad until they have fulfilled their need for Martial Training
Here are some observations:
|
|
Ok thats not a terrible idea. the original name was just
the reason you need to make a squad (tho i want to make the script make it's own squad in a later stage) is because it lets you give them the proper schedule and teacher leader.
its not supposed to replace the leader, have you seen it doing that? |
you can set up ppl to be ignored but auto ignoring ppl is not a bad idea either. who all should be ignored you think? |
actually, because i intend this to join the automation tab, perhaps |
- Clean up documentation - Add option to change squad name. - persist the enabled state, the threshold, and the squad name. - fixed findNeed function - renamed script to `autotraining` - made the ignore flag more clear and more changable - fixed 1 sided military link in `addTraining`
Also tell the user when data was persisted (mostly for debugging)
and update the docs to account.
Co-authored-by: Christian Doczkal <[email protected]>
improvements to `autotraining`: - fix the argument error - avoid the double execution of the loop when enabling - consistently only count ignored units when they would otherwise qualify for training - allow enabling the tool from within `gui/autotraining` - sort the list of training candidates, so that the most needed candidates are preferred for training - move the argument handling out of the `start` function Co-Authored-By: Christian Doczkal <[email protected]>
pre-commit.ci autofix |
Needs a changelog, otherwise I think this is ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see anything bad enough to justify delaying a merge.
I have some quibbles with command-line processing and with the enable/disable code.
enable autotraining
disable autotraining
It doesn't appear that these command-line commands will work. (not verified.)
I somewhat question the need for autotraining
as a separate script. It seems to me that it could be rolled into gui/autotraining
.
|
This pull-request adds both: |
Is everyone ok with a squash merge on this one? |
During one of my last sessions I noticed something that I cannot yet explain:
The expected behavior would be 9 training units and 4 waiting units, no? |
@chdoc frack its still doing that? as far as i know that thats a miscount bug not a wrong effect bug, i thought i had fixed all of them tho... edit: wait no, what i misread that... what is it doing there? (still think we can merge this to get more testers) |
@ab9rf everything seems to have passed so if the others have no issues im cool with a squash and merge. (and of course i'll be around to fix any bugs that are found in the next release) |
Code for dwarves to hit the gym when they yearn for the gains. Assigns dwarves to a military squad until they have fulfilled their need for Martial Training