diff options
author | BrickPi <49528459+BrickPi@users.noreply.github.com> | 2023-10-15 21:51:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-15 21:51:46 +0200 |
commit | d1125bf50be8fd415e2ce5179fdf446918e16d93 (patch) | |
tree | 401556d0b45378c670b9101606a4fd98a207de27 /src/openvic-simulation/dataloader | |
parent | 3249e21104bab6002676abe00450e7bd3f682303 (diff) | |
parent | af4758d399a75485b9adfeb3058a526eec3c8a4d (diff) |
Merge pull request #44 from OpenVicProject/leader-loading
Implement Trait Loading
Diffstat (limited to 'src/openvic-simulation/dataloader')
-rw-r--r-- | src/openvic-simulation/dataloader/Dataloader.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp index 72e3113..15c7ce7 100644 --- a/src/openvic-simulation/dataloader/Dataloader.cpp +++ b/src/openvic-simulation/dataloader/Dataloader.cpp @@ -587,6 +587,7 @@ bool Dataloader::load_defines(GameManager& game_manager) const { static const fs::path units_directory = "units"; static const fs::path buildings_file = "common/buildings.txt"; + static const fs::path bookmark_file = "common/bookmarks.txt"; static const fs::path culture_file = "common/cultures.txt"; static const fs::path goods_file = "common/goods.txt"; static const fs::path governments_file = "common/governments.txt"; @@ -595,7 +596,7 @@ bool Dataloader::load_defines(GameManager& game_manager) const { static const fs::path issues_file = "common/issues.txt"; static const fs::path production_types_file = "common/production_types.txt"; static const fs::path religion_file = "common/religion.txt"; - static const fs::path bookmark_file = "common/bookmarks.txt"; + static const fs::path leader_traits_file = "common/traits.txt"; bool ret = true; @@ -663,6 +664,10 @@ bool Dataloader::load_defines(GameManager& game_manager) const { Logger::error("Failed to load units!"); ret = false; } + if (!game_manager.get_military_manager().get_leader_trait_manager().load_leader_traits_file(game_manager.get_modifier_manager(), parse_defines(lookup_file(leader_traits_file)).get_file_node())) { + Logger::error("Failed to load leader traits!"); + ret = false; + } if (!game_manager.get_history_manager().load_bookmark_file(parse_defines(lookup_file(bookmark_file)).get_file_node())) { Logger::error("Failed to load bookmarks!"); ret = false; |