aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/pop/Pop.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-08-10 12:59:31 +0200
committer GitHub <noreply@github.com>2023-08-10 12:59:31 +0200
commit538e7dc4ec44c4d09a6a654f10229e6392653a50 (patch)
tree42bc9cc4a0e33ff1f1a64ae5e23edc4a52ca4320 /src/openvic/pop/Pop.cpp
parent8a08be3e7e8477973e243716d431ad7117acfa43 (diff)
parent170ee25469322d25931050813a779dfbc2eaa4b0 (diff)
Merge pull request #10 from OpenVicProject/distributions
Added distributions for pop type and culture
Diffstat (limited to 'src/openvic/pop/Pop.cpp')
-rw-r--r--src/openvic/pop/Pop.cpp7
1 files changed, 3 insertions, 4 deletions
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!");