aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/Map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/map/Map.cpp')
-rw-r--r--src/openvic-simulation/map/Map.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/openvic-simulation/map/Map.cpp b/src/openvic-simulation/map/Map.cpp
index 386e7be..acd882e 100644
--- a/src/openvic-simulation/map/Map.cpp
+++ b/src/openvic-simulation/map/Map.cpp
@@ -78,11 +78,16 @@ bool Map::set_water_province(std::string_view identifier) {
}
bool Map::set_water_province_list(std::vector<std::string_view> const& list) {
+ if (water_provinces.is_locked()) {
+ Logger::error("The map's water provinces have already been locked!");
+ return false;
+ }
bool ret = true;
water_provinces.reserve(water_provinces.size() + list.size());
for (std::string_view const& identifier : list) {
ret &= set_water_province(identifier);
}
+ lock_water_provinces();
return ret;
}
@@ -271,7 +276,7 @@ Pop::pop_size_t Map::get_total_map_population() const {
return total_map_population;
}
-bool Map::setup(GoodManager const& good_manager, BuildingManager const& building_manager, PopManager const& pop_manager) {
+bool Map::setup(BuildingManager const& building_manager, PopManager const& pop_manager) {
bool ret = true;
for (Province& province : provinces.get_items()) {
province.clear_pops();