aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/GameManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/GameManager.cpp')
-rw-r--r--src/openvic-simulation/GameManager.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/openvic-simulation/GameManager.cpp b/src/openvic-simulation/GameManager.cpp
index cd810ea..2577b54 100644
--- a/src/openvic-simulation/GameManager.cpp
+++ b/src/openvic-simulation/GameManager.cpp
@@ -11,9 +11,15 @@ GameManager::GameManager(
new_clock_state_changed_callback ? std::move(new_clock_state_changed_callback) : []() {}
}, definitions_loaded { false } {}
-bool GameManager::load_definitions(
- Dataloader::path_vector_t const& roots, Dataloader::localisation_callback_t localisation_callback
-) {
+bool GameManager::set_roots(Dataloader::path_vector_t const& roots) {
+ if (!dataloader.set_roots(roots)) {
+ Logger::error("Failed to set dataloader roots!");
+ return false;
+ }
+ return true;
+}
+
+bool GameManager::load_definitions(Dataloader::localisation_callback_t localisation_callback) {
if (definitions_loaded) {
Logger::error("Cannot load definitions - already loaded!");
return false;
@@ -21,11 +27,6 @@ bool GameManager::load_definitions(
bool ret = true;
- if (!dataloader.set_roots(roots)) {
- Logger::error("Failed to set dataloader roots!");
- ret = false;
- }
-
if (!dataloader.load_defines(definition_manager)) {
Logger::error("Failed to load defines!");
ret = false;