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

Method getUnitByNobleRole

library/modules/Units.cpp:738–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

736}
737
738df::unit *Units::getUnitByNobleRole(string noble) {
739 vector<df::unit *> units;
740 get_units_by_noble_role(units, noble, 1);
741 if (units.empty())
742 return NULL;
743 return units[0];
744}
745
746void Units::forCitizens(std::function<void(df::unit *)> fn, bool exclude_residents, bool include_insane) {
747 for (auto unit : citizensRange(world->units.active, exclude_residents, include_insane))

Callers

nothing calls this directly

Calls 2

get_units_by_noble_roleFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected