diff options
author | Hop311 <Hop3114@gmail.com> | 2024-07-23 19:47:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-23 19:47:47 +0200 |
commit | 6cd55c452d1643666ff4169a89402fd3e3b66c61 (patch) | |
tree | 888b847a54c66b6e9d1b2f7ee3e3d0f8071eceda /src/openvic-simulation/pop/Pop.cpp | |
parent | 9d57ca273e4b32ab82a51789ec58e08fefb5276a (diff) | |
parent | 67cbd14630c4344902d3fa1ddca178809da4293b (diff) |
Merge pull request #177 from OpenVicProject/country-instance
Fleshing out Country, State and Province instances + history
Diffstat (limited to 'src/openvic-simulation/pop/Pop.cpp')
-rw-r--r-- | src/openvic-simulation/pop/Pop.cpp | 5 |
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 } } |