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

Function get_noble_position_id

library/modules/Units.cpp:688–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686}
687
688static int32_t get_noble_position_id(const df::historical_entity::T_positions &positions, const string &noble) {
689 string target_id = toUpper_cp437(noble);
690 for (auto position : positions.own)
691 if (position->code == target_id)
692 return position->id;
693 return -1;
694}
695
696static void add_assigned_noble_units(vector<df::unit *> &units,
697 const df::historical_entity::T_positions &positions, int32_t noble_position_id, size_t limit)

Callers 1

add_entity_noblesFunction · 0.85

Calls 1

toUpper_cp437Function · 0.85

Tested by

no test coverage detected