Execute runtime variable event descriptors

This commit is contained in:
Jan Petykiewicz 2026-04-17 08:18:34 -07:00
commit d3790c2ae3
17 changed files with 1300 additions and 79 deletions

View file

@ -196,6 +196,10 @@ mod tests {
farm_mine_cargo_production_override: None,
named_cargo_production_overrides: BTreeMap::new(),
cargo_production_overrides: BTreeMap::new(),
world_runtime_variables: BTreeMap::new(),
company_runtime_variables: BTreeMap::new(),
player_runtime_variables: BTreeMap::new(),
territory_runtime_variables: BTreeMap::new(),
world_scalar_overrides: BTreeMap::new(),
special_conditions: BTreeMap::new(),
service_state: RuntimeServiceState::default(),
@ -390,6 +394,10 @@ mod tests {
farm_mine_cargo_production_override: None,
named_cargo_production_overrides: BTreeMap::new(),
cargo_production_overrides: BTreeMap::new(),
world_runtime_variables: BTreeMap::new(),
company_runtime_variables: BTreeMap::new(),
player_runtime_variables: BTreeMap::new(),
territory_runtime_variables: BTreeMap::new(),
world_scalar_overrides: BTreeMap::new(),
special_conditions: BTreeMap::new(),
service_state: RuntimeServiceState::default(),

View file

@ -188,6 +188,14 @@ pub struct ExpectedRuntimeSummary {
#[serde(default)]
pub cargo_production_override_count: Option<usize>,
#[serde(default)]
pub world_runtime_variable_count: Option<usize>,
#[serde(default)]
pub company_runtime_variable_owner_count: Option<usize>,
#[serde(default)]
pub player_runtime_variable_owner_count: Option<usize>,
#[serde(default)]
pub territory_runtime_variable_owner_count: Option<usize>,
#[serde(default)]
pub world_scalar_override_count: Option<usize>,
#[serde(default)]
pub special_condition_count: Option<usize>,
@ -927,6 +935,38 @@ impl ExpectedRuntimeSummary {
));
}
}
if let Some(count) = self.world_runtime_variable_count {
if actual.world_runtime_variable_count != count {
mismatches.push(format!(
"world_runtime_variable_count mismatch: expected {count}, got {}",
actual.world_runtime_variable_count
));
}
}
if let Some(count) = self.company_runtime_variable_owner_count {
if actual.company_runtime_variable_owner_count != count {
mismatches.push(format!(
"company_runtime_variable_owner_count mismatch: expected {count}, got {}",
actual.company_runtime_variable_owner_count
));
}
}
if let Some(count) = self.player_runtime_variable_owner_count {
if actual.player_runtime_variable_owner_count != count {
mismatches.push(format!(
"player_runtime_variable_owner_count mismatch: expected {count}, got {}",
actual.player_runtime_variable_owner_count
));
}
}
if let Some(count) = self.territory_runtime_variable_owner_count {
if actual.territory_runtime_variable_owner_count != count {
mismatches.push(format!(
"territory_runtime_variable_owner_count mismatch: expected {count}, got {}",
actual.territory_runtime_variable_owner_count
));
}
}
if let Some(count) = self.world_scalar_override_count {
if actual.world_scalar_override_count != count {
mismatches.push(format!(