aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/military
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-10-31 21:20:11 +0100
committer GitHub <noreply@github.com>2024-10-31 21:20:11 +0100
commit968c60580997d26035496cc675138e580354332f (patch)
treea0340ae5e92e219c5e0f5ddc825e28465f22a29e /src/openvic-simulation/military
parentc6f7c8047abbe0a91b2a88365eee2259d8a91a65 (diff)
parent84deeffe04d730064e89b4ceaf508f3f30113ea9 (diff)
Merge pull request #218 from OpenVicProject/condition-scripts-prep-work
Condition scripts prep work
Diffstat (limited to 'src/openvic-simulation/military')
-rw-r--r--src/openvic-simulation/military/Wargoal.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/openvic-simulation/military/Wargoal.cpp b/src/openvic-simulation/military/Wargoal.cpp
index 773e791..ce6b153 100644
--- a/src/openvic-simulation/military/Wargoal.cpp
+++ b/src/openvic-simulation/military/Wargoal.cpp
@@ -86,6 +86,7 @@ bool WargoalTypeManager::load_wargoal_file(ovdl::v2script::Parser const& parser)
}
using enum WargoalType::peace_options_t;
+ using enum scope_type_t;
std::string_view war_name;
Timespan available {}, truce {};
@@ -94,12 +95,12 @@ bool WargoalTypeManager::load_wargoal_file(ovdl::v2script::Parser const& parser)
mutual = false, all_allowed_states = false, always = false;
WargoalType::peace_options_t peace_options = NO_PEACE_OPTIONS;
WargoalType::peace_modifiers_t modifiers;
- 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 };
+ ConditionScript can_use { COUNTRY, COUNTRY, COUNTRY };
+ ConditionScript is_valid { COUNTRY, COUNTRY, COUNTRY };
+ ConditionScript allowed_states { STATE, COUNTRY, COUNTRY };
+ ConditionScript allowed_substate_regions { STATE, COUNTRY, COUNTRY };
+ ConditionScript allowed_states_in_crisis { STATE, COUNTRY, COUNTRY };
+ ConditionScript allowed_countries { COUNTRY, COUNTRY, COUNTRY };
EffectScript on_add, on_po_accepted; //country as default scope for both
const auto expect_peace_option = [&peace_options](WargoalType::peace_options_t peace_option) -> node_callback_t {