aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/InstanceManager.cpp
diff options
context:
space:
mode:
author wvpm <24685035+wvpm@users.noreply.github.com>2024-11-02 15:20:30 +0100
committer wvpm <24685035+wvpm@users.noreply.github.com>2024-11-10 10:22:44 +0100
commit55eb6aab174172b63c44d801823ed8dc02ff0402 (patch)
tree5dc169ed65e3b86ce8307667f5c15d8fb54e3589 /src/openvic-simulation/InstanceManager.cpp
parent9868a5d6755889e3558f252475ae6d7599b788ac (diff)
Cache pops by type per state and provincestate_cache_owners
Diffstat (limited to 'src/openvic-simulation/InstanceManager.cpp')
-rw-r--r--src/openvic-simulation/InstanceManager.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/openvic-simulation/InstanceManager.cpp b/src/openvic-simulation/InstanceManager.cpp
index 670cbfc..4f388b0 100644
--- a/src/openvic-simulation/InstanceManager.cpp
+++ b/src/openvic-simulation/InstanceManager.cpp
@@ -61,7 +61,7 @@ void InstanceManager::tick() {
Logger::info("Tick: ", today);
// Tick...
- map_instance.tick(today);
+ map_instance.map_tick(today, definition_manager.get_modifier_manager().get_modifier_effect_cache());
set_gamestate_needs_update();
}
@@ -140,7 +140,11 @@ bool InstanceManager::load_bookmark(Bookmark const* new_bookmark) {
if (ret) {
update_modifier_sums();
- map_instance.initialise_for_new_game(definition_manager.get_modifier_manager().get_modifier_effect_cache());
+ map_instance.initialise_for_new_game(
+ today,
+ definition_manager.get_define_manager(),
+ definition_manager.get_modifier_manager().get_modifier_effect_cache()
+ );
}
return ret;