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

Method getSquadName

library/modules/Military.cpp:42–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40using df::global::plotinfo;
41
42std::string Military::getSquadName(int32_t squad_id)
43{
44 df::squad *squad = df::squad::find(squad_id);
45 if (!squad)
46 return "";
47 if (squad->alias.size() > 0)
48 return squad->alias;
49 return Translation::translateName(&squad->name, true);
50}
51
52//only works for making squads for fort mode player controlled dwarf squads
53//could be extended straightforwardly by passing in entity

Callers

nothing calls this directly

Calls 2

findFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected