diff options
author | Hop311 <Hop3114@gmail.com> | 2023-10-29 21:14:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-29 21:14:55 +0100 |
commit | 06cc0606156d009026930c785c62434276fbe782 (patch) | |
tree | d37fcb69766ec029ea4e3e2816c419f9d7e05f7c /src/openvic-simulation/dataloader/Dataloader.hpp | |
parent | d8ec90f07342876e9331819bd3cc372050f78248 (diff) | |
parent | 1b5e43fa7750cc4025d32f18390593cbce3ba842 (diff) |
Merge pull request #67 from OpenVicProject/format
Formating
Diffstat (limited to 'src/openvic-simulation/dataloader/Dataloader.hpp')
-rw-r--r-- | src/openvic-simulation/dataloader/Dataloader.hpp | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.hpp b/src/openvic-simulation/dataloader/Dataloader.hpp index 4a8b111..0bf3086 100644 --- a/src/openvic-simulation/dataloader/Dataloader.hpp +++ b/src/openvic-simulation/dataloader/Dataloader.hpp @@ -23,9 +23,11 @@ namespace OpenVic { private: path_vector_t roots; - bool _load_pop_types(PopManager& pop_manager, UnitManager const& unit_manager, GoodManager const& good_manager, fs::path const& pop_type_directory) const; - bool _load_units(UnitManager& unit_manager, GoodManager const& good_manager, fs::path const& units_directory) const; - bool _load_map_dir(GameManager& game_manager, fs::path const& map_directory) const; + bool _load_pop_types( + PopManager& pop_manager, UnitManager const& unit_manager, GoodManager const& good_manager + ) const; + bool _load_units(UnitManager& unit_manager, GoodManager const& good_manager) const; + bool _load_map_dir(GameManager& game_manager) const; bool _load_oobs(GameManager& game_manager) const; bool _load_countries(GameManager& game_manager) const; bool _load_history(GameManager& game_manager) const; @@ -43,15 +45,18 @@ namespace OpenVic { /// Supports being supplied: /// 1. A valid Victoria 2 game directory (Victoria 2 directory that contains a v2game.exe file) /// 2. An Empty path: assumes a common Steam install structure per platform. - /// 2b. If Windows, returns "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Paradox Interactive\Victoria 2" "path" registry value + /// 2b. If Windows, returns "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Paradox Interactive\Victoria 2" + /// "path" registry value /// 2c. If registry value returns an empty string, performs Steam checks below /// 3. A path to a root Steam install. (eg: C:\Program Files(x86)\Steam, ~/.steam/steam) - /// 4. A path to a root Steam steamapps directory. (eg: C:\Program Files(x86)\Steam\steamapps, ~/.steam/steam/steamapps) + /// 4. A path to a root Steam steamapps directory. (eg: C:\Program Files(x86)\Steam\steamapps, + /// ~/.steam/steam/steamapps) /// 5. A path to the root Steam libraryfolders.vdf, commonly in the root Steam steamapps directory. /// 6. A path to the Steam library directory that contains Victoria 2. /// 7. A path to a Steam library's steamapps directory that contains Victoria 2. /// 8. A path to a Steam library's steamapps/common directory that contains Victoria 2. - /// 9. If any of these checks don't resolve to a valid Victoria 2 game directory when supplied a non-empty hint_path, performs empty path behavior. + /// 9. If any of these checks don't resolve to a valid Victoria 2 game directory when supplied + /// a non-empty hint_path, performs empty path behavior. /// @return fs::path The root directory of a valid Victoria 2 install, or an empty path. /// static fs::path search_for_game_path(fs::path hint_path = {}); @@ -64,7 +69,9 @@ namespace OpenVic { */ fs::path lookup_file(fs::path const& path) const; path_vector_t lookup_files_in_dir(fs::path const& path, fs::path const& extension) const; - bool apply_to_files_in_dir(fs::path const& path, fs::path const& extension, NodeTools::callback_t<fs::path const&> callback) const; + bool apply_to_files_in_dir( + fs::path const& path, fs::path const& extension, NodeTools::callback_t<fs::path const&> callback + ) const; bool load_defines(GameManager& game_manager) const; bool load_pop_history(GameManager& game_manager, fs::path const& path) const; @@ -85,13 +92,15 @@ namespace OpenVic { Finnish, _LocaleCount }; - static constexpr char const* locale_names[_LocaleCount] = { - "en_GB", "fr_FR", "de_DE", "pl_PL", "es_ES", "it_IT", "sv_SE", "cs_CZ", "hu_HU", "nl_NL", "pt_PT", "ru_RU", "fi_FI" - }; + static constexpr char const* locale_names[_LocaleCount] = { "en_GB", "fr_FR", "de_DE", "pl_PL", "es_ES", + "it_IT", "sv_SE", "cs_CZ", "hu_HU", "nl_NL", + "pt_PT", "ru_RU", "fi_FI" }; /* Args: key, locale, localisation */ using localisation_callback_t = NodeTools::callback_t<std::string_view, locale_t, std::string_view>; - bool load_localisation_files(localisation_callback_t callback, fs::path const& localisation_dir = "localisation") const; + bool load_localisation_files( + localisation_callback_t callback, fs::path const& localisation_dir = "localisation" + ) const; private: struct fshash { |