diff options
author | zaaarf <me@zaaarf.foo> | 2024-01-07 23:47:39 +0100 |
---|---|---|
committer | zaaarf <me@zaaarf.foo> | 2024-01-07 23:47:39 +0100 |
commit | 6f07de81a6ca430c522527958e05440d67b04937 (patch) | |
tree | 6aae2959564bf93d85b2dc985cf5d4ea6c03fb78 /src/openvic-simulation/military | |
parent | b06b25bd2910818029ebbf1cd3014ef20a64e25b (diff) |
feat: condition loading and parsing
Co-authored-by: Hop311 <Hop3114@gmail.com>
Diffstat (limited to 'src/openvic-simulation/military')
-rw-r--r-- | src/openvic-simulation/military/Wargoal.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/openvic-simulation/military/Wargoal.cpp b/src/openvic-simulation/military/Wargoal.cpp index 28cbc51..174cd09 100644 --- a/src/openvic-simulation/military/Wargoal.cpp +++ b/src/openvic-simulation/military/Wargoal.cpp @@ -84,9 +84,13 @@ bool WargoalTypeManager::load_wargoal_file(ast::NodeCPtr root) { mutual = false, all_allowed_states = false, always = false; peace_options_t peace_options = NO_PEACE_OPTIONS; WargoalType::peace_modifiers_t modifiers; - ConditionScript can_use, is_valid, allowed_states, allowed_substate_regions, allowed_states_in_crisis, - allowed_countries; - EffectScript on_add, on_po_accepted; + ConditionScript can_use { scope_t::COUNTRY, scope_t::COUNTRY, scope_t::COUNTRY }; + ConditionScript is_valid { scope_t::COUNTRY, scope_t::COUNTRY, scope_t::COUNTRY }; + ConditionScript allowed_states { scope_t::STATE, scope_t::COUNTRY, scope_t::COUNTRY }; + ConditionScript allowed_substate_regions { scope_t::STATE, scope_t::COUNTRY, scope_t::COUNTRY }; + ConditionScript allowed_states_in_crisis { scope_t::STATE, scope_t::COUNTRY, scope_t::COUNTRY }; + ConditionScript allowed_countries { scope_t::COUNTRY, scope_t::COUNTRY, scope_t::COUNTRY }; + EffectScript on_add, on_po_accepted; //country as default scope for both const auto expect_peace_option = [&peace_options](peace_options_t peace_option) -> node_callback_t { return expect_bool([&peace_options, peace_option](bool val) -> bool { |