aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/pop
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-07-21 15:09:25 +0200
committer hop311 <hop3114@gmail.com>2024-07-22 20:21:27 +0200
commit67cbd14630c4344902d3fa1ddca178809da4293b (patch)
tree9df96829dd0f9a0bd7c2e6b0e047547aa4bff3a7 /src/openvic-simulation/pop
parentd1f3a96b72dd06b5f97dd4643e5f016a02b42ea6 (diff)
Fleshing out Country, State and Province instances + historycountry-instance
Diffstat (limited to 'src/openvic-simulation/pop')
-rw-r--r--src/openvic-simulation/pop/Pop.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp
index 0ecd937..c421de3 100644
--- a/src/openvic-simulation/pop/Pop.cpp
+++ b/src/openvic-simulation/pop/Pop.cpp
@@ -1,6 +1,7 @@
#include "Pop.hpp"
#include "openvic-simulation/country/CountryDefinition.hpp"
+#include "openvic-simulation/country/CountryInstance.hpp"
#include "openvic-simulation/map/ProvinceInstance.hpp"
#include "openvic-simulation/military/UnitType.hpp"
#include "openvic-simulation/politics/Ideology.hpp"
@@ -119,7 +120,9 @@ void Pop::set_location(ProvinceInstance const& new_location) {
// TODO - update location dependent attributes
- votes.set_keys(location->get_owner() != nullptr ? &location->get_owner()->get_parties() : nullptr);
+ votes.set_keys(
+ location->get_owner() != nullptr ? &location->get_owner()->get_country_definition()->get_parties() : nullptr
+ );
// TODO - calculate vote distribution
}
}