/* ---------------------------------------------------------------------- * * Private Functions * ---------------------------------------------------------------------- */ static void do_periodic_events (void) { add_daily_to_monthly(); if ((total_time % NUMOF_DAYS_IN_YEAR) == 0) { start_of_year_update (); } if ((total_time % DAYS_BETWEEN_FIRES) == 9 && tech_level > (GROUP_FIRESTATION_TECH * MAX_TECH_LEVEL / 1000)) { do_random_fire (-1, -1, 1); } if ((total_time % DAYS_BETWEEN_COVER) == 75) { clear_fire_health_and_cricket_cover (); do_fire_health_and_cricket_cover (); } if ((total_time % DAYS_BETWEEN_SHANTY) == 85 && tech_level > (GROUP_HEALTH_TECH * MAX_TECH_LEVEL / 1000)) { update_shanty (); } if (total_time % NUMOF_DAYS_IN_MONTH == (NUMOF_DAYS_IN_MONTH - 1)) { end_of_month_update (); } if (total_time % NUMOF_DAYS_IN_YEAR == (NUMOF_DAYS_IN_YEAR - 1)) { end_of_year_update (); } if ((total_time % DAYS_PER_POLLUTION) == 3) { do_pollution (); } }
static void do_periodic_events(void) { add_daily_to_monthly(); do_daily_ecology(); if ((total_time % NUMOF_DAYS_IN_YEAR) == 0) { start_of_year_update(); } if ((total_time % DAYS_PER_POLLUTION) == 3) { do_pollution(); } if ((total_time % (DAYS_BETWEEN_FIRES*100/world.len()*100/world.len() )) == 9 && tech_level > (GROUP_FIRESTATION_TECH * MAX_TECH_LEVEL / 1000)) { do_random_fire(-1, -1, 1); } if ((total_time % DAYS_BETWEEN_COVER) == 75) { do_fire_health_cricket_power_cover(); //constructions will call ::cover() } else //constructions will not call ::cover() { refresh_cover = false; } if ((total_time % DAYS_BETWEEN_SHANTY) == 15 && tech_level > (GROUP_HEALTH_TECH * MAX_TECH_LEVEL / 1000)) { update_shanty(); } if (total_time % NUMOF_DAYS_IN_MONTH == (NUMOF_DAYS_IN_MONTH - 1)) { end_of_month_update(); } if (total_time % NUMOF_DAYS_IN_YEAR == (NUMOF_DAYS_IN_YEAR - 1)) { end_of_year_update(); } }