aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/military/Wargoal.cpp
diff options
context:
space:
mode:
author zaaarf <80046572+zaaarf@users.noreply.github.com>2024-01-07 23:51:06 +0100
committer GitHub <noreply@github.com>2024-01-07 23:51:06 +0100
commit79b8b73304753fedab822e6aa859fa15673f52cc (patch)
treecb25cfb89f8b06fc34f5c906e658a1b322120089 /src/openvic-simulation/military/Wargoal.cpp
parent400469f08f10ffd044d9948c3f0db340c8a60db0 (diff)
parent6f07de81a6ca430c522527958e05440d67b04937 (diff)
Merge pull request #111 from OpenVicProject/conditions-checking
Condition definition checking/loading
Diffstat (limited to 'src/openvic-simulation/military/Wargoal.cpp')
-rw-r--r--src/openvic-simulation/military/Wargoal.cpp10
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 {