use super::model::WorldSummaryFields;
use crate::RuntimeState;

pub(super) fn fill_world_selected_year_fields(
    fields: &mut WorldSummaryFields,
    state: &RuntimeState,
) {
    fields.world_restore_selected_year_lane_snapshot_raw_u8 =
        state.world_restore.selected_year_lane_snapshot_raw_u8;
    fields.world_restore_cached_available_locomotive_rating_raw_u32 = state
        .world_restore
        .cached_available_locomotive_rating_raw_u32;
    fields.world_restore_cached_available_locomotive_rating_value_f32_text = state
        .world_restore
        .cached_available_locomotive_rating_value_f32_text
        .clone();
    fields.world_restore_selected_year_bucket_scalar_raw_u32 =
        state.world_restore.selected_year_bucket_scalar_raw_u32;
    fields.world_restore_selected_year_bucket_scalar_value_f32_text = state
        .world_restore
        .selected_year_bucket_scalar_value_f32_text
        .clone();
    fields.world_restore_selected_year_bucket_direct_lane_count = state
        .world_restore
        .selected_year_bucket_direct_lane_raw_u32
        .len();
    fields.world_restore_selected_year_bucket_direct_lane_value_f32_text = state
        .world_restore
        .selected_year_bucket_direct_lane_value_f32_text
        .clone();
    fields.world_restore_selected_year_bucket_complement_lane_count = state
        .world_restore
        .selected_year_bucket_complement_lane_raw_u32
        .len();
    fields.world_restore_selected_year_bucket_complement_lane_value_f32_text = state
        .world_restore
        .selected_year_bucket_complement_lane_value_f32_text
        .clone();
    fields.world_restore_selected_year_bucket_scaled_companion_lane_count = state
        .world_restore
        .selected_year_bucket_scaled_companion_lane_raw_u32
        .len();
    fields.world_restore_selected_year_bucket_scaled_companion_lane_value_f32_text = state
        .world_restore
        .selected_year_bucket_scaled_companion_lane_value_f32_text
        .clone();
    fields.world_restore_selected_year_gap_scalar_raw_u32 =
        state.world_restore.selected_year_gap_scalar_raw_u32;
    fields.world_restore_selected_year_gap_scalar_value_f32_text = state
        .world_restore
        .selected_year_gap_scalar_value_f32_text
        .clone();
}
