diff options
author | hop311 <hop3114@gmail.com> | 2024-07-17 00:57:50 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-07-17 00:58:05 +0200 |
commit | f83e869def6608f64606aead24ad1cfbb6f5c72a (patch) | |
tree | fae6a1086f3ae698c4fb3f18340c5ed5f580c889 /src/openvic-simulation/InstanceManager.cpp | |
parent | e8a3b33f13ebdf3a388b4996308b4db9763dc375 (diff) |
Add IndexedMap and use in low key count, high value density casesindexed-map
Diffstat (limited to 'src/openvic-simulation/InstanceManager.cpp')
-rw-r--r-- | src/openvic-simulation/InstanceManager.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/openvic-simulation/InstanceManager.cpp b/src/openvic-simulation/InstanceManager.cpp index c51dec7..d314acd 100644 --- a/src/openvic-simulation/InstanceManager.cpp +++ b/src/openvic-simulation/InstanceManager.cpp @@ -69,7 +69,18 @@ bool InstanceManager::setup() { } bool ret = good_instance_manager.setup(definition_manager.get_economy_manager().get_good_definition_manager()); - ret &= map_instance.setup(definition_manager.get_economy_manager().get_building_type_manager()); + ret &= map_instance.setup( + definition_manager.get_economy_manager().get_building_type_manager(), + 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() + ); game_instance_setup = true; @@ -104,14 +115,10 @@ 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, - // TODO - the following arguments are for generating test pop attributes - definition_manager.get_politics_manager().get_ideology_manager(), - definition_manager.get_politics_manager().get_issue_manager(), - *definition_manager.get_country_definition_manager().get_country_definition_by_identifier("ENG") + // TODO - the following argument is for generating test pop attributes + definition_manager.get_politics_manager().get_issue_manager() ); - ret &= map_instance.get_state_manager().generate_states(map_instance); - ret &= country_instance_manager.generate_country_instances(definition_manager.get_country_definition_manager()); ret &= country_instance_manager.apply_history_to_countries( definition_manager.get_history_manager().get_country_manager(), today, unit_instance_manager, map_instance ); |