| 1911 | } |
| 1912 | |
| 1913 | void print_labor(df::unit_labor labor, color_ostream &out) |
| 1914 | { |
| 1915 | string labor_name = ENUM_KEY_STR(unit_labor, labor); |
| 1916 | out << labor_name << ": "; |
| 1917 | for (int i = 0; i < 20 - (int)labor_name.length(); i++) |
| 1918 | out << ' '; |
| 1919 | const auto& labor_info = labor_infos[labor]; |
| 1920 | if (labor_info.is_unmanaged()) |
| 1921 | { |
| 1922 | out << "UNMANAGED"; |
| 1923 | } |
| 1924 | else |
| 1925 | { |
| 1926 | out << "priority " << labor_info.priority(); |
| 1927 | |
| 1928 | if (labor_info.maximum_dwarfs() == MAX_DWARFS_NONE) |
| 1929 | out << ", no maximum"; |
| 1930 | else |
| 1931 | out << ", maximum " << labor_info.maximum_dwarfs(); |
| 1932 | } |
| 1933 | out << ", currently " << labor_info.active_dwarfs << " dwarfs (" |
| 1934 | << labor_info.busy_dwarfs << " busy, " |
| 1935 | << labor_info.idle_dwarfs << " idle)" |
| 1936 | << endl; |
| 1937 | } |
| 1938 | |
| 1939 | df::unit_labor lookup_labor_by_name(std::string name) |
| 1940 | { |
no test coverage detected