Execute recovered world scalar event descriptors
This commit is contained in:
parent
09039d24e4
commit
13c7268b0d
23 changed files with 675 additions and 98 deletions
|
|
@ -186,6 +186,7 @@ mod tests {
|
|||
candidate_availability: BTreeMap::new(),
|
||||
named_locomotive_availability: BTreeMap::new(),
|
||||
named_locomotive_cost: BTreeMap::new(),
|
||||
cargo_production_overrides: BTreeMap::new(),
|
||||
special_conditions: BTreeMap::new(),
|
||||
service_state: RuntimeServiceState::default(),
|
||||
},
|
||||
|
|
@ -359,6 +360,7 @@ mod tests {
|
|||
candidate_availability: BTreeMap::new(),
|
||||
named_locomotive_availability: BTreeMap::new(),
|
||||
named_locomotive_cost: BTreeMap::new(),
|
||||
cargo_production_overrides: BTreeMap::new(),
|
||||
special_conditions: BTreeMap::new(),
|
||||
service_state: RuntimeServiceState::default(),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ pub struct ExpectedRuntimeSummary {
|
|||
#[serde(default)]
|
||||
pub world_restore_economic_status_code: Option<i32>,
|
||||
#[serde(default)]
|
||||
pub world_restore_territory_access_cost: Option<u32>,
|
||||
#[serde(default)]
|
||||
pub world_restore_absolute_counter_restore_kind: Option<String>,
|
||||
#[serde(default)]
|
||||
pub world_restore_absolute_counter_adjustment_context: Option<String>,
|
||||
|
|
@ -160,6 +162,8 @@ pub struct ExpectedRuntimeSummary {
|
|||
#[serde(default)]
|
||||
pub named_locomotive_cost_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub cargo_production_override_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub special_condition_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub enabled_special_condition_count: Option<usize>,
|
||||
|
|
@ -373,6 +377,14 @@ impl ExpectedRuntimeSummary {
|
|||
));
|
||||
}
|
||||
}
|
||||
if let Some(value) = self.world_restore_territory_access_cost {
|
||||
if actual.world_restore_territory_access_cost != Some(value) {
|
||||
mismatches.push(format!(
|
||||
"world_restore_territory_access_cost mismatch: expected {value}, got {:?}",
|
||||
actual.world_restore_territory_access_cost
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(kind) = &self.world_restore_absolute_counter_restore_kind {
|
||||
if actual.world_restore_absolute_counter_restore_kind.as_ref() != Some(kind) {
|
||||
mismatches.push(format!(
|
||||
|
|
@ -785,6 +797,14 @@ impl ExpectedRuntimeSummary {
|
|||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.cargo_production_override_count {
|
||||
if actual.cargo_production_override_count != count {
|
||||
mismatches.push(format!(
|
||||
"cargo_production_override_count mismatch: expected {count}, got {}",
|
||||
actual.cargo_production_override_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.special_condition_count {
|
||||
if actual.special_condition_count != count {
|
||||
mismatches.push(format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue