Carry fixed-world finance neighborhood into runtime state
This commit is contained in:
parent
dad9291308
commit
6562560d92
14 changed files with 236 additions and 10 deletions
|
|
@ -4933,6 +4933,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
|
|||
|
|
@ -282,6 +282,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -425,6 +426,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
|
|||
|
|
@ -66,6 +66,10 @@ pub struct ExpectedRuntimeSummary {
|
|||
#[serde(default)]
|
||||
pub world_restore_issue_37_multiplier_value_f32_text: Option<String>,
|
||||
#[serde(default)]
|
||||
pub world_restore_finance_neighborhood_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub world_restore_finance_neighborhood_labels: Option<Vec<String>>,
|
||||
#[serde(default)]
|
||||
pub world_restore_economic_tuning_mirror_raw_u32: Option<u32>,
|
||||
#[serde(default)]
|
||||
pub world_restore_economic_tuning_mirror_value_f32_text: Option<String>,
|
||||
|
|
@ -469,6 +473,22 @@ impl ExpectedRuntimeSummary {
|
|||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.world_restore_finance_neighborhood_count {
|
||||
if actual.world_restore_finance_neighborhood_count != count {
|
||||
mismatches.push(format!(
|
||||
"world_restore_finance_neighborhood_count mismatch: expected {count}, got {}",
|
||||
actual.world_restore_finance_neighborhood_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(labels) = &self.world_restore_finance_neighborhood_labels {
|
||||
if &actual.world_restore_finance_neighborhood_labels != labels {
|
||||
mismatches.push(format!(
|
||||
"world_restore_finance_neighborhood_labels mismatch: expected {labels:?}, got {:?}",
|
||||
actual.world_restore_finance_neighborhood_labels
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(value) = self.world_restore_economic_tuning_mirror_raw_u32 {
|
||||
if actual.world_restore_economic_tuning_mirror_raw_u32 != Some(value) {
|
||||
mismatches.push(format!(
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ use crate::{
|
|||
RuntimePackedEventGroupedEffectRowSummary, RuntimePackedEventNegativeSentinelScopeSummary,
|
||||
RuntimePackedEventRecordSummary, RuntimePackedEventTextBandSummary,
|
||||
RuntimePlayerConditionTestScope, RuntimePlayerTarget, RuntimeSaveProfileState,
|
||||
RuntimeServiceState, RuntimeState, RuntimeTerritoryTarget, RuntimeWorldRestoreState,
|
||||
RuntimeServiceState, RuntimeState, RuntimeTerritoryTarget,
|
||||
RuntimeWorldFinanceNeighborhoodCandidate, RuntimeWorldRestoreState,
|
||||
SmpLoadedPackedEventConditionRowSummary, SmpLoadedPackedEventGroupedEffectRowSummary,
|
||||
SmpLoadedPackedEventNegativeSentinelScopeSummary, SmpLoadedPackedEventRecordSummary,
|
||||
SmpLoadedPackedEventTextBandSummary, SmpLoadedSaveSlice,
|
||||
|
|
@ -476,6 +477,10 @@ fn project_save_slice_components(
|
|||
"save_slice.world_economic_tuning_state_present".to_string(),
|
||||
save_slice.world_economic_tuning_state.is_some(),
|
||||
);
|
||||
world_flags.insert(
|
||||
"save_slice.world_finance_neighborhood_state_present".to_string(),
|
||||
save_slice.world_finance_neighborhood_state.is_some(),
|
||||
);
|
||||
world_flags.insert(
|
||||
"save_slice.event_runtime_collection_present".to_string(),
|
||||
save_slice.event_runtime_collection.is_some(),
|
||||
|
|
@ -619,6 +624,26 @@ fn project_save_slice_components(
|
|||
);
|
||||
}
|
||||
}
|
||||
if let Some(finance_state) = &save_slice.world_finance_neighborhood_state {
|
||||
metadata.insert(
|
||||
"save_slice.world_finance_neighborhood_source_kind".to_string(),
|
||||
finance_state.source_kind.clone(),
|
||||
);
|
||||
metadata.insert(
|
||||
"save_slice.world_finance_neighborhood_semantic_family".to_string(),
|
||||
finance_state.semantic_family.clone(),
|
||||
);
|
||||
metadata.insert(
|
||||
"save_slice.world_finance_neighborhood_candidate_count".to_string(),
|
||||
finance_state.raw_u32.len().to_string(),
|
||||
);
|
||||
for (index, label) in finance_state.labels.iter().enumerate() {
|
||||
metadata.insert(
|
||||
format!("save_slice.world_finance_neighborhood_label_{index}"),
|
||||
label.clone(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
let save_profile = if let Some(profile) = &save_slice.profile {
|
||||
metadata.insert(
|
||||
|
|
@ -727,6 +752,26 @@ fn project_save_slice_components(
|
|||
.world_issue_37_state
|
||||
.as_ref()
|
||||
.map(|state| state.multiplier_value_f32_text.clone()),
|
||||
finance_neighborhood_candidates: save_slice
|
||||
.world_finance_neighborhood_state
|
||||
.as_ref()
|
||||
.map(|state| {
|
||||
state
|
||||
.labels
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(index, label)| RuntimeWorldFinanceNeighborhoodCandidate {
|
||||
label: label.clone(),
|
||||
relative_offset: state.relative_offsets[index],
|
||||
relative_offset_hex: state.relative_offset_hex[index].clone(),
|
||||
raw_u32: state.raw_u32[index],
|
||||
raw_u32_hex: state.raw_hex[index].clone(),
|
||||
value_i32: state.value_i32[index],
|
||||
value_f32_text: state.value_f32_text[index].clone(),
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
})
|
||||
.unwrap_or_default(),
|
||||
economic_tuning_mirror_raw_u32: save_slice
|
||||
.world_economic_tuning_state
|
||||
.as_ref()
|
||||
|
|
@ -5546,6 +5591,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -5591,6 +5637,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -5731,6 +5778,7 @@ mod tests {
|
|||
lane_raw_hex: vec!["0x3f400000".to_string(), "0x3be56042".to_string()],
|
||||
lane_value_f32_text: vec!["0.750000".to_string(), "0.007000".to_string()],
|
||||
}),
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: Some(crate::SmpLoadedSpecialConditionsTable {
|
||||
|
|
@ -6127,6 +6175,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
special_conditions_table: None,
|
||||
|
|
@ -6213,6 +6262,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
special_conditions_table: None,
|
||||
|
|
@ -6347,6 +6397,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: Some(crate::SmpLoadedCompanyRoster {
|
||||
source_kind: "save-direct-world-block-company-selection-only".to_string(),
|
||||
semantic_family: "scenario-selected-company-context".to_string(),
|
||||
|
|
@ -6404,6 +6455,7 @@ mod tests {
|
|||
])),
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -6528,6 +6580,7 @@ mod tests {
|
|||
])),
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -6630,6 +6683,7 @@ mod tests {
|
|||
])),
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -6758,6 +6812,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -6847,6 +6902,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7004,6 +7060,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7251,6 +7308,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7333,6 +7391,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7439,6 +7498,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7518,6 +7578,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7600,6 +7661,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7695,6 +7757,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7806,6 +7869,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7888,6 +7952,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8047,6 +8112,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8151,6 +8217,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8232,6 +8299,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8313,6 +8381,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8468,6 +8537,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8568,6 +8638,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8647,6 +8718,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8736,6 +8808,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8834,6 +8907,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8940,6 +9014,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9035,6 +9110,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9116,6 +9192,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9267,6 +9344,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9428,6 +9506,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9537,6 +9616,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9627,6 +9707,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9744,6 +9825,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9855,6 +9937,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9956,6 +10039,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10053,6 +10137,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10164,6 +10249,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10260,6 +10346,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10338,6 +10425,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10421,6 +10509,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10509,6 +10598,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10597,6 +10687,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10701,6 +10792,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10796,6 +10888,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10917,6 +11010,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11058,6 +11152,7 @@ mod tests {
|
|||
])),
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11590,6 +11685,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11776,6 +11872,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11907,6 +12004,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12037,6 +12135,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12168,6 +12267,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12283,6 +12383,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12473,6 +12574,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12571,6 +12673,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12671,6 +12774,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12842,6 +12946,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12996,6 +13101,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -13091,6 +13197,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -13219,6 +13326,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -13335,6 +13443,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -13507,6 +13616,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -13707,6 +13817,7 @@ mod tests {
|
|||
cargo_catalog: None,
|
||||
world_issue_37_state: None,
|
||||
world_economic_tuning_state: None,
|
||||
world_finance_neighborhood_state: None,
|
||||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
special_conditions_table: None,
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ pub use runtime::{
|
|||
RuntimePlayerConditionTestScope, RuntimePlayerTarget, RuntimeSaveProfileState,
|
||||
RuntimeServiceState, RuntimeState, RuntimeTerritory, RuntimeTerritoryMetric,
|
||||
RuntimeTerritoryTarget, RuntimeTrackMetric, RuntimeTrackPieceCounts, RuntimeTrain,
|
||||
RuntimeWorldRestoreState,
|
||||
RuntimeWorldFinanceNeighborhoodCandidate, RuntimeWorldRestoreState,
|
||||
};
|
||||
pub use smp::{
|
||||
SMP_FOUR_SIDECAR_BYTE_PLANES_MIN_BUNDLE_VERSION, SmpAlignedRuntimeRuleBandLane,
|
||||
|
|
@ -71,7 +71,8 @@ pub use smp::{
|
|||
SmpLoadedPackedEventConditionRowSummary, SmpLoadedPackedEventGroupedEffectRowSummary,
|
||||
SmpLoadedPackedEventNegativeSentinelScopeSummary, SmpLoadedPackedEventRecordSummary,
|
||||
SmpLoadedPackedEventTextBandSummary, SmpLoadedProfile, SmpLoadedSaveSlice,
|
||||
SmpLoadedSpecialConditionsTable, SmpLoadedWorldEconomicTuningState, SmpLoadedWorldIssue37State,
|
||||
SmpLoadedSpecialConditionsTable, SmpLoadedWorldEconomicTuningState,
|
||||
SmpLoadedWorldFinanceNeighborhoodState, SmpLoadedWorldIssue37State,
|
||||
SmpLocomotivePolicyFieldObservation, SmpLocomotivePolicyFloatAlignmentCandidate,
|
||||
SmpLocomotivePolicyNeighborhoodProbe, SmpPackedProfileWordLane,
|
||||
SmpPostSpecialConditionsScalarLane, SmpPostSpecialConditionsScalarProbe,
|
||||
|
|
@ -85,7 +86,8 @@ pub use smp::{
|
|||
SmpSaveAnchorRunBlock, SmpSaveBootstrapBlock, SmpSaveChairmanRecordAnalysisEntry,
|
||||
SmpSaveCompanyChairmanAnalysisReport, SmpSaveCompanyRecordAnalysisEntry, SmpSaveDwordCandidate,
|
||||
SmpSaveLoadCandidateTableSummary, SmpSaveLoadSummary, SmpSaveScalarCandidate,
|
||||
SmpSaveTaggedCollectionHeaderProbe, SmpSaveWorldEconomicTuningProbe, SmpSaveWorldIssue37Probe,
|
||||
SmpSaveTaggedCollectionHeaderProbe, SmpSaveWorldEconomicTuningProbe,
|
||||
SmpSaveWorldFinanceNeighborhoodProbe, SmpSaveWorldIssue37Probe,
|
||||
SmpSaveWorldSelectionRoleAnalysis, SmpSaveWorldSelectionRoleAnalysisEntry,
|
||||
SmpSecondaryVariantProbe, SmpSharedHeader, SmpSpecialConditionEntry, SmpSpecialConditionsProbe,
|
||||
inspect_save_company_and_chairman_analysis_bytes,
|
||||
|
|
|
|||
|
|
@ -854,6 +854,17 @@ pub struct RuntimeSaveProfileState {
|
|||
pub staged_profile_copy_on_restore: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct RuntimeWorldFinanceNeighborhoodCandidate {
|
||||
pub label: String,
|
||||
pub relative_offset: usize,
|
||||
pub relative_offset_hex: String,
|
||||
pub raw_u32: u32,
|
||||
pub raw_u32_hex: String,
|
||||
pub value_i32: i32,
|
||||
pub value_f32_text: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)]
|
||||
pub struct RuntimeWorldRestoreState {
|
||||
#[serde(default)]
|
||||
|
|
@ -899,6 +910,8 @@ pub struct RuntimeWorldRestoreState {
|
|||
#[serde(default)]
|
||||
pub issue_37_multiplier_value_f32_text: Option<String>,
|
||||
#[serde(default)]
|
||||
pub finance_neighborhood_candidates: Vec<RuntimeWorldFinanceNeighborhoodCandidate>,
|
||||
#[serde(default)]
|
||||
pub economic_tuning_mirror_raw_u32: Option<u32>,
|
||||
#[serde(default)]
|
||||
pub economic_tuning_mirror_value_f32_text: Option<String>,
|
||||
|
|
@ -2307,6 +2320,7 @@ mod tests {
|
|||
issue_37_value: None,
|
||||
issue_37_multiplier_raw_u32: None,
|
||||
issue_37_multiplier_value_f32_text: None,
|
||||
finance_neighborhood_candidates: Vec::new(),
|
||||
economic_tuning_mirror_raw_u32: None,
|
||||
economic_tuning_mirror_value_f32_text: None,
|
||||
economic_tuning_lane_raw_u32: Vec::new(),
|
||||
|
|
|
|||
|
|
@ -2193,6 +2193,19 @@ pub struct SmpLoadedWorldEconomicTuningState {
|
|||
pub lane_value_f32_text: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct SmpLoadedWorldFinanceNeighborhoodState {
|
||||
pub source_kind: String,
|
||||
pub semantic_family: String,
|
||||
pub labels: Vec<String>,
|
||||
pub relative_offsets: Vec<usize>,
|
||||
pub relative_offset_hex: Vec<String>,
|
||||
pub raw_u32: Vec<u32>,
|
||||
pub raw_hex: Vec<String>,
|
||||
pub value_i32: Vec<i32>,
|
||||
pub value_f32_text: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct SmpLoadedCompanyRosterEntry {
|
||||
pub company_id: u32,
|
||||
|
|
@ -2580,6 +2593,8 @@ pub struct SmpLoadedSaveSlice {
|
|||
#[serde(default)]
|
||||
pub world_economic_tuning_state: Option<SmpLoadedWorldEconomicTuningState>,
|
||||
#[serde(default)]
|
||||
pub world_finance_neighborhood_state: Option<SmpLoadedWorldFinanceNeighborhoodState>,
|
||||
#[serde(default)]
|
||||
pub company_roster: Option<SmpLoadedCompanyRoster>,
|
||||
#[serde(default)]
|
||||
pub chairman_profile_table: Option<SmpLoadedChairmanProfileTable>,
|
||||
|
|
@ -2769,6 +2784,10 @@ pub fn load_save_slice_from_report(
|
|||
.save_world_economic_tuning_probe
|
||||
.as_ref()
|
||||
.map(derive_loaded_world_economic_tuning_state_from_probe);
|
||||
let world_finance_neighborhood_state = report
|
||||
.save_world_finance_neighborhood_probe
|
||||
.as_ref()
|
||||
.map(derive_loaded_world_finance_neighborhood_state_from_probe);
|
||||
let company_roster = report.save_company_roster_probe.clone().or_else(|| {
|
||||
report
|
||||
.save_world_selection_context_probe
|
||||
|
|
@ -2904,6 +2923,7 @@ pub fn load_save_slice_from_report(
|
|||
cargo_catalog,
|
||||
world_issue_37_state,
|
||||
world_economic_tuning_state,
|
||||
world_finance_neighborhood_state,
|
||||
company_roster,
|
||||
chairman_profile_table,
|
||||
special_conditions_table,
|
||||
|
|
@ -3323,6 +3343,50 @@ fn derive_loaded_world_economic_tuning_state_from_probe(
|
|||
}
|
||||
}
|
||||
|
||||
fn derive_loaded_world_finance_neighborhood_state_from_probe(
|
||||
probe: &SmpSaveWorldFinanceNeighborhoodProbe,
|
||||
) -> SmpLoadedWorldFinanceNeighborhoodState {
|
||||
SmpLoadedWorldFinanceNeighborhoodState {
|
||||
source_kind: probe.source_kind.clone(),
|
||||
semantic_family: probe.semantic_family.clone(),
|
||||
labels: probe
|
||||
.dword_candidates
|
||||
.iter()
|
||||
.map(|candidate| candidate.label.clone())
|
||||
.collect(),
|
||||
relative_offsets: probe
|
||||
.dword_candidates
|
||||
.iter()
|
||||
.map(|candidate| candidate.relative_offset)
|
||||
.collect(),
|
||||
relative_offset_hex: probe
|
||||
.dword_candidates
|
||||
.iter()
|
||||
.map(|candidate| candidate.relative_offset_hex.clone())
|
||||
.collect(),
|
||||
raw_u32: probe
|
||||
.dword_candidates
|
||||
.iter()
|
||||
.map(|candidate| candidate.raw_u32)
|
||||
.collect(),
|
||||
raw_hex: probe
|
||||
.dword_candidates
|
||||
.iter()
|
||||
.map(|candidate| candidate.raw_u32_hex.clone())
|
||||
.collect(),
|
||||
value_i32: probe
|
||||
.dword_candidates
|
||||
.iter()
|
||||
.map(|candidate| candidate.value_i32)
|
||||
.collect(),
|
||||
value_f32_text: probe
|
||||
.dword_candidates
|
||||
.iter()
|
||||
.map(|candidate| format!("{:.6}", candidate.value_f32))
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
|
||||
fn derive_selection_only_company_roster_from_save_world_probe(
|
||||
probe: &SmpSaveWorldSelectionContextProbe,
|
||||
header_probe: Option<&SmpSaveTaggedCollectionHeaderProbe>,
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ pub struct RuntimeSummary {
|
|||
pub world_restore_issue_37_value: Option<u32>,
|
||||
pub world_restore_issue_37_multiplier_raw_u32: Option<u32>,
|
||||
pub world_restore_issue_37_multiplier_value_f32_text: Option<String>,
|
||||
pub world_restore_finance_neighborhood_count: usize,
|
||||
pub world_restore_finance_neighborhood_labels: Vec<String>,
|
||||
pub world_restore_economic_tuning_mirror_raw_u32: Option<u32>,
|
||||
pub world_restore_economic_tuning_mirror_value_f32_text: Option<String>,
|
||||
pub world_restore_economic_tuning_lane_count: usize,
|
||||
|
|
@ -195,6 +197,16 @@ impl RuntimeSummary {
|
|||
.world_restore
|
||||
.issue_37_multiplier_value_f32_text
|
||||
.clone(),
|
||||
world_restore_finance_neighborhood_count: state
|
||||
.world_restore
|
||||
.finance_neighborhood_candidates
|
||||
.len(),
|
||||
world_restore_finance_neighborhood_labels: state
|
||||
.world_restore
|
||||
.finance_neighborhood_candidates
|
||||
.iter()
|
||||
.map(|candidate| candidate.label.clone())
|
||||
.collect(),
|
||||
world_restore_economic_tuning_mirror_raw_u32: state
|
||||
.world_restore
|
||||
.economic_tuning_mirror_raw_u32,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
"tick_slot": 1
|
||||
},
|
||||
"calendar_projection_is_placeholder": true,
|
||||
"world_flag_count": 10,
|
||||
"world_flag_count": 11,
|
||||
"cargo_catalog_count": 11,
|
||||
"packed_event_collection_present": false,
|
||||
"event_runtime_record_count": 0
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
"packed_event_decoded_record_count": 1,
|
||||
"packed_event_imported_runtime_record_count": 1,
|
||||
"event_runtime_record_count": 1,
|
||||
"world_flag_count": 12,
|
||||
"world_flag_count": 13,
|
||||
"total_event_record_service_count": 1,
|
||||
"total_trigger_dispatch_count": 1
|
||||
},
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
"packed_event_decoded_record_count": 1,
|
||||
"packed_event_imported_runtime_record_count": 1,
|
||||
"event_runtime_record_count": 1,
|
||||
"world_flag_count": 12,
|
||||
"world_flag_count": 13,
|
||||
"total_event_record_service_count": 1,
|
||||
"total_trigger_dispatch_count": 1
|
||||
},
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
},
|
||||
"calendar_projection_source": "base-snapshot-preserved",
|
||||
"calendar_projection_is_placeholder": false,
|
||||
"world_flag_count": 12,
|
||||
"world_flag_count": 13,
|
||||
"company_count": 1,
|
||||
"packed_event_collection_present": true,
|
||||
"packed_event_record_count": 2,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
"cargo_catalog_count": 11,
|
||||
"event_runtime_record_count": 2,
|
||||
"cargo_production_override_count": 3,
|
||||
"world_flag_count": 11,
|
||||
"world_flag_count": 12,
|
||||
"total_event_record_service_count": 2,
|
||||
"total_trigger_dispatch_count": 2
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
"cargo_production_override_count": 3,
|
||||
"world_restore_limited_track_building_amount": 18,
|
||||
"world_restore_territory_access_cost": 750000,
|
||||
"world_flag_count": 11,
|
||||
"world_flag_count": 12,
|
||||
"total_event_record_service_count": 2,
|
||||
"total_trigger_dispatch_count": 2
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue