aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/GameManager.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-01-22 20:17:38 +0100
committer hop311 <hop3114@gmail.com>2024-01-22 20:25:09 +0100
commitcaa2f31d536f568e485f15537db5e2f79f7616d5 (patch)
tree7cd8a379963af18c24f8dabfe7525b39f2333e0c /src/openvic-simulation/GameManager.cpp
parent8205732a1b95f018f0898a2a4bc62e22f5bee0d3 (diff)
Miscellaneous bug fixes and format cleanupmisc-changes
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();
+ }
}
},
{