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

Function checkRaceStocksProtected

plugins/autobutcher.cpp:768–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766}
767
768WatchedRace * checkRaceStocksProtected(color_ostream &out, int race) {
769 WatchedRace * w = new WatchedRace(out, race, true, 0, 0, 0, 0);
770 for (auto unit : world->units.active) {
771 if (unit->race != race)
772 continue;
773
774 if (isInappropriateUnit(unit))
775 continue;
776
777 if (!Units::isTame(unit) || isProtectedUnit(unit))
778 w->PushButcherableUnit(unit);
779 }
780 return w;
781}
782
783WatchedRace * checkRaceStocksButcherable(color_ostream &out, int race) {
784 WatchedRace * w = new WatchedRace(out, race, true, 0, 0, 0, 0);

Callers 1

autobutcher_getWatchListFunction · 0.85

Calls 3

isInappropriateUnitFunction · 0.85
isProtectedUnitFunction · 0.85
PushButcherableUnitMethod · 0.80

Tested by

no test coverage detected