aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/pop/Pop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/pop/Pop.cpp')
-rw-r--r--src/openvic-simulation/pop/Pop.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp
index 366d423..89ff609 100644
--- a/src/openvic-simulation/pop/Pop.cpp
+++ b/src/openvic-simulation/pop/Pop.cpp
@@ -2,9 +2,9 @@
#include "openvic-simulation/country/CountryDefinition.hpp"
#include "openvic-simulation/country/CountryInstance.hpp"
+#include "openvic-simulation/defines/Define.hpp"
#include "openvic-simulation/map/ProvinceInstance.hpp"
#include "openvic-simulation/military/UnitType.hpp"
-#include "openvic-simulation/misc/Define.hpp"
#include "openvic-simulation/modifier/ModifierManager.hpp"
#include "openvic-simulation/politics/Ideology.hpp"
#include "openvic-simulation/politics/Issue.hpp"
@@ -144,14 +144,16 @@ void Pop::update_gamestate(
DefineManager const& define_manager, CountryInstance const* owner, const fixed_point_t pop_size_per_regiment_multiplier
) {
if (type->get_can_be_recruited()) {
+ MilitaryDefines const& military_defines = define_manager.get_military_defines();
+
if (
- size < define_manager.get_min_pop_size_for_regiment() || owner == nullptr ||
+ size < military_defines.get_min_pop_size_for_regiment() || owner == nullptr ||
!RegimentType::allowed_cultures_check_culture_in_country(owner->get_allowed_regiment_cultures(), culture, *owner)
) {
max_supported_regiments = 0;
} else {
max_supported_regiments = (fixed_point_t::parse(size) / (
- fixed_point_t::parse(define_manager.get_pop_size_per_regiment()) * pop_size_per_regiment_multiplier
+ fixed_point_t::parse(military_defines.get_pop_size_per_regiment()) * pop_size_per_regiment_multiplier
)).to_int64_t() + 1;
}
}