diff options
author | Hop311 <Hop3114@gmail.com> | 2024-06-13 00:52:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 00:52:45 +0200 |
commit | a49e4d0975e2b5dfd13ae50aa716f1a0307e618d (patch) | |
tree | f681dd2e76d489ba6e7beea44ae6ebd59e9d51f3 /src/openvic-simulation/history/ProvinceHistory.cpp | |
parent | f5d173e88a49a1a9556860063aef1aa287925cfd (diff) | |
parent | 1198a780916e65cae048dd3478f614c1d18db846 (diff) |
Merge pull request #162 from OpenVicProject/map-instance
Map instance
Diffstat (limited to 'src/openvic-simulation/history/ProvinceHistory.cpp')
-rw-r--r-- | src/openvic-simulation/history/ProvinceHistory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openvic-simulation/history/ProvinceHistory.cpp b/src/openvic-simulation/history/ProvinceHistory.cpp index 645cf8d..87d0713 100644 --- a/src/openvic-simulation/history/ProvinceHistory.cpp +++ b/src/openvic-simulation/history/ProvinceHistory.cpp @@ -22,7 +22,7 @@ bool ProvinceHistoryMap::_load_history_entry( CountryManager const& country_manager = game_manager.get_country_manager(); GoodManager const& good_manager = game_manager.get_economy_manager().get_good_manager(); IdeologyManager const& ideology_manager = game_manager.get_politics_manager().get_ideology_manager(); - TerrainTypeManager const& terrain_type_manager = game_manager.get_map().get_terrain_type_manager(); + TerrainTypeManager const& terrain_type_manager = game_manager.get_map_definition().get_terrain_type_manager(); using enum ProvinceInstance::colony_status_t; static const string_map_t<ProvinceInstance::colony_status_t> colony_status_map { @@ -120,8 +120,8 @@ void ProvinceHistoryManager::reserve_more_province_histories(size_t size) { } } -void ProvinceHistoryManager::lock_province_histories(Map const& map, bool detailed_errors) { - std::vector<ProvinceDefinition> const& provinces = map.get_province_definitions(); +void ProvinceHistoryManager::lock_province_histories(MapDefinition const& map_definition, bool detailed_errors) { + std::vector<ProvinceDefinition> const& provinces = map_definition.get_province_definitions(); std::vector<bool> province_checklist(provinces.size()); for (decltype(province_histories)::value_type const& entry : province_histories) { @@ -231,7 +231,7 @@ bool ProvinceHistoryManager::load_pop_history_file( Logger::error("Attempted to load pop history file after province history registry was locked!"); return false; } - return game_manager.get_map().expect_province_definition_dictionary( + return game_manager.get_map_definition().expect_province_definition_dictionary( [this, &game_manager, date, non_integer_size](ProvinceDefinition const& province, ast::NodeCPtr node) -> bool { ProvinceHistoryMap* province_history = _get_or_make_province_history(province); if (province_history != nullptr) { |