aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/Dataloader.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-10-31 02:11:47 +0100
committer hop311 <hop3114@gmail.com>2023-11-07 19:33:42 +0100
commitc1b7cab254ac14a173477661047ad2492930ff8b (patch)
tree3fd965559fb97c7a2f2245952ab531afec84bc93 /src/openvic-simulation/dataloader/Dataloader.hpp
parente91ce707b2c0e80591b9fd1b6a5215e6e6989df8 (diff)
History loading changes + PROPERTY macro
Diffstat (limited to 'src/openvic-simulation/dataloader/Dataloader.hpp')
-rw-r--r--src/openvic-simulation/dataloader/Dataloader.hpp27
1 files changed, 8 insertions, 19 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.hpp b/src/openvic-simulation/dataloader/Dataloader.hpp
index 508bf13..a8b8bb1 100644
--- a/src/openvic-simulation/dataloader/Dataloader.hpp
+++ b/src/openvic-simulation/dataloader/Dataloader.hpp
@@ -26,7 +26,6 @@ namespace OpenVic {
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_history(GameManager& game_manager) const;
public:
@@ -64,7 +63,8 @@ namespace OpenVic {
/* REQUIREMENTS:
* DAT-24
*/
- fs::path lookup_file(fs::path const& path) const;
+ fs::path lookup_file(fs::path const& path, bool print_error = true) const;
+ fs::path lookup_file_case_insensitive(fs::path const& path, bool print_error = true) 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
@@ -74,24 +74,13 @@ namespace OpenVic {
bool load_pop_history(GameManager& game_manager, fs::path const& path) const;
enum locale_t : size_t {
- English,
- French,
- German,
- Polish,
- Spanish,
- Italian,
- Swedish,
- Czech,
- Hungarian,
- Dutch,
- Portugese,
- Russian,
- Finnish,
- _LocaleCount
+ English, French, German, Polish, Spanish, Italian, Swedish,
+ Czech, Hungarian, Dutch, Portugese, Russian, 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>;