diff options
author | hop311 <hop3114@gmail.com> | 2024-07-21 15:09:25 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-07-22 20:21:27 +0200 |
commit | 67cbd14630c4344902d3fa1ddca178809da4293b (patch) | |
tree | 9df96829dd0f9a0bd7c2e6b0e047547aa4bff3a7 /src/openvic-simulation/InstanceManager.cpp | |
parent | d1f3a96b72dd06b5f97dd4643e5f016a02b42ea6 (diff) |
Fleshing out Country, State and Province instances + historycountry-instance
Diffstat (limited to 'src/openvic-simulation/InstanceManager.cpp')
-rw-r--r-- | src/openvic-simulation/InstanceManager.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/openvic-simulation/InstanceManager.cpp b/src/openvic-simulation/InstanceManager.cpp index d314acd..cd5da59 100644 --- a/src/openvic-simulation/InstanceManager.cpp +++ b/src/openvic-simulation/InstanceManager.cpp @@ -41,6 +41,7 @@ void InstanceManager::update_gamestate() { // Update gamestate... map_instance.update_gamestate(today); + country_instance_manager.update_gamestate(); gamestate_updated(); gamestate_needs_update = false; @@ -74,12 +75,12 @@ bool InstanceManager::setup() { definition_manager.get_pop_manager().get_pop_types(), definition_manager.get_politics_manager().get_ideology_manager().get_ideologies() ); - ret &= map_instance.get_state_manager().generate_states(map_instance); ret &= country_instance_manager.generate_country_instances( definition_manager.get_country_definition_manager(), definition_manager.get_research_manager().get_technology_manager().get_technologies(), definition_manager.get_research_manager().get_invention_manager().get_inventions(), - definition_manager.get_politics_manager().get_ideology_manager().get_ideologies() + definition_manager.get_politics_manager().get_ideology_manager().get_ideologies(), + definition_manager.get_pop_manager().get_pop_types() ); game_instance_setup = true; @@ -115,6 +116,7 @@ bool InstanceManager::load_bookmark(Bookmark const* new_bookmark) { bool ret = map_instance.apply_history_to_provinces( definition_manager.get_history_manager().get_province_manager(), today, + country_instance_manager, // TODO - the following argument is for generating test pop attributes definition_manager.get_politics_manager().get_issue_manager() ); @@ -123,6 +125,10 @@ bool InstanceManager::load_bookmark(Bookmark const* new_bookmark) { definition_manager.get_history_manager().get_country_manager(), today, unit_instance_manager, map_instance ); + ret &= map_instance.get_state_manager().generate_states( + map_instance, definition_manager.get_pop_manager().get_pop_types() + ); + return ret; } |