DFHack / dfhack

Memory hacking library for Dwarf Fortress and a set of tools that use it
Other
1.87k stars 475 forks source link

Plugin suggestion: Automatically forbidding eggs #757

Closed lethosor closed 3 years ago

lethosor commented 8 years ago

This has been suggested on the forums a few times, usually involving the ability to watch certain nestboxes. It would also be nice to watch eggs of certain creatures, although this could also be influenced by restricting nestboxes to certain creatures (I don't remember to what extent this is possible in DF).

https://github.com/lethosor/dfhack/tree/nestbox-guard may work, although it doesn't reliably cancel egg hauling jobs that already have a worker, from what I remember.

warmist commented 8 years ago

I would love for someone to do more work on jobs. I know that "Creating a new job" is a HUGE undertaking (if job type can be anything) and have started on it. If anyone wants i could post what is already done. As for current thing: a function cancel ANY job would be very useful in general case. What to look out though: unmark injob items, visit all general refs and unlink the target (might be a lot of cases) - this also includes the worker.

expwnent commented 8 years ago

Wouldn't it be enough to just periodically check how many eggs there are and forbid the oldest ones if there are too few and they're not already in a job?

expwnent commented 8 years ago

@lethosor Does your plugin leak memory for cancelled jobs? Specifically the job_list_link struct.

lethosor commented 3 years ago

Done in #1395