diff options
author | Hop311 <hop3114@gmail.com> | 2023-09-17 16:08:11 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-09-17 16:08:11 +0200 |
commit | 5549753a6ae909b1a65f52a1cc67ef2b5efae55a (patch) | |
tree | 5801afa7f578c830ed4a604640a485223ecd81ec /src/openvic-simulation/dataloader/Dataloader.cpp | |
parent | f95902fdd85f86c10b9c300099c67312fc81f11b (diff) |
Futher scaffolding for province positions loading
Diffstat (limited to 'src/openvic-simulation/dataloader/Dataloader.cpp')
-rw-r--r-- | src/openvic-simulation/dataloader/Dataloader.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp index eae3f84..2d2f59f 100644 --- a/src/openvic-simulation/dataloader/Dataloader.cpp +++ b/src/openvic-simulation/dataloader/Dataloader.cpp @@ -157,7 +157,9 @@ bool Dataloader::_load_pop_types(PopManager& pop_manager, fs::path const& pop_ty return ret; } -bool Dataloader::_load_map_dir(Map& map, fs::path const& map_directory) const { +bool Dataloader::_load_map_dir(GameManager& game_manager, fs::path const& map_directory) const { + Map& map = game_manager.map; + static const fs::path defaults_filename = "default.map"; static const std::string default_definitions = "definition.csv"; static const std::string default_provinces = "provinces.bmp"; @@ -230,7 +232,7 @@ bool Dataloader::_load_map_dir(Map& map, fs::path const& map_directory) const { ret = false; } - if (!map.load_province_positions(_parse_defines(lookup_file(map_directory / positions)).get_file_node())) { + if (!map.load_province_positions(game_manager.building_manager, _parse_defines(lookup_file(map_directory / positions)).get_file_node())) { Logger::error("Failed to load province positions file!"); ret = false; } @@ -279,7 +281,7 @@ bool Dataloader::load_defines(GameManager& game_manager) const { Logger::error("Failed to load religions!"); ret = false; } - if (!_load_map_dir(game_manager.map, map_directory)) { + if (!_load_map_dir(game_manager, map_directory)) { Logger::error("Failed to load map!"); ret = false; } |