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

Function checkRaceStocksButcherFlag

plugins/autobutcher.cpp:800–813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798}
799
800WatchedRace * checkRaceStocksButcherFlag(color_ostream &out, int race) {
801 WatchedRace * w = new WatchedRace(out, race, true, 0, 0, 0, 0);
802 for (auto unit : world->units.active) {
803 if(unit->race != race)
804 continue;
805
806 if (isInappropriateUnit(unit))
807 continue;
808
809 if (Units::isMarkedForSlaughter(unit))
810 w->PushButcherableUnit(unit);
811 }
812 return w;
813}
814
815static bool autowatch_isEnabled() {
816 return config.get_bool(CONFIG_AUTOWATCH);

Callers 1

autobutcher_getWatchListFunction · 0.85

Calls 2

isInappropriateUnitFunction · 0.85
PushButcherableUnitMethod · 0.80

Tested by

no test coverage detected