Add save-slice company and chairman context

This commit is contained in:
Jan Petykiewicz 2026-04-16 17:08:03 -07:00
commit 3a88fd3347
29 changed files with 3223 additions and 62 deletions

View file

@ -5,10 +5,10 @@ use serde::{Deserialize, Serialize};
use crate::persistence::{load_runtime_snapshot_document, validate_runtime_snapshot_document};
use crate::{
CalendarPoint, RuntimeCargoCatalogEntry, RuntimeChairmanTarget,
RuntimeCompanyConditionTestScope, RuntimeCompanyControllerKind, RuntimeCompanyTarget,
RuntimeCondition, RuntimeEffect, RuntimeEventRecord, RuntimeEventRecordTemplate,
RuntimeLocomotiveCatalogEntry, RuntimePackedEventCollectionSummary,
CalendarPoint, RuntimeCargoCatalogEntry, RuntimeChairmanProfile, RuntimeChairmanTarget,
RuntimeCompany, RuntimeCompanyConditionTestScope, RuntimeCompanyControllerKind,
RuntimeCompanyTarget, RuntimeCondition, RuntimeEffect, RuntimeEventRecord,
RuntimeEventRecordTemplate, RuntimeLocomotiveCatalogEntry, RuntimePackedEventCollectionSummary,
RuntimePackedEventCompactControlSummary, RuntimePackedEventConditionRowSummary,
RuntimePackedEventGroupedEffectRowSummary, RuntimePackedEventNegativeSentinelScopeSummary,
RuntimePackedEventRecordSummary, RuntimePackedEventTextBandSummary,
@ -94,6 +94,12 @@ struct SaveSliceProjection {
metadata: BTreeMap<String, String>,
packed_event_collection: Option<RuntimePackedEventCollectionSummary>,
event_runtime_records: Vec<RuntimeEventRecord>,
companies: Vec<RuntimeCompany>,
has_company_projection: bool,
selected_company_id: Option<u32>,
chairman_profiles: Vec<RuntimeChairmanProfile>,
has_chairman_projection: bool,
selected_chairman_profile_id: Option<u32>,
candidate_availability: BTreeMap<String, u32>,
named_locomotive_availability: BTreeMap<String, u32>,
locomotive_catalog: Option<Vec<RuntimeLocomotiveCatalogEntry>>,
@ -253,12 +259,12 @@ pub fn project_save_slice_to_runtime_state_import(
save_profile: projection.save_profile,
world_restore: projection.world_restore,
metadata: projection.metadata,
companies: Vec::new(),
selected_company_id: None,
companies: projection.companies,
selected_company_id: projection.selected_company_id,
players: Vec::new(),
selected_player_id: None,
chairman_profiles: Vec::new(),
selected_chairman_profile_id: None,
chairman_profiles: projection.chairman_profiles,
selected_chairman_profile_id: projection.selected_chairman_profile_id,
trains: Vec::new(),
locomotive_catalog: projection.locomotive_catalog.unwrap_or_default(),
cargo_catalog: projection.cargo_catalog.unwrap_or_default(),
@ -318,12 +324,28 @@ pub fn project_save_slice_overlay_to_runtime_state_import(
..projection.world_restore
},
metadata,
companies: base_state.companies.clone(),
selected_company_id: base_state.selected_company_id,
companies: if projection.has_company_projection {
projection.companies
} else {
base_state.companies.clone()
},
selected_company_id: if projection.has_company_projection {
projection.selected_company_id
} else {
base_state.selected_company_id
},
players: base_state.players.clone(),
selected_player_id: base_state.selected_player_id,
chairman_profiles: base_state.chairman_profiles.clone(),
selected_chairman_profile_id: base_state.selected_chairman_profile_id,
chairman_profiles: if projection.has_chairman_projection {
projection.chairman_profiles
} else {
base_state.chairman_profiles.clone()
},
selected_chairman_profile_id: if projection.has_chairman_projection {
projection.selected_chairman_profile_id
} else {
base_state.selected_chairman_profile_id
},
trains: base_state.trains.clone(),
locomotive_catalog: projection
.locomotive_catalog
@ -756,10 +778,118 @@ fn project_save_slice_components(
None
};
let (companies, has_company_projection, selected_company_id) =
if let Some(roster) = &save_slice.company_roster {
metadata.insert(
"save_slice.company_roster_source_kind".to_string(),
roster.source_kind.clone(),
);
metadata.insert(
"save_slice.company_roster_semantic_family".to_string(),
roster.semantic_family.clone(),
);
metadata.insert(
"save_slice.company_roster_entry_count".to_string(),
roster.observed_entry_count.to_string(),
);
if let Some(selected_company_id) = roster.selected_company_id {
metadata.insert(
"save_slice.selected_company_id".to_string(),
selected_company_id.to_string(),
);
}
(
roster
.entries
.iter()
.map(|entry| RuntimeCompany {
company_id: entry.company_id,
current_cash: entry.current_cash,
debt: entry.debt,
credit_rating_score: entry.credit_rating_score,
prime_rate: entry.prime_rate,
active: entry.active,
available_track_laying_capacity: entry.available_track_laying_capacity,
controller_kind: entry.controller_kind,
linked_chairman_profile_id: entry.linked_chairman_profile_id,
book_value_per_share: entry.book_value_per_share,
investor_confidence: entry.investor_confidence,
management_attitude: entry.management_attitude,
takeover_cooldown_year: entry.takeover_cooldown_year,
merger_cooldown_year: entry.merger_cooldown_year,
track_piece_counts: entry.track_piece_counts,
})
.collect::<Vec<_>>(),
true,
roster.selected_company_id,
)
} else {
(Vec::new(), false, None)
};
let (chairman_profiles, has_chairman_projection, selected_chairman_profile_id) =
if let Some(table) = &save_slice.chairman_profile_table {
metadata.insert(
"save_slice.chairman_profile_table_source_kind".to_string(),
table.source_kind.clone(),
);
metadata.insert(
"save_slice.chairman_profile_table_semantic_family".to_string(),
table.semantic_family.clone(),
);
metadata.insert(
"save_slice.chairman_profile_table_entry_count".to_string(),
table.observed_entry_count.to_string(),
);
if let Some(selected_chairman_profile_id) = table.selected_chairman_profile_id {
metadata.insert(
"save_slice.selected_chairman_profile_id".to_string(),
selected_chairman_profile_id.to_string(),
);
}
(
table
.entries
.iter()
.map(|entry| RuntimeChairmanProfile {
profile_id: entry.profile_id,
name: entry.name.clone(),
active: entry.active,
current_cash: entry.current_cash,
linked_company_id: entry.linked_company_id,
company_holdings: entry.company_holdings.clone(),
holdings_value_total: entry.holdings_value_total,
net_worth_total: entry.net_worth_total,
purchasing_power_total: entry.purchasing_power_total,
})
.collect::<Vec<_>>(),
true,
table.selected_chairman_profile_id,
)
} else {
(Vec::new(), false, None)
};
let named_locomotive_cost = BTreeMap::new();
let cargo_production_overrides = BTreeMap::new();
let mut packed_event_context = company_context.clone();
if has_company_projection {
packed_event_context.known_company_ids =
companies.iter().map(|company| company.company_id).collect();
packed_event_context.selected_company_id = selected_company_id;
packed_event_context.has_complete_company_controller_context = !companies.is_empty()
&& companies
.iter()
.all(|company| company.controller_kind != RuntimeCompanyControllerKind::Unknown);
}
if has_chairman_projection {
packed_event_context.known_chairman_profile_ids = chairman_profiles
.iter()
.map(|profile| profile.profile_id)
.collect();
packed_event_context.selected_chairman_profile_id = selected_chairman_profile_id;
}
if let Some(catalog) = &locomotive_catalog {
packed_event_context.locomotive_catalog_names_by_id = catalog
.iter()
@ -806,6 +936,12 @@ fn project_save_slice_components(
metadata,
packed_event_collection,
event_runtime_records,
companies,
has_company_projection,
selected_company_id,
chairman_profiles,
has_chairman_projection,
selected_chairman_profile_id,
candidate_availability,
named_locomotive_availability,
locomotive_catalog,
@ -3750,6 +3886,98 @@ mod tests {
}
}
fn save_company_roster() -> crate::SmpLoadedCompanyRoster {
crate::SmpLoadedCompanyRoster {
source_kind: "tracked-save-slice-company-roster".to_string(),
semantic_family: "save-slice-runtime-company-context".to_string(),
observed_entry_count: 2,
selected_company_id: Some(1),
entries: vec![
crate::SmpLoadedCompanyRosterEntry {
company_id: 1,
active: true,
controller_kind: RuntimeCompanyControllerKind::Human,
current_cash: 150,
debt: 80,
credit_rating_score: Some(650),
prime_rate: Some(5),
available_track_laying_capacity: Some(6),
track_piece_counts: RuntimeTrackPieceCounts {
total: 20,
single: 5,
double: 8,
transition: 1,
electric: 3,
non_electric: 17,
},
linked_chairman_profile_id: Some(1),
book_value_per_share: 2620,
investor_confidence: 37,
management_attitude: 58,
takeover_cooldown_year: Some(1839),
merger_cooldown_year: Some(1838),
},
crate::SmpLoadedCompanyRosterEntry {
company_id: 2,
active: true,
controller_kind: RuntimeCompanyControllerKind::Ai,
current_cash: 90,
debt: 40,
credit_rating_score: Some(480),
prime_rate: Some(6),
available_track_laying_capacity: Some(2),
track_piece_counts: RuntimeTrackPieceCounts {
total: 8,
single: 2,
double: 2,
transition: 0,
electric: 1,
non_electric: 7,
},
linked_chairman_profile_id: Some(2),
book_value_per_share: 1400,
investor_confidence: 22,
management_attitude: 31,
takeover_cooldown_year: None,
merger_cooldown_year: None,
},
],
}
}
fn save_chairman_profile_table() -> crate::SmpLoadedChairmanProfileTable {
crate::SmpLoadedChairmanProfileTable {
source_kind: "tracked-save-slice-chairman-profile-table".to_string(),
semantic_family: "save-slice-runtime-chairman-context".to_string(),
observed_entry_count: 2,
selected_chairman_profile_id: Some(1),
entries: vec![
crate::SmpLoadedChairmanProfileEntry {
profile_id: 1,
name: "Chairman One".to_string(),
active: true,
current_cash: 500,
linked_company_id: Some(1),
company_holdings: BTreeMap::from([(1, 1000)]),
holdings_value_total: 700,
net_worth_total: 1200,
purchasing_power_total: 1500,
},
crate::SmpLoadedChairmanProfileEntry {
profile_id: 2,
name: "Chairman Two".to_string(),
active: true,
current_cash: 250,
linked_company_id: Some(2),
company_holdings: BTreeMap::from([(2, 900)]),
holdings_value_total: 600,
net_worth_total: 900,
purchasing_power_total: 1100,
},
],
}
}
fn real_cargo_production_row(
descriptor_id: u32,
value: i32,
@ -4032,6 +4260,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: None,
notes: vec![],
@ -4073,6 +4303,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: None,
notes: vec![],
@ -4192,6 +4424,8 @@ mod tests {
(5, crate::RuntimeCargoClass::FarmMine),
(9, crate::RuntimeCargoClass::Other),
])),
company_roster: None,
chairman_profile_table: None,
special_conditions_table: Some(crate::SmpLoadedSpecialConditionsTable {
source_kind: "save-fixed-special-conditions-range".to_string(),
table_offset: 0x0d64,
@ -4504,6 +4738,116 @@ mod tests {
assert!(import.state.event_runtime_records.is_empty());
}
#[test]
fn projects_company_and_chairman_context_from_save_slice() {
let save_slice = SmpLoadedSaveSlice {
file_extension_hint: Some("gms".to_string()),
container_profile_family: Some("rt3-classic-save-container-v1".to_string()),
mechanism_family: "classic-save-rehydrate-v1".to_string(),
mechanism_confidence: "grounded".to_string(),
trailer_family: None,
bridge_family: None,
profile: None,
candidate_availability_table: None,
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: Some(save_company_roster()),
chairman_profile_table: Some(save_chairman_profile_table()),
special_conditions_table: None,
event_runtime_collection: None,
notes: vec![],
};
let import = project_save_slice_to_runtime_state_import(
&save_slice,
"save-native-company-chairman",
None,
)
.expect("save slice should project");
assert_eq!(import.state.companies.len(), 2);
assert_eq!(import.state.selected_company_id, Some(1));
assert_eq!(import.state.chairman_profiles.len(), 2);
assert_eq!(import.state.selected_chairman_profile_id, Some(1));
assert_eq!(import.state.companies[0].book_value_per_share, 2620);
assert_eq!(import.state.chairman_profiles[0].current_cash, 500);
}
#[test]
fn overlay_replaces_base_company_and_chairman_context_from_save_slice() {
let base_state = RuntimeState {
companies: vec![crate::RuntimeCompany {
company_id: 42,
current_cash: 5,
debt: 1,
credit_rating_score: None,
prime_rate: None,
active: true,
available_track_laying_capacity: Some(1),
controller_kind: RuntimeCompanyControllerKind::Unknown,
linked_chairman_profile_id: None,
book_value_per_share: 10,
investor_confidence: 0,
management_attitude: 0,
takeover_cooldown_year: None,
merger_cooldown_year: None,
track_piece_counts: RuntimeTrackPieceCounts::default(),
}],
selected_company_id: Some(42),
chairman_profiles: vec![crate::RuntimeChairmanProfile {
profile_id: 9,
name: "Base Chairman".to_string(),
active: true,
current_cash: 10,
linked_company_id: None,
company_holdings: BTreeMap::new(),
holdings_value_total: 0,
net_worth_total: 0,
purchasing_power_total: 0,
}],
selected_chairman_profile_id: Some(9),
territories: vec![crate::RuntimeTerritory {
territory_id: 7,
name: Some("Base Territory".to_string()),
track_piece_counts: RuntimeTrackPieceCounts::default(),
}],
..state()
};
let save_slice = SmpLoadedSaveSlice {
file_extension_hint: Some("gms".to_string()),
container_profile_family: Some("rt3-classic-save-container-v1".to_string()),
mechanism_family: "classic-save-rehydrate-v1".to_string(),
mechanism_confidence: "grounded".to_string(),
trailer_family: None,
bridge_family: None,
profile: None,
candidate_availability_table: None,
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: Some(save_company_roster()),
chairman_profile_table: Some(save_chairman_profile_table()),
special_conditions_table: None,
event_runtime_collection: None,
notes: vec![],
};
let import = project_save_slice_overlay_to_runtime_state_import(
&base_state,
&save_slice,
"overlay-save-native-company-chairman",
None,
)
.expect("overlay import should project");
assert_eq!(import.state.companies.len(), 2);
assert_eq!(import.state.selected_company_id, Some(1));
assert_eq!(import.state.chairman_profiles.len(), 2);
assert_eq!(import.state.selected_chairman_profile_id, Some(1));
assert_eq!(import.state.territories, base_state.territories);
}
#[test]
fn projects_executable_packed_records_into_runtime_and_services_follow_on() {
let save_slice = SmpLoadedSaveSlice {
@ -4522,6 +4866,8 @@ mod tests {
(5, crate::RuntimeCargoClass::FarmMine),
(9, crate::RuntimeCargoClass::Other),
])),
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -4642,6 +4988,8 @@ mod tests {
(5, crate::RuntimeCargoClass::FarmMine),
(9, crate::RuntimeCargoClass::Other),
])),
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -4740,6 +5088,8 @@ mod tests {
(5, crate::RuntimeCargoClass::FarmMine),
(9, crate::RuntimeCargoClass::Other),
])),
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -4864,6 +5214,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -4949,6 +5301,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -5102,6 +5456,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -5345,6 +5701,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -5423,6 +5781,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -5525,6 +5885,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -5600,6 +5962,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -5703,6 +6067,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -5781,6 +6147,8 @@ mod tests {
named_locomotive_availability_table: Some(save_named_locomotive_table(112)),
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -5928,6 +6296,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -6031,6 +6401,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -6108,6 +6480,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -6185,6 +6559,8 @@ mod tests {
named_locomotive_availability_table: Some(save_named_locomotive_table(112)),
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -6325,6 +6701,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -6421,6 +6799,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -6496,6 +6876,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -6581,6 +6963,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -6717,6 +7101,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -6872,6 +7258,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -6977,6 +7365,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -7063,6 +7453,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -7176,6 +7568,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -7283,6 +7677,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -7380,6 +7776,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -7473,6 +7871,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -7580,6 +7980,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -7672,6 +8074,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -7746,6 +8150,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -7825,6 +8231,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -7909,6 +8317,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -7993,6 +8403,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -8093,6 +8505,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -8184,6 +8598,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -8301,6 +8717,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -8436,6 +8854,8 @@ mod tests {
(5, crate::RuntimeCargoClass::FarmMine),
(9, crate::RuntimeCargoClass::Other),
])),
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -8953,6 +9373,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -9124,6 +9546,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -9252,6 +9676,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -9363,6 +9789,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -9549,6 +9977,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -9643,6 +10073,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -9739,6 +10171,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -9906,6 +10340,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -10056,6 +10492,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -10147,6 +10585,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -10271,6 +10711,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -10383,6 +10825,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -10539,6 +10983,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),
@ -10724,6 +11170,8 @@ mod tests {
named_locomotive_availability_table: None,
locomotive_catalog: None,
cargo_catalog: None,
company_roster: None,
chairman_profile_table: None,
special_conditions_table: None,
event_runtime_collection: Some(crate::SmpLoadedEventRuntimeCollectionSummary {
source_kind: "packed-event-runtime-collection".to_string(),