From e27ed35e265f4cb5c9a5a2864364391eaea3e32d Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sat, 23 Sep 2023 22:36:56 +0200 Subject: feat: implemented ProductionType, implemented (broken) loading for it --- src/openvic-simulation/dataloader/Dataloader.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/openvic-simulation/dataloader') 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; -- cgit v1.2.3-56-ga3b1