diff options
Diffstat (limited to 'src/openvic-simulation/dataloader/Dataloader.cpp')
-rw-r--r-- | src/openvic-simulation/dataloader/Dataloader.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp index a09b999..26f3c4c 100644 --- a/src/openvic-simulation/dataloader/Dataloader.cpp +++ b/src/openvic-simulation/dataloader/Dataloader.cpp @@ -780,10 +780,6 @@ bool Dataloader::load_defines(GameManager& game_manager) { Logger::error("Failed to set up modifier effects!"); ret = false; } - if (!game_manager.get_politics_manager().get_rule_manager().setup_rules()) { - Logger::error("Failed to set up rules!"); - ret = false; - } if (!game_manager.get_define_manager().load_defines_file(parse_lua_defines(lookup_file(defines_file)).get_file_node())) { Logger::error("Failed to load defines!"); ret = false; @@ -830,19 +826,6 @@ bool Dataloader::load_defines(GameManager& game_manager) { Logger::error("Failed to load pop types!"); ret = false; } - if (!game_manager.get_politics_manager().load_issues_file( - game_manager.get_modifier_manager(), - parse_defines_cached(lookup_file(issues_file)).get_file_node() - )) { - Logger::error("Failed to load issues and reforms!"); - ret = false; - } - if (!game_manager.get_pop_manager().load_delayed_parse_pop_type_data( - game_manager.get_politics_manager().get_issue_manager() - )) { - Logger::error("Failed to load delayed parse pop type data (promotion and issue weights)!"); - ret = false; - } if (!game_manager.get_economy_manager().load_production_types_file(game_manager.get_pop_manager(), parse_defines_cached(lookup_file(production_types_file)).get_file_node() )) { @@ -862,6 +845,25 @@ bool Dataloader::load_defines(GameManager& game_manager) { if (!_load_technologies(game_manager)) { ret = false; } + if (!game_manager.get_politics_manager().get_rule_manager().setup_rules( + game_manager.get_economy_manager().get_building_type_manager() + )) { + Logger::error("Failed to set up rules!"); + ret = false; + } + if (!game_manager.get_politics_manager().load_issues_file( + game_manager.get_modifier_manager(), + parse_defines_cached(lookup_file(issues_file)).get_file_node() + )) { + Logger::error("Failed to load issues and reforms!"); + ret = false; + } + if (!game_manager.get_pop_manager().load_delayed_parse_pop_type_data( + game_manager.get_politics_manager().get_issue_manager() + )) { + Logger::error("Failed to load delayed parse pop type data (promotion and issue weights)!"); + ret = false; + } if (!game_manager.get_politics_manager().load_national_foci_file( game_manager.get_pop_manager(), game_manager.get_economy_manager().get_good_manager(), game_manager.get_modifier_manager(), parse_defines_cached(lookup_file(national_foci_file)).get_file_node() |