Rehost periodic route preference service seam
This commit is contained in:
parent
6fc8da2153
commit
f7fde709f7
9 changed files with 578 additions and 49 deletions
|
|
@ -855,6 +855,34 @@ fn project_save_slice_components(
|
|||
.as_ref()
|
||||
.and_then(|state| state.linked_site_removal_follow_on_gate_raw_u8)
|
||||
.map(|raw| raw != 0),
|
||||
auto_show_grade_during_track_lay_raw_u8: save_slice
|
||||
.world_locomotive_policy_state
|
||||
.as_ref()
|
||||
.and_then(|state| state.auto_show_grade_during_track_lay_raw_u8),
|
||||
starting_building_density_level_raw_u8: save_slice
|
||||
.world_locomotive_policy_state
|
||||
.as_ref()
|
||||
.and_then(|state| state.starting_building_density_level_raw_u8),
|
||||
post_text_building_density_growth_raw_u8: save_slice
|
||||
.world_locomotive_policy_state
|
||||
.as_ref()
|
||||
.and_then(|state| state.building_density_growth_raw_u8),
|
||||
leftover_simulation_time_accumulator_raw_u32: save_slice
|
||||
.world_locomotive_policy_state
|
||||
.as_ref()
|
||||
.and_then(|state| state.leftover_simulation_time_accumulator_raw_u32),
|
||||
leftover_simulation_time_accumulator_value_f32_text: save_slice
|
||||
.world_locomotive_policy_state
|
||||
.as_ref()
|
||||
.and_then(|state| {
|
||||
state
|
||||
.leftover_simulation_time_accumulator_value_f32_text
|
||||
.clone()
|
||||
}),
|
||||
selected_year_lane_snapshot_raw_u8: save_slice
|
||||
.world_locomotive_policy_state
|
||||
.as_ref()
|
||||
.and_then(|state| state.selected_year_lane_snapshot_raw_u8),
|
||||
all_steam_locomotives_available_raw_u8: save_slice
|
||||
.world_locomotive_policy_state
|
||||
.as_ref()
|
||||
|
|
@ -6191,6 +6219,17 @@ mod tests {
|
|||
selected_year_gap_scalar_value_f32_text: Some("0.333333".to_string()),
|
||||
linked_site_removal_follow_on_gate_raw_u8: Some(1),
|
||||
linked_site_removal_follow_on_gate_raw_hex: Some("0x01".to_string()),
|
||||
auto_show_grade_during_track_lay_raw_u8: Some(2),
|
||||
auto_show_grade_during_track_lay_raw_hex: Some("0x02".to_string()),
|
||||
starting_building_density_level_raw_u8: Some(3),
|
||||
starting_building_density_level_raw_hex: Some("0x03".to_string()),
|
||||
building_density_growth_raw_u8: Some(1),
|
||||
building_density_growth_raw_hex: Some("0x01".to_string()),
|
||||
leftover_simulation_time_accumulator_raw_u32: Some(0x3f000000),
|
||||
leftover_simulation_time_accumulator_raw_hex: Some("0x3f000000".to_string()),
|
||||
leftover_simulation_time_accumulator_value_f32_text: Some("0.500000".to_string()),
|
||||
selected_year_lane_snapshot_raw_u8: Some(7),
|
||||
selected_year_lane_snapshot_raw_hex: Some("0x07".to_string()),
|
||||
all_steam_locomotives_available_raw_u8: Some(1),
|
||||
all_steam_locomotives_available_raw_hex: Some("0x01".to_string()),
|
||||
all_diesel_locomotives_available_raw_u8: Some(0),
|
||||
|
|
@ -6368,6 +6407,49 @@ mod tests {
|
|||
.absolute_counter_reconstructible_from_save,
|
||||
Some(true)
|
||||
);
|
||||
assert_eq!(
|
||||
import
|
||||
.state
|
||||
.world_restore
|
||||
.auto_show_grade_during_track_lay_raw_u8,
|
||||
Some(2)
|
||||
);
|
||||
assert_eq!(
|
||||
import
|
||||
.state
|
||||
.world_restore
|
||||
.starting_building_density_level_raw_u8,
|
||||
Some(3)
|
||||
);
|
||||
assert_eq!(
|
||||
import
|
||||
.state
|
||||
.world_restore
|
||||
.post_text_building_density_growth_raw_u8,
|
||||
Some(1)
|
||||
);
|
||||
assert_eq!(
|
||||
import
|
||||
.state
|
||||
.world_restore
|
||||
.leftover_simulation_time_accumulator_raw_u32,
|
||||
Some(0x3f000000)
|
||||
);
|
||||
assert_eq!(
|
||||
import
|
||||
.state
|
||||
.world_restore
|
||||
.leftover_simulation_time_accumulator_value_f32_text
|
||||
.as_deref(),
|
||||
Some("0.500000")
|
||||
);
|
||||
assert_eq!(
|
||||
import
|
||||
.state
|
||||
.world_restore
|
||||
.selected_year_lane_snapshot_raw_u8,
|
||||
Some(7)
|
||||
);
|
||||
assert_eq!(
|
||||
import.state.world_restore.packed_year_word_raw_u16,
|
||||
Some(0x0201)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue