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

Function list_unit_counts

plugins/autoclothing.cpp:652–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650}
651
652static void list_unit_counts(color_ostream &out, map<int, int> &unitList) {
653 for (const auto &race : unitList) {
654 if (race.second == 1)
655 out << " 1 " << Units::getRaceReadableNameById(race.first) << endl;
656 else
657 out << " " << race.second << " " << Units::getRaceNamePluralById(race.first) << endl;
658 }
659}
660
661static constexpr uint32_t bad_flags = (
662 df::item_flags::mask_in_job |

Callers 1

generate_controlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected