aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/pop/Pop.cpp
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2024-02-12 12:15:04 +0100
committer zaaarf <me@zaaarf.foo>2024-03-16 14:01:15 +0100
commit023860d53a90774dcdba84ad7c0dca3c944c9a49 (patch)
treed5b186facf7c3a08e6ccf2e8261b7de054957a41 /src/openvic-simulation/pop/Pop.cpp
parent2c892c99a6647be15ef23cabf6cc40f08769283d (diff)
feat: unit instance type definition, renamed existing structs for consistencymilitary-units
Diffstat (limited to 'src/openvic-simulation/pop/Pop.cpp')
-rw-r--r--src/openvic-simulation/pop/Pop.cpp6
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, "!");