diff --git a/docs/changelog.txt b/docs/changelog.txt index 3f662b86bf..fd6b282882 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -67,7 +67,7 @@ Template for new versions: ## Removed -# 50.13-r2 +# 50.13-r3 ## New Tools - `plant`: (reinstated) tool for creating/growing/removing plants @@ -91,6 +91,7 @@ Template for new versions: - `overlay`: overlay positions are now adjusted according to the configured max interface width percentage in the DF settings - `zone`: animal assignment overlay button moved to not conflict with vanilla aquarium/terrarium button on glass cages - `zone`: allow friendly creatures to be released from cages by assigning them to a pasture zone and then unassigning them +- `autobutcher`: fix inverted ranking of which animals to butcher first ## Misc Improvements - `blueprint`: capture track carving designations in addition to already-carved tracks diff --git a/plugins/autobutcher.cpp b/plugins/autobutcher.cpp index abf39e2020..db6e23d76d 100644 --- a/plugins/autobutcher.cpp +++ b/plugins/autobutcher.cpp @@ -216,19 +216,19 @@ static void doMarkForSlaughter(df::unit *unit) { // returns true if a should be butchered before b static bool compareKids(df::unit *a, df::unit *b) { if (isHighPriority(a) != isHighPriority(b)) - return isHighPriority(a); + return isHighPriority(b); if (Units::isDomesticated(a) != Units::isDomesticated(b)) - return Units::isDomesticated(b); - return Units::getAge(a, true) < Units::getAge(b, true); + return Units::isDomesticated(a); + return Units::getAge(a, true) > Units::getAge(b, true); } // returns true if a should be butchered before b static bool compareAdults(df::unit* a, df::unit* b) { if (isHighPriority(a) != isHighPriority(b)) - return isHighPriority(a); + return isHighPriority(b); if (Units::isDomesticated(a) != Units::isDomesticated(b)) - return Units::isDomesticated(b); - return Units::getAge(a, true) > Units::getAge(b, true); + return Units::isDomesticated(a); + return Units::getAge(a, true) < Units::getAge(b, true); } struct WatchedRace {