|
|
@ -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);
|
|
|
|