aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-09-23 00:17:10 +0200
committer GitHub <noreply@github.com>2023-09-23 00:17:10 +0200
commitd7022294d43a0b173de4f060e3260e986f03853d (patch)
tree2e7f7c6919302c66f266a1d4f1c985e8aac6d4a2 /src/openvic-simulation/dataloader
parentd8e91c095251957cbd9daf06e25fe33c405328e3 (diff)
parent6178b71675062b56d1b99b4df3329eeced31cd28 (diff)
Merge pull request #21 from OpenVicProject/dataloading-politics
Dataloading for politics (Ideology & Issue)
Diffstat (limited to 'src/openvic-simulation/dataloader')
-rw-r--r--src/openvic-simulation/dataloader/Dataloader.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp
index a30983b..d0d9506 100644
--- a/src/openvic-simulation/dataloader/Dataloader.cpp
+++ b/src/openvic-simulation/dataloader/Dataloader.cpp
@@ -257,6 +257,8 @@ bool Dataloader::load_defines(GameManager& game_manager) const {
static const fs::path graphical_culture_type_file = "common/graphicalculturetype.txt";
static const fs::path culture_file = "common/cultures.txt";
static const fs::path religion_file = "common/religion.txt";
+ static const fs::path ideology_file = "common/ideologies.txt";
+ static const fs::path issues_file = "common/issues.txt";
static const fs::path map_directory = "map";
bool ret = true;
@@ -281,6 +283,14 @@ bool Dataloader::load_defines(GameManager& game_manager) const {
Logger::error("Failed to load religions!");
ret = false;
}
+ if (!game_manager.ideology_manager.load_ideology_file(_parse_defines(lookup_file(ideology_file)).get_file_node())) {
+ Logger::error("Failed to load ideologies!");
+ ret = false;
+ }
+ if (!game_manager.issue_manager.load_issues_file(_parse_defines(lookup_file(issues_file)).get_file_node())) {
+ Logger::error("Failed to load issues!");
+ ret = false;
+ }
if (!_load_map_dir(game_manager, map_directory)) {
Logger::error("Failed to load map!");
ret = false;