aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/Dataloader.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-01-03 01:13:39 +0100
committer hop311 <hop3114@gmail.com>2024-01-03 01:13:39 +0100
commite067471f55cd11c6cd86920f9486991d6b552726 (patch)
treefa0904084e5e6a842e0ca9060155ed7ad30dc9a8 /src/openvic-simulation/dataloader/Dataloader.cpp
parentd893c0ad8c6a0c347dcec72762be49f20886a90a (diff)
Mutually exclusive rule groups + modded building rules
Diffstat (limited to 'src/openvic-simulation/dataloader/Dataloader.cpp')
-rw-r--r--src/openvic-simulation/dataloader/Dataloader.cpp36
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()