diff --git a/src/modules/butterflies/butterflies_overlays.c b/src/modules/butterflies/butterflies_overlays.c index 2c324a7cc48e19c8b93cb9ccc16fd10e0e01c038..2dfb97267c42f06c6679b7010226bf6da12c5123 100644 --- a/src/modules/butterflies/butterflies_overlays.c +++ b/src/modules/butterflies/butterflies_overlays.c @@ -20,6 +20,10 @@ enum action_status bf_grid_overlay_update(const struct cats_configuration *conf, const cats_dt_coord rows = grid->dimension.rows; const cats_dt_coord cols = grid->dimension.cols; + int64_t cells_habitat_ok = 0; + int64_t cells_excluded = 0; + int64_t cells_resource_ok = 0; + int64_t cells_habitat_and_resource_ok = 0; for (cats_dt_coord row = 0; row < rows; row++) { for (cats_dt_coord col = 0; col < cols; col++) { @@ -28,6 +32,7 @@ enum action_status bf_grid_overlay_update(const struct cats_configuration *conf, if (cell_excluded_by_overlay(conf, row, col)) { data->info_layer[row][col] |= BF_CELL_EXCLUDED; + cells_excluded += 1; continue; } @@ -35,20 +40,24 @@ enum action_status bf_grid_overlay_update(const struct cats_configuration *conf, if (conf->overlays.overlay[OL_HABITAT_TYPE_CC].enabled && conf->overlays.habitat_cc->data[row][col] > 0) { data->info_layer[row][col] |= BF_CELL_HABITAT_OK; + cells_habitat_ok += 1; } if (conf->overlays.overlay[OL_RESOURCE].enabled && conf->overlays.resources->data[row][col] > 0) { data->info_layer[row][col] |= BF_CELL_RESOURCE_AVAILABLE; + cells_resource_ok += 1; } if (data->info_layer[row][col] & BF_CELL_HABITAT_OK && data->info_layer[row][col] & BF_CELL_RESOURCE_AVAILABLE) { data->info_layer[row][col] |= BF_CELL_VALID_DISPERSAL_TARGET; + cells_habitat_and_resource_ok += 1; } } } - + log_message(LOG_INFO, "Overlay update: %ld excluded, %ld habitat ok, %ld resource ok, %ld habitat + resource ok", + cells_excluded, cells_habitat_ok, cells_resource_ok, cells_habitat_and_resource_ok); return ACTION_RUN; }