| 1953 | } |
| 1954 | |
| 1955 | DFhackCExport command_result plugin_enable(color_ostream &out, bool enable) |
| 1956 | { |
| 1957 | if (!Core::getInstance().isWorldLoaded()) { |
| 1958 | out.printerr("World is not loaded: please load a fort first.\n"); |
| 1959 | return CR_FAILURE; |
| 1960 | } |
| 1961 | |
| 1962 | if (enable && !enable_labormanager) |
| 1963 | { |
| 1964 | enable_plugin(out); |
| 1965 | } |
| 1966 | else if (!enable && enable_labormanager) |
| 1967 | { |
| 1968 | enable_labormanager = false; |
| 1969 | setOptionEnabled(CF_ENABLED, false); |
| 1970 | |
| 1971 | out << "LaborManager is disabled." << endl; |
| 1972 | } |
| 1973 | |
| 1974 | return CR_OK; |
| 1975 | } |
| 1976 | |
| 1977 | command_result labormanager(color_ostream &out, std::vector <std::string> & parameters) |
| 1978 | { |
nothing calls this directly
no test coverage detected