From 8a00697a0e6a4168894594eadc373836a1689eea Mon Sep 17 00:00:00 2001 From: hop311 Date: Sun, 29 Oct 2023 22:16:14 +0000 Subject: Country: datatypes + TGC compat changes --- src/openvic-simulation/history/CountryHistory.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/openvic-simulation/history/CountryHistory.cpp') 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* 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; } -- cgit v1.2.3-56-ga3b1