aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/military/Wargoal.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-06-13 18:59:47 +0200
committer GitHub <noreply@github.com>2024-06-13 18:59:47 +0200
commitbfd539513af435564daf70f94f6cce146dd5c948 (patch)
tree7ba5a06714c267185dd3a59aabc6556a105c122f /src/openvic-simulation/military/Wargoal.cpp
parent01a8f60aaca9784d814f4cb35a3fc4be86e1dd20 (diff)
parent4b39e77304094708d5c503b6a221386408cc4409 (diff)
Merge pull request #165 from OpenVicProject/instance-definition-managers
Separated GameManager into Definition and Instance Managers
Diffstat (limited to 'src/openvic-simulation/military/Wargoal.cpp')
-rw-r--r--src/openvic-simulation/military/Wargoal.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/openvic-simulation/military/Wargoal.cpp b/src/openvic-simulation/military/Wargoal.cpp
index e81eaa0..afb1a24 100644
--- a/src/openvic-simulation/military/Wargoal.cpp
+++ b/src/openvic-simulation/military/Wargoal.cpp
@@ -24,16 +24,16 @@ WargoalType::WargoalType(
allowed_countries { std::move(new_allowed_countries) }, on_add { std::move(new_on_add) },
on_po_accepted { std::move(new_on_po_accepted) } {}
-bool WargoalType::parse_scripts(GameManager& game_manager) {
+bool WargoalType::parse_scripts(DefinitionManager const& definition_manager) {
bool ret = true;
- ret &= can_use.parse_script(true, game_manager);
- ret &= is_valid.parse_script(true, game_manager);
- ret &= allowed_states.parse_script(true, game_manager);
- ret &= allowed_substate_regions.parse_script(true, game_manager);
- ret &= allowed_states_in_crisis.parse_script(true, game_manager);
- ret &= allowed_countries.parse_script(true, game_manager);
- ret &= on_add.parse_script(true, game_manager);
- ret &= on_po_accepted.parse_script(true, game_manager);
+ ret &= can_use.parse_script(true, definition_manager);
+ ret &= is_valid.parse_script(true, definition_manager);
+ ret &= allowed_states.parse_script(true, definition_manager);
+ ret &= allowed_substate_regions.parse_script(true, definition_manager);
+ ret &= allowed_states_in_crisis.parse_script(true, definition_manager);
+ ret &= allowed_countries.parse_script(true, definition_manager);
+ ret &= on_add.parse_script(true, definition_manager);
+ ret &= on_po_accepted.parse_script(true, definition_manager);
return ret;
}
@@ -211,10 +211,10 @@ bool WargoalTypeManager::load_wargoal_file(ast::NodeCPtr root) {
return ret;
}
-bool WargoalTypeManager::parse_scripts(GameManager& game_manager) {
+bool WargoalTypeManager::parse_scripts(DefinitionManager const& definition_manager) {
bool ret = true;
for (WargoalType& wargoal_type : wargoal_types.get_items()) {
- ret &= wargoal_type.parse_scripts(game_manager);
+ ret &= wargoal_type.parse_scripts(definition_manager);
}
return ret;
}