aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader
diff options
context:
space:
mode:
author Joel Machens <ajmach6@gmail.com>2023-10-03 04:27:51 +0200
committer Joel Machens <ajmach6@gmail.com>2023-10-03 23:55:48 +0200
commitc7eac74bb550c28be9eb75742f25d974b7742634 (patch)
treed616d3a13da06511614b49853570524da62c5cbe /src/openvic-simulation/dataloader
parentb62e4d1b83f25c4ceb59455f953b6d32514ab726 (diff)
Initial Government Type Loading
Diffstat (limited to 'src/openvic-simulation/dataloader')
-rw-r--r--src/openvic-simulation/dataloader/Dataloader.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp
index 4a98bca..b4b23aa 100644
--- a/src/openvic-simulation/dataloader/Dataloader.cpp
+++ b/src/openvic-simulation/dataloader/Dataloader.cpp
@@ -274,17 +274,19 @@ bool Dataloader::_load_map_dir(GameManager& game_manager, fs::path const& map_di
}
bool Dataloader::load_defines(GameManager& game_manager) const {
- static const fs::path goods_file = "common/goods.txt";
+ static const fs::path map_directory = "map";
static const fs::path pop_type_directory = "poptypes";
- static const fs::path graphical_culture_type_file = "common/graphicalculturetype.txt";
+ static const fs::path units_directory = "units";
+
+ static const fs::path buildings_file = "common/buildings.txt";
static const fs::path culture_file = "common/cultures.txt";
- static const fs::path religion_file = "common/religion.txt";
+ static const fs::path goods_file = "common/goods.txt";
+ static const fs::path governments_file = "common/governments.txt";
+ static const fs::path graphical_culture_type_file = "common/graphicalculturetype.txt";
static const fs::path ideology_file = "common/ideologies.txt";
static const fs::path issues_file = "common/issues.txt";
static const fs::path production_types_file = "common/production_types.txt";
- static const fs::path buildings_file = "common/buildings.txt";
- static const fs::path map_directory = "map";
- static const fs::path units_directory = "units";
+ static const fs::path religion_file = "common/religion.txt";
bool ret = true;
@@ -316,6 +318,10 @@ bool Dataloader::load_defines(GameManager& game_manager) const {
Logger::error("Failed to load ideologies!");
ret = false;
}
+ if (!game_manager.get_government_type_manager().load_government_types_file(_parse_defines(lookup_file(governments_file)).get_file_node())) {
+ Logger::error("Failed to load government types!");
+ ret = false;
+ }
if (!game_manager.get_issue_manager().load_issues_file(_parse_defines(lookup_file(issues_file)).get_file_node())) {
Logger::error("Failed to load issues!");
ret = false;