diff options
Diffstat (limited to 'src/openvic-simulation/map')
-rw-r--r-- | src/openvic-simulation/map/Map.cpp | 9 | ||||
-rw-r--r-- | src/openvic-simulation/map/Map.hpp | 2 | ||||
-rw-r--r-- | src/openvic-simulation/map/Province.cpp | 4 | ||||
-rw-r--r-- | src/openvic-simulation/map/Province.hpp | 3 |
4 files changed, 10 insertions, 8 deletions
diff --git a/src/openvic-simulation/map/Map.cpp b/src/openvic-simulation/map/Map.cpp index 67e91cd..39d4870 100644 --- a/src/openvic-simulation/map/Map.cpp +++ b/src/openvic-simulation/map/Map.cpp @@ -286,9 +286,9 @@ bool Map::apply_history_to_provinces(ProvinceHistoryManager const& history_manag return ret; } -void Map::update_state(Date today) { +void Map::update_gamestate(Date today) { for (Province& province : provinces.get_items()) { - province.update_state(today); + province.update_gamestate(today); } update_highest_province_population(); update_total_map_population(); @@ -684,11 +684,14 @@ bool Map::load_climate_file(ModifierManager const& modifier_manager, ast::NodeCP return true; } ))(node); - cur_climate->lock(); } return ret; })(root); + for (Climate& climate : climates.get_items()) { + climate.lock(); + } + lock_climates(); return ret; diff --git a/src/openvic-simulation/map/Map.hpp b/src/openvic-simulation/map/Map.hpp index 2575324..0025cf4 100644 --- a/src/openvic-simulation/map/Map.hpp +++ b/src/openvic-simulation/map/Map.hpp @@ -124,7 +124,7 @@ namespace OpenVic { void update_highest_province_population(); void update_total_map_population(); - void update_state(Date today); + void update_gamestate(Date today); void tick(Date today); bool load_province_definitions(std::vector<ovdl::csv::LineObject> const& lines); diff --git a/src/openvic-simulation/map/Province.cpp b/src/openvic-simulation/map/Province.cpp index 2d301e8..1285b0d 100644 --- a/src/openvic-simulation/map/Province.cpp +++ b/src/openvic-simulation/map/Province.cpp @@ -112,9 +112,9 @@ void Province::update_pops() { } } -void Province::update_state(Date today) { +void Province::update_gamestate(Date today) { for (BuildingInstance& building : buildings.get_items()) { - building.update_state(today); + building.update_gamestate(today); } update_pops(); } diff --git a/src/openvic-simulation/map/Province.hpp b/src/openvic-simulation/map/Province.hpp index 431b4c2..7a42666 100644 --- a/src/openvic-simulation/map/Province.hpp +++ b/src/openvic-simulation/map/Province.hpp @@ -20,7 +20,6 @@ namespace OpenVic { using Climate = ProvinceSetModifier; using Continent = ProvinceSetModifier; - /* REQUIREMENTS: * MAP-5, MAP-7, MAP-8, MAP-43, MAP-47 * POP-22 @@ -143,7 +142,7 @@ namespace OpenVic { size_t get_pop_count() const; void update_pops(); - void update_state(Date today); + void update_gamestate(Date today); void tick(Date today); private: |