aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/Dataloader.cpp
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2023-12-14 01:35:53 +0100
committer zaaarf <me@zaaarf.foo>2023-12-14 01:35:53 +0100
commitddf75e39df90aedb25c32009211f56396865d28c (patch)
treef487c10ac28b1551edfe80b4891f6d929b6cf030 /src/openvic-simulation/dataloader/Dataloader.cpp
parent34fbe27857d77d6f193d6d1848b953a4596cedd2 (diff)
feat: on_action dataloading
Diffstat (limited to 'src/openvic-simulation/dataloader/Dataloader.cpp')
-rw-r--r--src/openvic-simulation/dataloader/Dataloader.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp
index f49ae2d..8065367 100644
--- a/src/openvic-simulation/dataloader/Dataloader.cpp
+++ b/src/openvic-simulation/dataloader/Dataloader.cpp
@@ -668,6 +668,7 @@ bool Dataloader::load_defines(GameManager& game_manager) const {
static constexpr std::string_view event_modifiers_file = "common/event_modifiers.txt";
static constexpr std::string_view static_modifiers_file = "common/static_modifiers.txt";
static constexpr std::string_view triggered_modifiers_file = "common/triggered_modifiers.txt";
+ static constexpr std::string_view on_actions_file = "common/on_actions.txt";
bool ret = true;
@@ -833,6 +834,12 @@ bool Dataloader::load_defines(GameManager& game_manager) const {
Logger::error("Failed to load events!");
ret = false;
}
+ if (!game_manager.get_event_manager().load_on_action_file(
+ parse_defines(lookup_file(on_actions_file)).get_file_node()
+ )) {
+ Logger::error("Failed to load on actions!");
+ ret = false;
+ }
return ret;
}