fix GH suggest, cache found building

develop
eamondo2 2023-01-23 16:14:49 -05:00
parent 94b04257a3
commit 386546126e
1 changed files with 2 additions and 1 deletions

@ -671,7 +671,8 @@ static void automelt_printStatus(color_ostream &out) {
static void automelt_setStockpileConfig(color_ostream &out, int id, bool monitored) { static void automelt_setStockpileConfig(color_ostream &out, int id, bool monitored) {
DEBUG(status,out).print("entering automelt_setStockpileConfig for id=%d and monitored=%d\n", id, monitored); DEBUG(status,out).print("entering automelt_setStockpileConfig for id=%d and monitored=%d\n", id, monitored);
validate_stockpile_configs(out); validate_stockpile_configs(out);
bool isInvalidStockpile = !df::building::find(id) || !isStockpile(df::building::find(id)); auto bldg = df::building::find(id);
bool isInvalidStockpile = bldg || !isStockpile(bldg);
bool hasNoData = !monitored; bool hasNoData = !monitored;
if (isInvalidStockpile || hasNoData) { if (isInvalidStockpile || hasNoData) {
DEBUG(cycle,out).print("calling remove_stockpile_config with id=%d monitored=%d\n", id, monitored); DEBUG(cycle,out).print("calling remove_stockpile_config with id=%d monitored=%d\n", id, monitored);