MCPcopy Create free account
hub / github.com/DFHack/dfhack / command_result plugin_enable

Function command_result plugin_enable

plugins/autolabor/labormanager.cpp:1955–1975  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1953}
1954
1955DFhackCExport 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
1977command_result labormanager(color_ostream &out, std::vector <std::string> & parameters)
1978{

Callers

nothing calls this directly

Calls 2

enable_pluginFunction · 0.70
setOptionEnabledFunction · 0.70

Tested by

no test coverage detected