aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/GameManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/GameManager.cpp')
-rw-r--r--src/openvic-simulation/GameManager.cpp12
1 files changed, 8 insertions, 4 deletions
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();
+ }
}
},
{