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

Function checkRaceStocksButcherable

plugins/autobutcher.cpp:783–798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781}
782
783WatchedRace * checkRaceStocksButcherable(color_ostream &out, int race) {
784 WatchedRace * w = new WatchedRace(out, race, true, 0, 0, 0, 0);
785 for (auto unit : world->units.active) {
786 if (unit->race != race)
787 continue;
788
789 if ( isInappropriateUnit(unit)
790 || !Units::isTame(unit)
791 || isProtectedUnit(unit)
792 )
793 continue;
794
795 w->PushButcherableUnit(unit);
796 }
797 return w;
798}
799
800WatchedRace * checkRaceStocksButcherFlag(color_ostream &out, int race) {
801 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