File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ Template for new versions:
5959## New Features
6060
6161## Fixes
62+ - `autoclothing`: correct defect in validating material specification on command line
6263- `autolabor`: Fix running 1 tick less frequently than intended.
6364- `buildingplan`: fixed non-clickable pressure plates's triggers (issue #5736)
6465- `getplants`: added protective code to avoid misoperation when a plant has an invalid material (which should never happen, but...)
Original file line number Diff line number Diff line change @@ -145,19 +145,22 @@ struct ClothingRequirement {
145145 return std::nullopt ;
146146 }
147147
148- if (auto req = setItem (parameters[idx+1 ]); !req)
148+ auto req = setItem (parameters[idx + 1 ]);
149+
150+ if (!req)
149151 {
150152 out << " Unrecognized item name or token: " << parameters[idx+1 ] << endl;
151153 return std::nullopt ;
152154 }
153155
154- else if (!validateMaterialCategory (*req)) {
156+ req->material_category = material_category;
157+
158+ if (!validateMaterialCategory (*req)) {
155159 out << parameters[idx] << " is not a valid material category for " << parameters[idx+1 ] << endl;
156160 return std::nullopt ;
157161 }
158162 else
159163 {
160- req->material_category = material_category;
161164 return req;
162165 }
163166 }
You can’t perform that action at this time.
0 commit comments