aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/pop
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/pop
parentc0ba822ee46551a40ad6b43e8f56b80e27ae35b5 (diff)
Separated GameManager into Definition and Instance Managersinstance-definition-managers
Diffstat (limited to 'src/openvic-simulation/pop')
-rw-r--r--src/openvic-simulation/pop/Pop.cpp30
-rw-r--r--src/openvic-simulation/pop/Pop.hpp4
2 files changed, 17 insertions, 17 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;
}
diff --git a/src/openvic-simulation/pop/Pop.hpp b/src/openvic-simulation/pop/Pop.hpp
index f29a8fe..a5033ef 100644
--- a/src/openvic-simulation/pop/Pop.hpp
+++ b/src/openvic-simulation/pop/Pop.hpp
@@ -197,7 +197,7 @@ namespace OpenVic {
issue_weight_map_t&& new_issues
);
- bool parse_scripts(GameManager const& game_manager);
+ bool parse_scripts(DefinitionManager const& definition_manager);
public:
PopType(PopType&&) = default;
@@ -326,6 +326,6 @@ namespace OpenVic {
bool generate_modifiers(ModifierManager& modifier_manager) const;
- bool parse_scripts(GameManager const& game_manager);
+ bool parse_scripts(DefinitionManager const& definition_manager);
};
}