Implement whole-game packed event conditions
This commit is contained in:
parent
e9c8bfbb9c
commit
cc54a00e25
16 changed files with 1184 additions and 42 deletions
|
|
@ -2126,9 +2126,8 @@ fn parse_real_event_runtime_record_summary(
|
|||
&& row.raw_scalar_value != 0
|
||||
&& (!company_target_present || !territory_target_present)
|
||||
{
|
||||
row.notes.push(
|
||||
"territory access row is missing company or territory scope".to_string(),
|
||||
);
|
||||
row.notes
|
||||
.push("territory access row is missing company or territory scope".to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2927,18 +2926,20 @@ fn runtime_effect_supported_for_save_import(effect: &RuntimeEffect) -> bool {
|
|||
),
|
||||
RuntimeEffect::SetCompanyTerritoryAccess {
|
||||
target, territory, ..
|
||||
} => matches!(
|
||||
target,
|
||||
RuntimeCompanyTarget::AllActive
|
||||
| RuntimeCompanyTarget::Ids { .. }
|
||||
| RuntimeCompanyTarget::HumanCompanies
|
||||
| RuntimeCompanyTarget::AiCompanies
|
||||
| RuntimeCompanyTarget::SelectedCompany
|
||||
| RuntimeCompanyTarget::ConditionTrueCompany
|
||||
) && matches!(
|
||||
territory,
|
||||
RuntimeTerritoryTarget::AllTerritories | RuntimeTerritoryTarget::Ids { .. }
|
||||
),
|
||||
} => {
|
||||
matches!(
|
||||
target,
|
||||
RuntimeCompanyTarget::AllActive
|
||||
| RuntimeCompanyTarget::Ids { .. }
|
||||
| RuntimeCompanyTarget::HumanCompanies
|
||||
| RuntimeCompanyTarget::AiCompanies
|
||||
| RuntimeCompanyTarget::SelectedCompany
|
||||
| RuntimeCompanyTarget::ConditionTrueCompany
|
||||
) && matches!(
|
||||
territory,
|
||||
RuntimeTerritoryTarget::AllTerritories | RuntimeTerritoryTarget::Ids { .. }
|
||||
)
|
||||
}
|
||||
RuntimeEffect::SetCompanyCash { target, .. }
|
||||
| RuntimeEffect::AdjustCompanyCash { target, .. }
|
||||
| RuntimeEffect::AdjustCompanyDebt { target, .. } => matches!(
|
||||
|
|
@ -2961,7 +2962,10 @@ fn runtime_condition_supported_for_save_import(condition: &RuntimeCondition) ->
|
|||
match condition {
|
||||
RuntimeCondition::CompanyNumericThreshold { .. }
|
||||
| RuntimeCondition::TerritoryNumericThreshold { .. }
|
||||
| RuntimeCondition::CompanyTerritoryNumericThreshold { .. } => true,
|
||||
| RuntimeCondition::CompanyTerritoryNumericThreshold { .. }
|
||||
| RuntimeCondition::SpecialConditionThreshold { .. }
|
||||
| RuntimeCondition::CandidateAvailabilityThreshold { .. }
|
||||
| RuntimeCondition::EconomicStatusCodeThreshold { .. } => true,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue