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

Function doMarkForSlaughter

plugins/autobutcher.cpp:211–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211static void doMarkForSlaughter(df::unit *unit) {
212 DEBUG(cycle).print("marking unit {} for slaughter: {}, {}, high priority: {}, age: {:.2f}\n",
213 unit->id, Units::getReadableName(unit),
214 Units::isFemale(unit) ? "female" : "male",
215 isHighPriority(unit) ? "yes" : "no",
216 Units::getAge(unit));
217 unit->flags2.bits.slaughter = 1;
218}
219
220// returns true if b should be butchered before a
221static bool compareKids(df::unit *a, df::unit *b) {

Callers 2

ProcessUnitsMethod · 0.85
autobutcher_butcherRaceFunction · 0.85

Calls 2

isHighPriorityFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected