MCPcopy Create free account
hub / github.com/DFHack/dfhack / compareAdults

Function compareAdults

plugins/autobutcher.cpp:230–236  ·  view source on GitHub ↗

returns true if b should be butchered before a

Source from the content-addressed store, hash-verified

228
229// returns true if b should be butchered before a
230static bool compareAdults(df::unit* a, df::unit* b) {
231 if (isHighPriority(a) != isHighPriority(b))
232 return isHighPriority(b);
233 if (Units::isDomesticated(a) != Units::isDomesticated(b))
234 return Units::isDomesticated(a);
235 return Units::getAge(a, true) < Units::getAge(b, true);
236}
237
238struct WatchedRace {
239public:

Callers

nothing calls this directly

Calls 1

isHighPriorityFunction · 0.85

Tested by

no test coverage detected