This can be used to identify completely inappropriate units (dead, undead, not belonging to the fort, ...) that autobutcher should be ignoring.
| 650 | // This can be used to identify completely inappropriate units (dead, undead, not belonging to the fort, ...) |
| 651 | // that autobutcher should be ignoring. |
| 652 | static bool isInappropriateUnit(df::unit *unit) { |
| 653 | return !Units::isActive(unit) |
| 654 | || Units::isUndead(unit) |
| 655 | || Units::isMerchant(unit) // ignore merchants' draft animals |
| 656 | || Units::isForest(unit) // ignore merchants' caged animals |
| 657 | || !Units::isOwnCiv(unit) |
| 658 | || (!isContainedInItem(unit) && !hasValidMapPos(unit)); |
| 659 | } |
| 660 | |
| 661 | // This can be used to identify protected units that should be counted towards fort totals, but not scheduled |
| 662 | // for butchering. This way they count towards target quota, so if you order that you want 1 female adult cat |
no test coverage detected