Clean up autoclothing for release.

develop
Rose 2023-02-02 13:06:14 -08:00
parent c9ddb4d943
commit ea22a23ab7
2 changed files with 18 additions and 19 deletions

@ -40,6 +40,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
-@ ``Screen``: allow `gui/launcher` and `gui/quickcmd` to launch themselves without hanging the game -@ ``Screen``: allow `gui/launcher` and `gui/quickcmd` to launch themselves without hanging the game
-@ Fix issues with clicks "passing through" some DFHack window elements, like scrollbars -@ Fix issues with clicks "passing through" some DFHack window elements, like scrollbars
- `getplants`: tree are now designated correctly - `getplants`: tree are now designated correctly
- `autoclothing`: fixed a crash that can happen when units are holding invalid items.
## Misc Improvements ## Misc Improvements
- A new cross-compile build script was added for building the Windows files from a Linux Docker builder (see the Compile instructions in the docs) - A new cross-compile build script was added for building the Windows files from a Linux Docker builder (see the Compile instructions in the docs)
@ -52,6 +53,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- `overlay`: overlay widgets can now specify a default enabled state if they are not already set in the player's overlay config file - `overlay`: overlay widgets can now specify a default enabled state if they are not already set in the player's overlay config file
- `getplants`: ID values will now be accepted regardless of case - `getplants`: ID values will now be accepted regardless of case
-@ New borders for DFHack tool windows -- tell us what you think! -@ New borders for DFHack tool windows -- tell us what you think!
- `autoclothing`: merged the two separate reports into the same command.
## Documentation ## Documentation

@ -388,33 +388,30 @@ command_result autoclothing(color_ostream &out, vector <string> & parameters)
// be used by 'help your-command'. // be used by 'help your-command'.
if (parameters.size() == 0) if (parameters.size() == 0)
{ {
CoreSuspender suspend;
out << "Currently set " << clothingOrders.size() << " automatic clothing orders" << endl; out << "Currently set " << clothingOrders.size() << " automatic clothing orders" << endl;
for (size_t i = 0; i < clothingOrders.size(); i++) for (size_t i = 0; i < clothingOrders.size(); i++)
{ {
out << clothingOrders[i].ToReadableLabel() << endl; out << clothingOrders[i].ToReadableLabel() << endl;
} }
return CR_OK;
}
else if (parameters[0] == "strictness")
{
if (parameters.size() != 2)
{
out << "Wrong number of arguments." << endl;
return CR_WRONG_USAGE;
}
if (parameters[1] == "permissive")
strictnessSetting = STRICT_PERMISSIVE;
else if (parameters[1] == "type")
strictnessSetting = STRICT_TYPE;
else if (parameters[1] == "material")
strictnessSetting = STRICT_MATERIAL;
}
else if (parameters.size() == 1 && parameters[0] == "report")
{
CoreSuspender suspend;
generate_report(out); generate_report(out);
return CR_OK; return CR_OK;
} }
////Disabled until I have time to fully implement it.
//else if (parameters[0] == "strictness")
//{
// if (parameters.size() != 2)
// {
// out << "Wrong number of arguments." << endl;
// return CR_WRONG_USAGE;
// }
// if (parameters[1] == "permissive")
// strictnessSetting = STRICT_PERMISSIVE;
// else if (parameters[1] == "type")
// strictnessSetting = STRICT_TYPE;
// else if (parameters[1] == "material")
// strictnessSetting = STRICT_MATERIAL;
//}
else if (parameters.size() < 2 || parameters.size() > 3) else if (parameters.size() < 2 || parameters.size() > 3)
{ {
out << "Wrong number of arguments." << endl; out << "Wrong number of arguments." << endl;