aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/Dataloader.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-11-17 10:19:53 +0100
committer GitHub <noreply@github.com>2023-11-17 10:19:53 +0100
commite76336cd92639f4ec71088fc4c80aea4c25528cd (patch)
treeeeed419a7d97ecb58adf63a17eb9184db3e5ed7a /src/openvic-simulation/dataloader/Dataloader.cpp
parenta00b558a53edb40c9e6789790036f0b618e80ec1 (diff)
parent886b8b8f396438fc2b7da7d2508f2064d14150a8 (diff)
Merge pull request #75 from OpenVicProject/accumulated-changes
Accumulated changes
Diffstat (limited to 'src/openvic-simulation/dataloader/Dataloader.cpp')
-rw-r--r--src/openvic-simulation/dataloader/Dataloader.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp
index d36799f..f86fab6 100644
--- a/src/openvic-simulation/dataloader/Dataloader.cpp
+++ b/src/openvic-simulation/dataloader/Dataloader.cpp
@@ -849,6 +849,10 @@ bool Dataloader::load_defines(GameManager& game_manager) const {
static const std::string religion_file = "common/religion.txt";
static const std::string leader_traits_file = "common/traits.txt";
static const std::string cb_types_file = "common/cb_types.txt";
+ static const std::string crime_modifiers_file = "common/crime.txt";
+ static const std::string event_modifiers_file = "common/event_modifiers.txt";
+ static const std::string static_modifiers_file = "common/static_modifiers.txt";
+ static const std::string triggered_modifiers_file = "common/triggered_modifiers.txt";
bool ret = true;
@@ -860,6 +864,30 @@ bool Dataloader::load_defines(GameManager& game_manager) const {
Logger::error("Failed to set up modifier effects!");
ret = false;
}
+ if (!game_manager.get_modifier_manager().load_crime_modifiers(
+ parse_defines(lookup_file(crime_modifiers_file)).get_file_node()
+ )) {
+ Logger::error("Failed to load crime modifiers!");
+ ret = false;
+ }
+ if (!game_manager.get_modifier_manager().load_event_modifiers(
+ parse_defines(lookup_file(event_modifiers_file)).get_file_node()
+ )) {
+ Logger::error("Failed to load event modifiers!");
+ ret = false;
+ }
+ if (!game_manager.get_modifier_manager().load_static_modifiers(
+ parse_defines(lookup_file(static_modifiers_file)).get_file_node()
+ )) {
+ Logger::error("Failed to load static modifiers!");
+ ret = false;
+ }
+ if (!game_manager.get_modifier_manager().load_triggered_modifiers(
+ parse_defines(lookup_file(triggered_modifiers_file)).get_file_node()
+ )) {
+ Logger::error("Failed to load triggered modifiers!");
+ 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;
@@ -959,7 +987,9 @@ bool Dataloader::load_defines(GameManager& game_manager) const {
Logger::error("Failed to load wargoals!");
ret = false;
}
- if (!game_manager.get_history_manager().load_bookmark_file(parse_defines(lookup_file(bookmark_file)).get_file_node())) {
+ if (!game_manager.get_history_manager().get_bookmark_manager().load_bookmark_file(
+ parse_defines(lookup_file(bookmark_file)).get_file_node()
+ )) {
Logger::error("Failed to load bookmarks!");
ret = false;
}