aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/map/Map.cpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-08-10 12:32:53 +0200
committer Hop311 <hop3114@gmail.com>2023-08-10 12:32:53 +0200
commit170ee25469322d25931050813a779dfbc2eaa4b0 (patch)
tree42bc9cc4a0e33ff1f1a64ae5e23edc4a52ca4320 /src/openvic/map/Map.cpp
parent8a08be3e7e8477973e243716d431ad7117acfa43 (diff)
Added distributions for pop type and culture
Diffstat (limited to 'src/openvic/map/Map.cpp')
-rw-r--r--src/openvic/map/Map.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/openvic/map/Map.cpp b/src/openvic/map/Map.cpp
index 0f4ed46..21bb6a5 100644
--- a/src/openvic/map/Map.cpp
+++ b/src/openvic/map/Map.cpp
@@ -366,12 +366,14 @@ Pop::pop_size_t Map::get_total_map_population() const {
return_t Map::setup(GoodManager const& good_manager, BuildingManager const& building_manager, PopManager const& pop_manager) {
return_t ret = SUCCESS;
for (Province& province : provinces.get_items()) {
+ province.clear_pops();
// Set all land provinces to have an RGO based on their index to test them
if (!province.is_water() && good_manager.get_good_count() > 0)
province.rgo = good_manager.get_good_by_index(province.get_index() % good_manager.get_good_count());
if (building_manager.generate_province_buildings(province) != SUCCESS) ret = FAILURE;
// Add some pops to the province (for testing purposes)
- pop_manager.generate_test_pops(province);
+ if (!province.is_water())
+ pop_manager.generate_test_pops(province);
}
return ret;
}