aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/Dataloader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/dataloader/Dataloader.cpp')
-rw-r--r--src/openvic-simulation/dataloader/Dataloader.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp
index 2018f27..f78499c 100644
--- a/src/openvic-simulation/dataloader/Dataloader.cpp
+++ b/src/openvic-simulation/dataloader/Dataloader.cpp
@@ -603,8 +603,7 @@ bool Dataloader::_load_map_dir(GameManager& game_manager) const {
static constexpr std::string_view default_region = "region.txt";
static constexpr std::string_view default_region_sea = "region_sea.txt"; // TODO
static constexpr std::string_view default_province_flag_sprite = "province_flag_sprites"; // TODO
-
- static constexpr std::string_view climate_filename = "climate.txt"; // TODO
+ static constexpr std::string_view climate_file = "climate.txt"; // TODO
/* Parser stored so the filename string_views persist until the end of this function. */
const v2script::Parser parser = parse_defines(lookup_file(append_string_views(map_directory, defaults_filename)));
@@ -702,6 +701,22 @@ bool Dataloader::_load_map_dir(GameManager& game_manager) const {
ret = false;
}
+ if (!map.load_climate_file(
+ game_manager.get_modifier_manager(),
+ parse_defines(lookup_file(append_string_views(map_directory, climate_file))).get_file_node()
+ )) {
+ Logger::error("Failed to load climates!");
+ ret = false;
+ }
+
+ if (!map.load_continent_file(
+ game_manager.get_modifier_manager(),
+ parse_defines(lookup_file(append_string_views(map_directory, continent))).get_file_node()
+ )) {
+ Logger::error("Failed to load continents!");
+ ret = false;
+ }
+
return ret;
}