aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/Dataloader.cpp
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-09-23 22:36:56 +0200
committer zaaarf <zaaarf@proton.me>2023-09-23 22:36:56 +0200
commite27ed35e265f4cb5c9a5a2864364391eaea3e32d (patch)
tree863b552f21dbaf244288d9825966c02f5f6d9561 /src/openvic-simulation/dataloader/Dataloader.cpp
parent33eeede65f7eede0e89420dbd8d83284ec6de2a7 (diff)
feat: implemented ProductionType, implemented (broken) loading for it
Diffstat (limited to 'src/openvic-simulation/dataloader/Dataloader.cpp')
-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;