aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-04-15 20:59:47 +0200
committer GitHub <noreply@github.com>2024-04-15 20:59:47 +0200
commita57e81703102bc52297fbdc074da755fa8edbedd (patch)
tree54a0ad26ef3cec9a56644479611e8abaad62b1f7 /src/openvic-simulation/dataloader
parent109d31f147512c8d51f35f9773cd3c6bb1b8b994 (diff)
parent5799836bee29024ce8a2d0fc45e06664c0110751 (diff)
Merge pull request #154 from OpenVicProject/units
Generate starting unit instances
Diffstat (limited to 'src/openvic-simulation/dataloader')
-rw-r--r--src/openvic-simulation/dataloader/Dataloader.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp
index d01f6ff..e13bc23 100644
--- a/src/openvic-simulation/dataloader/Dataloader.cpp
+++ b/src/openvic-simulation/dataloader/Dataloader.cpp
@@ -513,12 +513,14 @@ bool Dataloader::_load_history(GameManager& game_manager, bool unused_history_fi
{
/* Country History */
CountryHistoryManager& country_history_manager = game_manager.get_history_manager().get_country_manager();
+ DeploymentManager& deployment_manager = game_manager.get_military_manager().get_deployment_manager();
static constexpr std::string_view country_history_directory = "history/countries";
const path_vector_t country_history_files =
lookup_basic_indentifier_prefixed_files_in_dir(country_history_directory, ".txt");
country_history_manager.reserve_more_country_histories(country_history_files.size());
+ deployment_manager.reserve_more_deployments(country_history_files.size());
ret &= apply_to_files(
country_history_files,
@@ -541,11 +543,6 @@ bool Dataloader::_load_history(GameManager& game_manager, bool unused_history_fi
);
country_history_manager.lock_country_histories();
- }
-
- {
- DeploymentManager& deployment_manager = game_manager.get_military_manager().get_deployment_manager();
-
deployment_manager.lock_deployments();
if (deployment_manager.get_missing_oob_file_count() > 0) {