aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/history/CountryHistory.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-10-29 23:16:14 +0100
committer hop311 <hop3114@gmail.com>2023-11-07 19:32:43 +0100
commit8a00697a0e6a4168894594eadc373836a1689eea (patch)
treea8af4d6c77764644305be324b32b96b9c272e563 /src/openvic-simulation/history/CountryHistory.cpp
parent61e5c971cd371950a3bd659799208d8143dddd4f (diff)
Country: datatypes + TGC compat changes
Diffstat (limited to 'src/openvic-simulation/history/CountryHistory.cpp')
-rw-r--r--src/openvic-simulation/history/CountryHistory.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/openvic-simulation/history/CountryHistory.cpp b/src/openvic-simulation/history/CountryHistory.cpp
index 2dfc171..d0764be 100644
--- a/src/openvic-simulation/history/CountryHistory.cpp
+++ b/src/openvic-simulation/history/CountryHistory.cpp
@@ -272,7 +272,7 @@ inline bool CountryHistoryManager::_load_country_history_entry(
const std::vector<CountryParty>* parties =
&game_manager.get_country_manager().get_country_by_identifier(name)->get_parties();
for (auto& party : *parties) {
- if (party.get_name() == identifier) {
+ if (party.get_identifier() == identifier) {
if (party.get_start_date() <= date && date <= party.get_end_date()) {
ruling_party = &party;
return true;
@@ -337,9 +337,10 @@ inline bool CountryHistoryManager::_load_country_history_entry(
)(root);
ret &= add_country_history_entry(
- game_manager.get_country_manager().get_country_by_identifier(name), date, primary_culture, std::move(accepted_cultures),
- religion, ruling_party, last_election, std::move(upper_house), capital, government_type, plurality, national_value,
- civilised, prestige, std::move(reforms), initial_oob, updated_accepted_cultures, updated_upper_house, updated_reforms
+ game_manager.get_country_manager().get_country_by_identifier(name), date, primary_culture,
+ std::move(accepted_cultures), religion, ruling_party, last_election, std::move(upper_house), capital, government_type,
+ plurality, national_value, civilised, prestige, std::move(reforms), initial_oob, updated_accepted_cultures,
+ updated_upper_house, updated_reforms
);
return ret;
}