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

Function compareKids

plugins/autobutcher.cpp:221–227  ·  view source on GitHub ↗

returns true if b should be butchered before a

Source from the content-addressed store, hash-verified

219
220// returns true if b should be butchered before a
221static bool compareKids(df::unit *a, df::unit *b) {
222 if (isHighPriority(a) != isHighPriority(b))
223 return isHighPriority(b);
224 if (Units::isDomesticated(a) != Units::isDomesticated(b))
225 return Units::isDomesticated(a);
226 return Units::getAge(a, true) > Units::getAge(b, true);
227}
228
229// returns true if b should be butchered before a
230static bool compareAdults(df::unit* a, df::unit* b) {

Callers

nothing calls this directly

Calls 1

isHighPriorityFunction · 0.85

Tested by

no test coverage detected