diff options
author | Hop311 <Hop3114@gmail.com> | 2023-08-10 12:59:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-10 12:59:31 +0200 |
commit | 538e7dc4ec44c4d09a6a654f10229e6392653a50 (patch) | |
tree | 42bc9cc4a0e33ff1f1a64ae5e23edc4a52ca4320 /src/openvic/pop | |
parent | 8a08be3e7e8477973e243716d431ad7117acfa43 (diff) | |
parent | 170ee25469322d25931050813a779dfbc2eaa4b0 (diff) |
Merge pull request #10 from OpenVicProject/distributions
Added distributions for pop type and culture
Diffstat (limited to 'src/openvic/pop')
-rw-r--r-- | src/openvic/pop/Culture.cpp | 3 | ||||
-rw-r--r-- | src/openvic/pop/Culture.hpp | 2 | ||||
-rw-r--r-- | src/openvic/pop/Pop.cpp | 7 | ||||
-rw-r--r-- | src/openvic/pop/Pop.hpp | 2 | ||||
-rw-r--r-- | src/openvic/pop/Religion.cpp | 3 | ||||
-rw-r--r-- | src/openvic/pop/Religion.hpp | 2 |
6 files changed, 8 insertions, 11 deletions
diff --git a/src/openvic/pop/Culture.cpp b/src/openvic/pop/Culture.cpp index 8f72f20..b683804 100644 --- a/src/openvic/pop/Culture.cpp +++ b/src/openvic/pop/Culture.cpp @@ -18,8 +18,7 @@ GraphicalCultureType const& CultureGroup::get_unit_graphical_culture_type() cons Culture::Culture(CultureGroup const& new_group, std::string const& new_identifier, colour_t new_colour, name_list_t const& new_first_names, name_list_t const& new_last_names) : group { new_group }, - HasIdentifier { new_identifier }, - HasColour { new_colour, true }, + HasIdentifierAndColour { new_identifier, new_colour, true }, first_names { new_first_names }, last_names { new_last_names } { } diff --git a/src/openvic/pop/Culture.hpp b/src/openvic/pop/Culture.hpp index 971ef71..657a531 100644 --- a/src/openvic/pop/Culture.hpp +++ b/src/openvic/pop/Culture.hpp @@ -32,7 +32,7 @@ namespace OpenVic { GraphicalCultureType const& get_unit_graphical_culture_type() const; }; - struct Culture : HasIdentifier, HasColour { + struct Culture : HasIdentifierAndColour { friend struct CultureManager; using name_list_t = std::vector<std::string>; diff --git a/src/openvic/pop/Pop.cpp b/src/openvic/pop/Pop.cpp index babcd25..913d31f 100644 --- a/src/openvic/pop/Pop.cpp +++ b/src/openvic/pop/Pop.cpp @@ -35,8 +35,7 @@ PopType::PopType(std::string const& new_identifier, colour_t new_colour, strata_t new_strata, sprite_t new_sprite, Pop::pop_size_t new_max_size, Pop::pop_size_t new_merge_max_size, bool new_state_capital_only, bool new_demote_migrant, bool new_is_artisan, bool new_is_slave) - : HasIdentifier { new_identifier }, - HasColour { new_colour, true }, + : HasIdentifierAndColour { new_identifier, new_colour, true }, strata { new_strata }, sprite { new_sprite }, max_size { new_max_size }, @@ -141,8 +140,8 @@ void PopManager::generate_test_pops(Province& province) const { static PopType const& type_rich = *get_pop_type_by_identifier("test_pop_type_rich"); static Culture const& culture = *culture_manager.get_culture_by_identifier("test_culture"); static Religion const& religion = *religion_manager.get_religion_by_identifier("test_religion"); - province.add_pop({ type_poor, culture, religion, static_cast<Pop::pop_size_t>(province.get_index() * province.get_index() * province.get_index()) * 1000 }); - province.add_pop({ type_middle, culture, religion, static_cast<Pop::pop_size_t>(province.get_index() * province.get_index()) * 1000 }); + province.add_pop({ type_poor, culture, religion, static_cast<Pop::pop_size_t>(province.get_index() * province.get_index()) * 100 }); + province.add_pop({ type_middle, culture, religion, static_cast<Pop::pop_size_t>(province.get_index() * province.get_index()) * 50 }); province.add_pop({ type_rich, culture, religion, static_cast<Pop::pop_size_t>(province.get_index()) * 1000 }); } else { Logger::error("Cannot generate pops before pop types registry is locked!"); diff --git a/src/openvic/pop/Pop.hpp b/src/openvic/pop/Pop.hpp index 626cd8c..628194d 100644 --- a/src/openvic/pop/Pop.hpp +++ b/src/openvic/pop/Pop.hpp @@ -40,7 +40,7 @@ namespace OpenVic { /* REQUIREMENTS: * POP-26 */ - struct PopType : HasIdentifier, HasColour { + struct PopType : HasIdentifierAndColour { friend struct PopManager; using sprite_t = uint8_t; diff --git a/src/openvic/pop/Religion.cpp b/src/openvic/pop/Religion.cpp index a5b2abb..f3d3341 100644 --- a/src/openvic/pop/Religion.cpp +++ b/src/openvic/pop/Religion.cpp @@ -9,8 +9,7 @@ ReligionGroup::ReligionGroup(std::string const& new_identifier) : HasIdentifier Religion::Religion(ReligionGroup const& new_group, std::string const& new_identifier, colour_t new_colour, icon_t new_icon, bool new_pagan) : group { new_group }, - HasIdentifier { new_identifier }, - HasColour { new_colour, true }, + HasIdentifierAndColour { new_identifier, new_colour, true }, icon { new_icon }, pagan { new_pagan } { assert(icon > 0); diff --git a/src/openvic/pop/Religion.hpp b/src/openvic/pop/Religion.hpp index 2a67ce3..e781cf9 100644 --- a/src/openvic/pop/Religion.hpp +++ b/src/openvic/pop/Religion.hpp @@ -16,7 +16,7 @@ namespace OpenVic { ReligionGroup(ReligionGroup&&) = default; }; - struct Religion : HasIdentifier, HasColour { + struct Religion : HasIdentifierAndColour { friend struct ReligionManager; using icon_t = uint8_t; |