diff options
author | BetterBite <38665746+BetterBite@users.noreply.github.com> | 2024-01-31 17:25:35 +0100 |
---|---|---|
committer | BetterBite <38665746+BetterBite@users.noreply.github.com> | 2024-02-15 03:31:39 +0100 |
commit | 28778e57a72ffebbf6053e32db6cb723f1d76670 (patch) | |
tree | c76889161111e5582a099473aa556cb01e7e0c9b /src/openvic-simulation/country/Country.hpp | |
parent | 068c13ede817d17df599ca3481261bf17ed95604 (diff) |
Added country unit colour loading
add skeleton for loading country colours
created load_countries_colours function
removed const for unit colours in Country.hpp
removed some comments
Removed erroneous underscore
Removed todo comment
Diffstat (limited to 'src/openvic-simulation/country/Country.hpp')
-rw-r--r-- | src/openvic-simulation/country/Country.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/openvic-simulation/country/Country.hpp b/src/openvic-simulation/country/Country.hpp index 5f60534..fd6fa7e 100644 --- a/src/openvic-simulation/country/Country.hpp +++ b/src/openvic-simulation/country/Country.hpp @@ -63,11 +63,16 @@ namespace OpenVic { const unit_names_map_t PROPERTY(unit_names); const bool PROPERTY_CUSTOM_PREFIX(dynamic_tag, is); const government_colour_map_t PROPERTY(alternative_colours); + colour_t PROPERTY(primary_unit_colour); + colour_t PROPERTY(secondary_unit_colour); + colour_t PROPERTY(tertiary_unit_colour); + // Unit colours not const due to being added after construction Country( std::string_view new_identifier, colour_t new_colour, GraphicalCultureType const& new_graphical_culture, IdentifierRegistry<CountryParty>&& new_parties, unit_names_map_t&& new_unit_names, bool new_dynamic_tag, - government_colour_map_t&& new_alternative_colours + government_colour_map_t&& new_alternative_colours, + colour_t new_primary_unit_colour, colour_t new_secondary_unit_colour, colour_t new_tertiary_unit_colour ); public: @@ -88,9 +93,12 @@ namespace OpenVic { bool add_country( std::string_view identifier, colour_t colour, GraphicalCultureType const* graphical_culture, IdentifierRegistry<CountryParty>&& parties, Country::unit_names_map_t&& unit_names, bool dynamic_tag, - Country::government_colour_map_t&& alternative_colours + Country::government_colour_map_t&& alternative_colours, + colour_t primary_unit_colour, colour_t secondary_unit_colour, colour_t tertiary_unit_colour ); + bool load_country_colours(ast::NodeCPtr root); + bool load_countries(GameManager const& game_manager, Dataloader const& dataloader, ast::NodeCPtr root); bool load_country_data_file( GameManager const& game_manager, std::string_view name, bool is_dynamic, ast::NodeCPtr root |