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

Function command_result plugin_enable

plugins/autolabor/autolabor.cpp:1076–1093  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1074}
1075
1076DFhackCExport command_result plugin_enable ( color_ostream &out, bool enable )
1077{
1078 if (!Core::getInstance().isMapLoaded() || !World::isFortressMode()) {
1079 out.printerr("Cannot enable {} without a loaded fort.\n", plugin_name);
1080 return CR_FAILURE;
1081 }
1082
1083 if (enable && !enable_autolabor)
1084 {
1085 enable_plugin(out);
1086 }
1087 else if(!enable && enable_autolabor)
1088 {
1089 disable_plugin(out);
1090 }
1091
1092 return CR_OK;
1093}
1094
1095command_result autolabor (color_ostream &out, std::vector <std::string> & parameters)
1096{

Callers

nothing calls this directly

Calls 2

disable_pluginFunction · 0.85
enable_pluginFunction · 0.70

Tested by

no test coverage detected