diff options
author | Hop311 <Hop3114@gmail.com> | 2024-06-13 18:59:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 18:59:47 +0200 |
commit | bfd539513af435564daf70f94f6cce146dd5c948 (patch) | |
tree | 7ba5a06714c267185dd3a59aabc6556a105c122f /src/openvic-simulation/misc/Decision.cpp | |
parent | 01a8f60aaca9784d814f4cb35a3fc4be86e1dd20 (diff) | |
parent | 4b39e77304094708d5c503b6a221386408cc4409 (diff) |
Merge pull request #165 from OpenVicProject/instance-definition-managers
Separated GameManager into Definition and Instance Managers
Diffstat (limited to 'src/openvic-simulation/misc/Decision.cpp')
-rw-r--r-- | src/openvic-simulation/misc/Decision.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/openvic-simulation/misc/Decision.cpp b/src/openvic-simulation/misc/Decision.cpp index e0bd7c0..41d4f81 100644 --- a/src/openvic-simulation/misc/Decision.cpp +++ b/src/openvic-simulation/misc/Decision.cpp @@ -13,12 +13,12 @@ Decision::Decision( news_desc_short { new_news_desc_short }, picture { new_picture }, potential { std::move(new_potential) }, allow { std::move(new_allow) }, ai_will_do { std::move(new_ai_will_do) }, effect { std::move(new_effect) } {} -bool Decision::parse_scripts(GameManager& game_manager) { +bool Decision::parse_scripts(DefinitionManager const& definition_manager) { bool ret = true; - ret &= potential.parse_script(false, game_manager); - ret &= allow.parse_script(false, game_manager); - ret &= ai_will_do.parse_scripts(game_manager); - ret &= effect.parse_script(false, game_manager); + ret &= potential.parse_script(false, definition_manager); + ret &= allow.parse_script(false, definition_manager); + ret &= ai_will_do.parse_scripts(definition_manager); + ret &= effect.parse_script(false, definition_manager); return ret; } @@ -84,10 +84,10 @@ bool DecisionManager::load_decision_file(ast::NodeCPtr root) { )(root); } -bool DecisionManager::parse_scripts(GameManager& game_manager) { +bool DecisionManager::parse_scripts(DefinitionManager const& definition_manager) { bool ret = true; for (Decision& decision : decisions.get_items()) { - ret &= decision.parse_scripts(game_manager); + ret &= decision.parse_scripts(definition_manager); } return ret; } |