aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/misc/Decision.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-06-13 00:24:00 +0200
committer hop311 <hop3114@gmail.com>2024-06-13 00:24:00 +0200
commit4b39e77304094708d5c503b6a221386408cc4409 (patch)
tree7ba5a06714c267185dd3a59aabc6556a105c122f /src/openvic-simulation/misc/Decision.cpp
parentc0ba822ee46551a40ad6b43e8f56b80e27ae35b5 (diff)
Separated GameManager into Definition and Instance Managersinstance-definition-managers
Diffstat (limited to 'src/openvic-simulation/misc/Decision.cpp')
-rw-r--r--src/openvic-simulation/misc/Decision.cpp14
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;
}