|
|
|
@ -1255,13 +1255,13 @@ command_result autolabor (color_ostream &out, std::vector <std::string> & parame
|
|
|
|
|
return CR_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (parameters.size() == 2 || parameters.size() == 3) {
|
|
|
|
|
if (!enable_autolabor)
|
|
|
|
|
{
|
|
|
|
|
out << "Error: The plugin is not enabled." << endl;
|
|
|
|
|
return CR_FAILURE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (parameters.size() == 2 || parameters.size() == 3) {
|
|
|
|
|
df::enums::unit_labor::unit_labor labor = df::enums::unit_labor::NONE;
|
|
|
|
|
|
|
|
|
|
FOR_ENUM_ITEMS(unit_labor, test_labor)
|
|
|
|
@ -1314,6 +1314,12 @@ command_result autolabor (color_ostream &out, std::vector <std::string> & parame
|
|
|
|
|
return CR_OK;
|
|
|
|
|
}
|
|
|
|
|
else if (parameters.size() == 1 && parameters[0] == "reset-all") {
|
|
|
|
|
if (!enable_autolabor)
|
|
|
|
|
{
|
|
|
|
|
out << "Error: The plugin is not enabled." << endl;
|
|
|
|
|
return CR_FAILURE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < labor_infos.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
reset_labor((df::enums::unit_labor::unit_labor) i);
|
|
|
|
@ -1324,8 +1330,8 @@ command_result autolabor (color_ostream &out, std::vector <std::string> & parame
|
|
|
|
|
else if (parameters.size() == 1 && parameters[0] == "list" || parameters[0] == "status") {
|
|
|
|
|
if (!enable_autolabor)
|
|
|
|
|
{
|
|
|
|
|
out << "autolabor not activated." << endl;
|
|
|
|
|
return CR_OK;
|
|
|
|
|
out << "Error: The plugin is not enabled." << endl;
|
|
|
|
|
return CR_FAILURE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool need_comma = 0;
|
|
|
|
@ -1354,6 +1360,12 @@ command_result autolabor (color_ostream &out, std::vector <std::string> & parame
|
|
|
|
|
return CR_OK;
|
|
|
|
|
}
|
|
|
|
|
else if (parameters.size() == 1 && parameters[0] == "debug") {
|
|
|
|
|
if (!enable_autolabor)
|
|
|
|
|
{
|
|
|
|
|
out << "Error: The plugin is not enabled." << endl;
|
|
|
|
|
return CR_FAILURE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
print_debug = 1;
|
|
|
|
|
|
|
|
|
|
return CR_OK;
|
|
|
|
|