aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/MapInstance.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-10-20 20:44:51 +0200
committer GitHub <noreply@github.com>2024-10-20 20:44:51 +0200
commit6527f832a5e14a28fc1f5b85628541038eb90141 (patch)
treeaca829171be7b1144cb3ca29510593fa8a84af24 /src/openvic-simulation/map/MapInstance.cpp
parent9a84e7af70f2528578b00879e568bca285563e9b (diff)
parent5194a3d043db66b81470111a94f3b1cdf8d42176 (diff)
Merge pull request #198 from OpenVicProject/resultant-modifier
Calculate country and province 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);