From c1b7cab254ac14a173477661047ad2492930ff8b Mon Sep 17 00:00:00 2001 From: hop311 Date: Tue, 31 Oct 2023 01:11:47 +0000 Subject: History loading changes + PROPERTY macro --- src/openvic-simulation/country/Country.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/openvic-simulation/country/Country.hpp') diff --git a/src/openvic-simulation/country/Country.hpp b/src/openvic-simulation/country/Country.hpp index 1ab0e7e..7754a0b 100644 --- a/src/openvic-simulation/country/Country.hpp +++ b/src/openvic-simulation/country/Country.hpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include @@ -64,22 +63,23 @@ namespace OpenVic { /* Not const to allow elements to be moved, otherwise a copy is forced * which causes a compile error as the copy constructor has been deleted. */ - std::vector parties; + IdentifierRegistry parties; const unit_names_map_t unit_names; const bool dynamic_tag; const government_colour_map_t alternative_colours; Country( std::string_view new_identifier, colour_t new_colour, GraphicalCultureType const& new_graphical_culture, - std::vector&& new_parties, unit_names_map_t&& new_unit_names, bool new_dynamic_tag, + IdentifierRegistry&& new_parties, unit_names_map_t&& new_unit_names, bool new_dynamic_tag, government_colour_map_t&& new_alternative_colours ); public: Country(Country&&) = default; + IDENTIFIER_REGISTRY_ACCESSORS_CUSTOM_PLURAL(party, parties) + GraphicalCultureType const& get_graphical_culture() const; - std::vector const& get_parties() const; unit_names_map_t const& get_unit_names() const; bool is_dynamic_tag() const; government_colour_map_t const& get_alternative_colours() const; @@ -90,7 +90,7 @@ namespace OpenVic { IdentifierRegistry countries; NodeTools::node_callback_t load_country_party( - PoliticsManager const& politics_manager, std::vector& country_parties + PoliticsManager const& politics_manager, IdentifierRegistry& country_parties ) const; public: @@ -98,10 +98,10 @@ namespace OpenVic { bool add_country( std::string_view identifier, colour_t colour, GraphicalCultureType const* graphical_culture, - std::vector&& parties, Country::unit_names_map_t&& unit_names, bool dynamic_tag, + IdentifierRegistry&& parties, Country::unit_names_map_t&& unit_names, bool dynamic_tag, Country::government_colour_map_t&& alternative_colours ); - IDENTIFIER_REGISTRY_ACCESSORS_CUSTOM_PLURAL(country, countries); + IDENTIFIER_REGISTRY_ACCESSORS_CUSTOM_PLURAL(country, countries) bool load_countries( GameManager const& game_manager, Dataloader const& dataloader, fs::path const& countries_dir, ast::NodeCPtr root -- cgit v1.2.3-56-ga3b1