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

Method select_profession

plugins/manipulator.cpp:1063–1074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1061 }
1062 }
1063 void select_profession(size_t selected)
1064 {
1065 if (manager.templates.empty() || selected >= manager.templates.size())
1066 return;
1067 ProfessionTemplate prof = manager.templates[selected];
1068
1069 for (UnitInfo *u : units)
1070 {
1071 if (!u || !u->unit || !u->allowEdit) continue;
1072 prof.apply(u);
1073 }
1074 }
1075 void render()
1076 {
1077 dfhack_viewscreen::render();

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected