diff --git a/src/modules/butterflies/butterflies_overlays.c b/src/modules/butterflies/butterflies_overlays.c index 4e363322c629631054564a8b365d4257286d6193..2f218bb10223548950e34f4be08809df2596066e 100644 --- a/src/modules/butterflies/butterflies_overlays.c +++ b/src/modules/butterflies/butterflies_overlays.c @@ -63,7 +63,22 @@ enum action_status bf_grid_overlay_update(const struct cats_configuration *conf, } } } + + int64_t cells_with_eggs = 0; + double total_eggs = 0; + for (cats_dt_coord row = 0; row < rows; row++) { + for (cats_dt_coord col = 0; col < cols; col++) { + float eggs = data->eggs[row][col]; + if (eggs > 0) { + cells_with_eggs += 1; + total_eggs += eggs; + } + + } + } + 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); + log_message(LOG_INFO, "Overlay update %ld cells with eggs, total %f eggs, average %f eggs per cell", cells_with_eggs, total_eggs, total_eggs/(float) cells_with_eggs); return ACTION_RUN; }