From caa2f31d536f568e485f15537db5e2f79f7616d5 Mon Sep 17 00:00:00 2001 From: hop311 Date: Mon, 22 Jan 2024 19:17:38 +0000 Subject: Miscellaneous bug fixes and format cleanup --- src/openvic-simulation/GameManager.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/openvic-simulation/GameManager.cpp') diff --git a/src/openvic-simulation/GameManager.cpp b/src/openvic-simulation/GameManager.cpp index 6435f05..a4cb5f4 100644 --- a/src/openvic-simulation/GameManager.cpp +++ b/src/openvic-simulation/GameManager.cpp @@ -195,10 +195,14 @@ bool GameManager::load_hardcoded_defines() { // TODO - explore non-linear scaling to have more variation among non-massive provinces // TODO - when selecting a province, only show the population of provinces controlled (or owned?) // by the same country, relative to the most populous province in that set of provinces - const colour_argb_t::value_type val = colour_argb_t::colour_traits::component_from_fraction( - province.get_total_population(), map.get_highest_province_population() + 1, 0.1f, 1.0f - ); - return colour_argb_t { 0, val, 0, ALPHA_VALUE }; + if (!province.is_water()) { + const colour_argb_t::value_type val = colour_argb_t::colour_traits::component_from_fraction( + province.get_total_population(), map.get_highest_province_population() + 1, 0.1f, 1.0f + ); + return colour_argb_t { 0, val, 0, ALPHA_VALUE }; + } else { + return colour_argb_t::null(); + } } }, { -- cgit v1.2.3-56-ga3b1