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

Function print_labor

plugins/autolabor/autolabor.cpp:1057–1074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055}
1056
1057void print_labor (df::unit_labor labor, color_ostream &out)
1058{
1059 std::string labor_name = ENUM_KEY_STR(unit_labor, labor);
1060 out << labor_name << ": ";
1061 for (int i = 0; i < 20 - (int)labor_name.length(); i++)
1062 out << ' ';
1063 if (labor_infos[labor].mode() == DISABLE)
1064 out << "disabled" << std::endl;
1065 else
1066 {
1067 if (labor_infos[labor].mode() == HAULERS)
1068 out << "haulers";
1069 else
1070 out << "minimum " << labor_infos[labor].minimum_dwarfs() << ", maximum " << labor_infos[labor].maximum_dwarfs()
1071 << ", pool " << labor_infos[labor].talent_pool();
1072 out << ", currently " << labor_infos[labor].active_dwarfs << " dwarfs" << std::endl;
1073 }
1074}
1075
1076DFhackCExport command_result plugin_enable ( color_ostream &out, bool enable )
1077{

Callers 2

autolaborFunction · 0.70
FOR_ENUM_ITEMSFunction · 0.70

Calls 5

lengthMethod · 0.80
modeMethod · 0.80
minimum_dwarfsMethod · 0.80
talent_poolMethod · 0.80
maximum_dwarfsMethod · 0.45

Tested by

no test coverage detected