aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader
diff options
context:
space:
mode:
author CptAlanSmith <123112708+CptAlanSmith@users.noreply.github.com>2023-09-24 20:06:36 +0200
committer GitHub <noreply@github.com>2023-09-24 20:06:36 +0200
commit5b0a02a1bd8caad21caa7d000173270d31df4201 (patch)
tree12d44479a568ece48286b67d6a0d2940495b445e /src/openvic-simulation/dataloader
parent33eeede65f7eede0e89420dbd8d83284ec6de2a7 (diff)
parenteb425a600c03ca02d922a1b20a2815a57104f3cc (diff)
Merge pull request #30 from OpenVicProject/dataloading-production
Implemented ProductionTypes
Diffstat (limited to 'src/openvic-simulation/dataloader')
-rw-r--r--src/openvic-simulation/dataloader/Dataloader.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp
index 4ff190f..6396967 100644
--- a/src/openvic-simulation/dataloader/Dataloader.cpp
+++ b/src/openvic-simulation/dataloader/Dataloader.cpp
@@ -266,6 +266,7 @@ bool Dataloader::load_defines(GameManager& game_manager) const {
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 production_types_file = "common/production_types.txt";
static const fs::path map_directory = "map";
static const fs::path units_directory = "units";
@@ -299,6 +300,12 @@ bool Dataloader::load_defines(GameManager& game_manager) const {
Logger::error("Failed to load issues!");
ret = false;
}
+ if (!game_manager.get_production_type_manager().load_production_types_file(
+ game_manager.get_good_manager(), game_manager.get_pop_manager(),
+ _parse_defines(lookup_file(production_types_file)).get_file_node())) {
+ Logger::error("Failed to load production types!");
+ ret = false;
+ }
if (!_load_units(game_manager, units_directory)) {
Logger::error("Failed to load units!");
ret = false;