diff options
author | Hop311 <Hop3114@gmail.com> | 2024-01-03 10:39:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-03 10:39:50 +0100 |
commit | a649ccb74bd6ab0b62d26e870dfd509cc8f92b1d (patch) | |
tree | 5e73f0930d45d789e899601cfcecce094bbba42b /src/openvic-simulation/dataloader/Dataloader.cpp | |
parent | 143a422bc1c27e6d1ebf7e3ead32fff32877797e (diff) | |
parent | e067471f55cd11c6cd86920f9486991d6b552726 (diff) |
Merge pull request #116 from OpenVicProject/rule-rework
Mutually exclusive rule groups + modded building rules
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 b7984de..64d89e8 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() |