From 67cbd14630c4344902d3fa1ddca178809da4293b Mon Sep 17 00:00:00 2001 From: hop311 Date: Sun, 21 Jul 2024 14:09:25 +0100 Subject: Fleshing out Country, State and Province instances + history --- src/openvic-simulation/pop/Pop.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/openvic-simulation/pop/Pop.cpp') 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 } } -- cgit v1.2.3-56-ga3b1