diff options
author | Hop311 <Hop3114@gmail.com> | 2024-03-20 23:30:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-20 23:30:48 +0100 |
commit | eece77afebf0e4d36b4c9ace3b1044f2c3da50f1 (patch) | |
tree | d5b186facf7c3a08e6ccf2e8261b7de054957a41 /src/openvic-simulation/pop/Pop.cpp | |
parent | 2c892c99a6647be15ef23cabf6cc40f08769283d (diff) | |
parent | 023860d53a90774dcdba84ad7c0dca3c944c9a49 (diff) |
Merge pull request #147 from OpenVicProject/military-units
Military unit instance
Diffstat (limited to 'src/openvic-simulation/pop/Pop.cpp')
-rw-r--r-- | src/openvic-simulation/pop/Pop.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp index 1701321..21aede8 100644 --- a/src/openvic-simulation/pop/Pop.cpp +++ b/src/openvic-simulation/pop/Pop.cpp @@ -1,6 +1,6 @@ #include "Pop.hpp" -#include "openvic-simulation/military/Unit.hpp" +#include "openvic-simulation/military/UnitType.hpp" #include "openvic-simulation/politics/Ideology.hpp" #include "openvic-simulation/politics/Issue.hpp" #include "openvic-simulation/politics/Rebel.hpp" @@ -436,13 +436,13 @@ bool PopManager::load_pop_type_file( return ret; } -bool PopManager::load_delayed_parse_pop_type_data(UnitManager const& unit_manager, IssueManager const& issue_manager) { +bool PopManager::load_delayed_parse_pop_type_data(UnitTypeManager const& unit_type_manager, IssueManager const& issue_manager) { bool ret = true; for (size_t index = 0; index < delayed_parse_nodes.size(); ++index) { const auto [rebel_units, equivalent, promote_to_node, issues_node] = delayed_parse_nodes[index]; PopType* pop_type = pop_types.get_item_by_index(index); - if (rebel_units != nullptr && !unit_manager.expect_unit_decimal_map( + if (rebel_units != nullptr && !unit_type_manager.expect_unit_type_decimal_map( move_variable_callback(pop_type->rebel_units) )(rebel_units)) { Logger::error("Errors parsing rebel unit distribution for pop type ", pop_type, "!"); |