aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/MapInstance.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-09-29 22:37:11 +0200
committer hop311 <hop3114@gmail.com>2024-10-05 22:48:42 +0200
commiteb77495ba874d474bbbbc950a65e8f496b13f285 (patch)
treefdbbc50f20d607cf66cff407415a7b89a14c78b8 /src/openvic-simulation/map/MapInstance.cpp
parent6c23b7ff2e8bc733699ef9b29aee80719001acf2 (diff)
Calculate country and province resultant modifier sums
Diffstat (limited to 'src/openvic-simulation/map/MapInstance.cpp')
-rw-r--r--src/openvic-simulation/map/MapInstance.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/openvic-simulation/map/MapInstance.cpp b/src/openvic-simulation/map/MapInstance.cpp
index 0ce8cea..d8ec2fb 100644
--- a/src/openvic-simulation/map/MapInstance.cpp
+++ b/src/openvic-simulation/map/MapInstance.cpp
@@ -118,6 +118,12 @@ bool MapInstance::apply_history_to_provinces(
return ret;
}
+void MapInstance::update_modifier_sums(Date today, StaticModifierCache const& static_modifier_cache) {
+ for (ProvinceInstance& province : province_instances.get_items()) {
+ province.update_modifier_sum(today, static_modifier_cache);
+ }
+}
+
void MapInstance::update_gamestate(Date today, DefineManager const& define_manager) {
for (ProvinceInstance& province : province_instances.get_items()) {
province.update_gamestate(today, define_manager);