use super::model::WorldSummaryFields;
use crate::summary::RuntimeSummary;

pub(crate) fn apply_world_summary_fields(summary: &mut RuntimeSummary, fields: WorldSummaryFields) {
    let WorldSummaryFields {
        calendar_projection_source,
        calendar_projection_is_placeholder,
        world_flag_count,
        world_restore_selected_year_profile_lane,
        world_restore_campaign_scenario_enabled,
        world_restore_sandbox_enabled,
        world_restore_seed_tuple_written_from_raw_lane,
        world_restore_absolute_counter_requires_shell_context,
        world_restore_absolute_counter_reconstructible_from_save,
        world_restore_packed_year_word_raw_u16,
        world_restore_partial_year_progress_raw_u8,
        world_restore_current_calendar_tuple_word_raw_u32,
        world_restore_current_calendar_tuple_word_2_raw_u32,
        world_restore_absolute_counter_raw_u32,
        world_restore_absolute_counter_mirror_raw_u32,
        world_restore_disable_cargo_economy_special_condition_slot,
        world_restore_disable_cargo_economy_special_condition_reconstructible_from_save,
        world_restore_disable_cargo_economy_special_condition_write_side_grounded,
        world_restore_disable_cargo_economy_special_condition_enabled,
        world_restore_use_bio_accelerator_cars_enabled,
        world_restore_use_wartime_cargos_enabled,
        world_restore_disable_train_crashes_enabled,
        world_restore_disable_train_crashes_and_breakdowns_enabled,
        world_restore_ai_ignore_territories_at_startup_enabled,
        world_restore_limited_track_building_amount,
        world_restore_economic_status_code,
        world_restore_territory_access_cost,
        world_restore_linked_site_removal_follow_on_gate_raw_u8,
        world_restore_linked_site_removal_follow_on_gate_enabled,
        world_restore_auto_show_grade_during_track_lay_raw_u8,
        world_restore_starting_building_density_level_raw_u8,
        world_restore_post_text_building_density_growth_raw_u8,
        world_restore_leftover_simulation_time_accumulator_raw_u32,
        world_restore_leftover_simulation_time_accumulator_value_f32_text,
        world_restore_selected_year_lane_snapshot_raw_u8,
        world_restore_all_steam_locomotives_available_raw_u8,
        world_restore_all_steam_locomotives_available_enabled,
        world_restore_all_diesel_locomotives_available_raw_u8,
        world_restore_all_diesel_locomotives_available_enabled,
        world_restore_all_electric_locomotives_available_raw_u8,
        world_restore_all_electric_locomotives_available_enabled,
        world_restore_issue_37_value,
        world_restore_issue_38_value,
        world_restore_issue_39_value,
        world_restore_issue_3a_value,
        world_restore_issue_37_multiplier_raw_u32,
        world_restore_issue_37_multiplier_value_f32_text,
        world_restore_stock_issue_and_buyback_policy_raw_u8,
        world_restore_bond_issue_and_repayment_policy_raw_u8,
        world_restore_bankruptcy_policy_raw_u8,
        world_restore_dividend_policy_raw_u8,
        world_restore_building_density_growth_setting_raw_u32,
        world_restore_stock_issue_and_buyback_allowed,
        world_restore_bond_issue_and_repayment_allowed,
        world_restore_bankruptcy_allowed,
        world_restore_dividend_adjustment_allowed,
        world_restore_finance_neighborhood_count,
        world_restore_finance_neighborhood_labels,
        world_restore_economic_tuning_mirror_raw_u32,
        world_restore_economic_tuning_mirror_value_f32_text,
        world_restore_economic_tuning_lane_count,
        world_restore_economic_tuning_lane_value_f32_text,
        world_restore_cached_available_locomotive_rating_raw_u32,
        world_restore_cached_available_locomotive_rating_value_f32_text,
        world_restore_selected_year_bucket_scalar_raw_u32,
        world_restore_selected_year_bucket_scalar_value_f32_text,
        world_restore_selected_year_bucket_direct_lane_count,
        world_restore_selected_year_bucket_direct_lane_value_f32_text,
        world_restore_selected_year_bucket_complement_lane_count,
        world_restore_selected_year_bucket_complement_lane_value_f32_text,
        world_restore_selected_year_bucket_scaled_companion_lane_count,
        world_restore_selected_year_bucket_scaled_companion_lane_value_f32_text,
        world_restore_selected_year_gap_scalar_raw_u32,
        world_restore_selected_year_gap_scalar_value_f32_text,
        world_restore_absolute_counter_restore_kind,
        world_restore_absolute_counter_adjustment_context,
        metadata_count,
        company_count,
        active_company_count,
        company_market_state_owner_count,
    } = fields;

    summary.calendar_projection_source = calendar_projection_source;
    summary.calendar_projection_is_placeholder = calendar_projection_is_placeholder;
    summary.world_flag_count = world_flag_count;
    summary.world_restore_selected_year_profile_lane = world_restore_selected_year_profile_lane;
    summary.world_restore_campaign_scenario_enabled = world_restore_campaign_scenario_enabled;
    summary.world_restore_sandbox_enabled = world_restore_sandbox_enabled;
    summary.world_restore_seed_tuple_written_from_raw_lane =
        world_restore_seed_tuple_written_from_raw_lane;
    summary.world_restore_absolute_counter_requires_shell_context =
        world_restore_absolute_counter_requires_shell_context;
    summary.world_restore_absolute_counter_reconstructible_from_save =
        world_restore_absolute_counter_reconstructible_from_save;
    summary.world_restore_packed_year_word_raw_u16 = world_restore_packed_year_word_raw_u16;
    summary.world_restore_partial_year_progress_raw_u8 = world_restore_partial_year_progress_raw_u8;
    summary.world_restore_current_calendar_tuple_word_raw_u32 =
        world_restore_current_calendar_tuple_word_raw_u32;
    summary.world_restore_current_calendar_tuple_word_2_raw_u32 =
        world_restore_current_calendar_tuple_word_2_raw_u32;
    summary.world_restore_absolute_counter_raw_u32 = world_restore_absolute_counter_raw_u32;
    summary.world_restore_absolute_counter_mirror_raw_u32 =
        world_restore_absolute_counter_mirror_raw_u32;
    summary.world_restore_disable_cargo_economy_special_condition_slot =
        world_restore_disable_cargo_economy_special_condition_slot;
    summary.world_restore_disable_cargo_economy_special_condition_reconstructible_from_save =
        world_restore_disable_cargo_economy_special_condition_reconstructible_from_save;
    summary.world_restore_disable_cargo_economy_special_condition_write_side_grounded =
        world_restore_disable_cargo_economy_special_condition_write_side_grounded;
    summary.world_restore_disable_cargo_economy_special_condition_enabled =
        world_restore_disable_cargo_economy_special_condition_enabled;
    summary.world_restore_use_bio_accelerator_cars_enabled =
        world_restore_use_bio_accelerator_cars_enabled;
    summary.world_restore_use_wartime_cargos_enabled = world_restore_use_wartime_cargos_enabled;
    summary.world_restore_disable_train_crashes_enabled =
        world_restore_disable_train_crashes_enabled;
    summary.world_restore_disable_train_crashes_and_breakdowns_enabled =
        world_restore_disable_train_crashes_and_breakdowns_enabled;
    summary.world_restore_ai_ignore_territories_at_startup_enabled =
        world_restore_ai_ignore_territories_at_startup_enabled;
    summary.world_restore_limited_track_building_amount =
        world_restore_limited_track_building_amount;
    summary.world_restore_economic_status_code = world_restore_economic_status_code;
    summary.world_restore_territory_access_cost = world_restore_territory_access_cost;
    summary.world_restore_linked_site_removal_follow_on_gate_raw_u8 =
        world_restore_linked_site_removal_follow_on_gate_raw_u8;
    summary.world_restore_linked_site_removal_follow_on_gate_enabled =
        world_restore_linked_site_removal_follow_on_gate_enabled;
    summary.world_restore_auto_show_grade_during_track_lay_raw_u8 =
        world_restore_auto_show_grade_during_track_lay_raw_u8;
    summary.world_restore_starting_building_density_level_raw_u8 =
        world_restore_starting_building_density_level_raw_u8;
    summary.world_restore_post_text_building_density_growth_raw_u8 =
        world_restore_post_text_building_density_growth_raw_u8;
    summary.world_restore_leftover_simulation_time_accumulator_raw_u32 =
        world_restore_leftover_simulation_time_accumulator_raw_u32;
    summary.world_restore_leftover_simulation_time_accumulator_value_f32_text =
        world_restore_leftover_simulation_time_accumulator_value_f32_text;
    summary.world_restore_selected_year_lane_snapshot_raw_u8 =
        world_restore_selected_year_lane_snapshot_raw_u8;
    summary.world_restore_all_steam_locomotives_available_raw_u8 =
        world_restore_all_steam_locomotives_available_raw_u8;
    summary.world_restore_all_steam_locomotives_available_enabled =
        world_restore_all_steam_locomotives_available_enabled;
    summary.world_restore_all_diesel_locomotives_available_raw_u8 =
        world_restore_all_diesel_locomotives_available_raw_u8;
    summary.world_restore_all_diesel_locomotives_available_enabled =
        world_restore_all_diesel_locomotives_available_enabled;
    summary.world_restore_all_electric_locomotives_available_raw_u8 =
        world_restore_all_electric_locomotives_available_raw_u8;
    summary.world_restore_all_electric_locomotives_available_enabled =
        world_restore_all_electric_locomotives_available_enabled;
    summary.world_restore_issue_37_value = world_restore_issue_37_value;
    summary.world_restore_issue_38_value = world_restore_issue_38_value;
    summary.world_restore_issue_39_value = world_restore_issue_39_value;
    summary.world_restore_issue_3a_value = world_restore_issue_3a_value;
    summary.world_restore_issue_37_multiplier_raw_u32 = world_restore_issue_37_multiplier_raw_u32;
    summary.world_restore_issue_37_multiplier_value_f32_text =
        world_restore_issue_37_multiplier_value_f32_text;
    summary.world_restore_stock_issue_and_buyback_policy_raw_u8 =
        world_restore_stock_issue_and_buyback_policy_raw_u8;
    summary.world_restore_bond_issue_and_repayment_policy_raw_u8 =
        world_restore_bond_issue_and_repayment_policy_raw_u8;
    summary.world_restore_bankruptcy_policy_raw_u8 = world_restore_bankruptcy_policy_raw_u8;
    summary.world_restore_dividend_policy_raw_u8 = world_restore_dividend_policy_raw_u8;
    summary.world_restore_building_density_growth_setting_raw_u32 =
        world_restore_building_density_growth_setting_raw_u32;
    summary.world_restore_stock_issue_and_buyback_allowed =
        world_restore_stock_issue_and_buyback_allowed;
    summary.world_restore_bond_issue_and_repayment_allowed =
        world_restore_bond_issue_and_repayment_allowed;
    summary.world_restore_bankruptcy_allowed = world_restore_bankruptcy_allowed;
    summary.world_restore_dividend_adjustment_allowed = world_restore_dividend_adjustment_allowed;
    summary.world_restore_finance_neighborhood_count = world_restore_finance_neighborhood_count;
    summary.world_restore_finance_neighborhood_labels = world_restore_finance_neighborhood_labels;
    summary.world_restore_economic_tuning_mirror_raw_u32 =
        world_restore_economic_tuning_mirror_raw_u32;
    summary.world_restore_economic_tuning_mirror_value_f32_text =
        world_restore_economic_tuning_mirror_value_f32_text;
    summary.world_restore_economic_tuning_lane_count = world_restore_economic_tuning_lane_count;
    summary.world_restore_economic_tuning_lane_value_f32_text =
        world_restore_economic_tuning_lane_value_f32_text;
    summary.world_restore_cached_available_locomotive_rating_raw_u32 =
        world_restore_cached_available_locomotive_rating_raw_u32;
    summary.world_restore_cached_available_locomotive_rating_value_f32_text =
        world_restore_cached_available_locomotive_rating_value_f32_text;
    summary.world_restore_selected_year_bucket_scalar_raw_u32 =
        world_restore_selected_year_bucket_scalar_raw_u32;
    summary.world_restore_selected_year_bucket_scalar_value_f32_text =
        world_restore_selected_year_bucket_scalar_value_f32_text;
    summary.world_restore_selected_year_bucket_direct_lane_count =
        world_restore_selected_year_bucket_direct_lane_count;
    summary.world_restore_selected_year_bucket_direct_lane_value_f32_text =
        world_restore_selected_year_bucket_direct_lane_value_f32_text;
    summary.world_restore_selected_year_bucket_complement_lane_count =
        world_restore_selected_year_bucket_complement_lane_count;
    summary.world_restore_selected_year_bucket_complement_lane_value_f32_text =
        world_restore_selected_year_bucket_complement_lane_value_f32_text;
    summary.world_restore_selected_year_bucket_scaled_companion_lane_count =
        world_restore_selected_year_bucket_scaled_companion_lane_count;
    summary.world_restore_selected_year_bucket_scaled_companion_lane_value_f32_text =
        world_restore_selected_year_bucket_scaled_companion_lane_value_f32_text;
    summary.world_restore_selected_year_gap_scalar_raw_u32 =
        world_restore_selected_year_gap_scalar_raw_u32;
    summary.world_restore_selected_year_gap_scalar_value_f32_text =
        world_restore_selected_year_gap_scalar_value_f32_text;
    summary.world_restore_absolute_counter_restore_kind =
        world_restore_absolute_counter_restore_kind;
    summary.world_restore_absolute_counter_adjustment_context =
        world_restore_absolute_counter_adjustment_context;
    summary.metadata_count = metadata_count;
    summary.company_count = company_count;
    summary.active_company_count = active_company_count;
    summary.company_market_state_owner_count = company_market_state_owner_count;
}
