aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/MapInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/map/MapInstance.cpp')
-rw-r--r--src/openvic-simulation/map/MapInstance.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/openvic-simulation/map/MapInstance.cpp b/src/openvic-simulation/map/MapInstance.cpp
index 7c529bc..0b5286f 100644
--- a/src/openvic-simulation/map/MapInstance.cpp
+++ b/src/openvic-simulation/map/MapInstance.cpp
@@ -94,13 +94,15 @@ bool MapInstance::apply_history_to_provinces(
if (history_map != nullptr) {
ProvinceHistoryEntry const* pop_history_entry = nullptr;
+ ProductionType const* rgo_production_type = nullptr;
for (auto const& [entry_date, entry] : history_map->get_entries()) {
if (entry_date > date) {
break;
}
- province.apply_history_to_province(*entry, country_manager, production_type_manager);
+ rgo_production_type = entry->get_rgo_production_type();
+ province.apply_history_to_province(*entry, country_manager);
if (!entry->get_pops().empty()) {
pop_history_entry = entry.get();
@@ -112,6 +114,10 @@ bool MapInstance::apply_history_to_provinces(
province.setup_pop_test_values(issue_manager);
}
+
+ if(rgo_production_type != nullptr) {
+ province.setup_rgo(*rgo_production_type);
+ }
}
}
}