aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/pop/Pop.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/pop/Pop.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/pop/Pop.cpp')
-rw-r--r--src/openvic-simulation/pop/Pop.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp
index be484d9..b1bf56f 100644
--- a/src/openvic-simulation/pop/Pop.cpp
+++ b/src/openvic-simulation/pop/Pop.cpp
@@ -194,18 +194,18 @@ PopType::PopType(
assert(merge_max_size >= 0);
}
-bool PopType::parse_scripts(GameManager const& game_manager) {
+bool PopType::parse_scripts(DefinitionManager const& definition_manager) {
bool ret = true;
- ret &= country_migration_target.parse_scripts(game_manager);
- ret &= migration_target.parse_scripts(game_manager);
+ ret &= country_migration_target.parse_scripts(definition_manager);
+ ret &= migration_target.parse_scripts(definition_manager);
for (auto [pop_type, weight] : mutable_iterator(promote_to)) {
- ret &= weight.parse_scripts(game_manager);
+ ret &= weight.parse_scripts(definition_manager);
}
for (auto [ideology, weight] : mutable_iterator(ideologies)) {
- ret &= weight.parse_scripts(game_manager);
+ ret &= weight.parse_scripts(definition_manager);
}
for (auto [issue, weight] : mutable_iterator(issues)) {
- ret &= weight.parse_scripts(game_manager);
+ ret &= weight.parse_scripts(definition_manager);
}
return ret;
}
@@ -656,17 +656,17 @@ bool PopManager::generate_modifiers(ModifierManager& modifier_manager) const {
return ret;
}
-bool PopManager::parse_scripts(GameManager const& game_manager) {
+bool PopManager::parse_scripts(DefinitionManager const& definition_manager) {
bool ret = true;
for (PopType& pop_type : pop_types.get_items()) {
- ret &= pop_type.parse_scripts(game_manager);
+ ret &= pop_type.parse_scripts(definition_manager);
}
- ret &= promotion_chance.parse_scripts(game_manager);
- ret &= demotion_chance.parse_scripts(game_manager);
- ret &= migration_chance.parse_scripts(game_manager);
- ret &= colonialmigration_chance.parse_scripts(game_manager);
- ret &= emigration_chance.parse_scripts(game_manager);
- ret &= assimilation_chance.parse_scripts(game_manager);
- ret &= conversion_chance.parse_scripts(game_manager);
+ ret &= promotion_chance.parse_scripts(definition_manager);
+ ret &= demotion_chance.parse_scripts(definition_manager);
+ ret &= migration_chance.parse_scripts(definition_manager);
+ ret &= colonialmigration_chance.parse_scripts(definition_manager);
+ ret &= emigration_chance.parse_scripts(definition_manager);
+ ret &= assimilation_chance.parse_scripts(definition_manager);
+ ret &= conversion_chance.parse_scripts(definition_manager);
return ret;
}