-
Notifications
You must be signed in to change notification settings - Fork 478
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
Migrate nestboxes to lua and add to autobutcher #4947
base: develop
Are you sure you want to change the base?
Conversation
pre-commit.ci autofix |
2868fad
to
4e414ba
Compare
…to get integer from persistent site config
…ount when checking and adding config for new race
for more information, see https://pre-commit.ci
4e414ba
to
c9bf89e
Compare
…tboxes_to_autobutcher # Conflicts: # docs/changelog.txt
…tboxes_to_autobutcher
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 may be missing some earlier discussion on this, but why the merge into autobutcher? The two tools don't really seem all that similar to me - sure, they both deal with animals, but autobutcher is intended to control which units get butchered automatically, and nestboxes is intended to protect the eggs of egglayers. I think autobutcher nestboxes
makes less sense than nestboxes
from an end-user perspective.
It's because of the configuration overlap. we're adding a |
Would some other name make more sense? As a historical example, I feel like this combination makes about as much sense as combining |
For the record, I didn't understand the I think this was the discussion on Discord: https://discord.com/channels/793331351645323264/807444515194798090/1284174784472547338 |
Adding |
I'm finding the proposed API a bit confusing. Let's hash out the behavior and interface in the docs before I look at the actual code |
Nestboxes rewritten in lua with enhanced functionality, added to autobutcher.
Started with DFHack/scripts#1296, moved to dfhack to add as part of autobutcher
Attached performance check after ~1 year with 14 nestboxes and birds assigned to all of them. Script checks created egg item when called from eventful on ITEM_CREATED event.
dfhack-perf-counters.dat
Summary
Measuring unpaused time only
elapsed 1299094 ms (21m 39s)
dfhack 118211 ms ( 9.10% of elapsed)
DFHack details
keybinding 16 ms ( 0.01% of dfhack, 0.00% of elapsed)
update 25355 ms ( 21.45% of dfhack, 1.95% of elapsed)
overlay 92809 ms ( 78.51% of dfhack, 7.14% of elapsed)
zscreen 31 ms ( 0.03% of dfhack, 0.00% of elapsed)
Update details
event manager 4087 ms ( 16.12% of update, 0.31% of elapsed)
plugin onUpdate 17178 ms ( 67.75% of update, 1.32% of elapsed)
lua timers 3194 ms ( 12.60% of update, 0.25% of elapsed)
Event manager per event type
Event manager JOB_INITIATED event per plugin
Event manager JOB_COMPLETED event per plugin
Event manager BUILDING event per plugin
Event manager UNIT_NEW_ACTIVE event per plugin
Event manager ITEM_CREATED event per plugin
Event manager JOB_STARTED event per plugin
Update per plugin
State change per plugin
Lua timer details
Overlay details
ZScreen details