diff options
author | hop311 <hop3114@gmail.com> | 2024-06-13 00:24:00 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-06-13 00:24:00 +0200 |
commit | 4b39e77304094708d5c503b6a221386408cc4409 (patch) | |
tree | 7ba5a06714c267185dd3a59aabc6556a105c122f /src/openvic-simulation/military/Wargoal.cpp | |
parent | c0ba822ee46551a40ad6b43e8f56b80e27ae35b5 (diff) |
Separated GameManager into Definition and Instance Managersinstance-definition-managers
Diffstat (limited to 'src/openvic-simulation/military/Wargoal.cpp')
-rw-r--r-- | src/openvic-simulation/military/Wargoal.cpp | 22 |
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; } |