From e4ae56e15ce473121cf28c2fcdeb70ccfd85d90d Mon Sep 17 00:00:00 2001 From: TheSaminator Date: Mon, 4 Jul 2022 19:03:06 -0400 Subject: [PATCH] Fixes to text --- .../kotlin/net/starshipfights/campaign/campaign_ui.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/jsMain/kotlin/net/starshipfights/campaign/campaign_ui.kt b/src/jsMain/kotlin/net/starshipfights/campaign/campaign_ui.kt index b8f182c..dcd31db 100644 --- a/src/jsMain/kotlin/net/starshipfights/campaign/campaign_ui.kt +++ b/src/jsMain/kotlin/net/starshipfights/campaign/campaign_ui.kt @@ -230,7 +230,13 @@ object CampaignUI { } val planets = system.bodies.values.filterIsInstance() val habitablePlanets = planets.filter { it.type == PlanetType.TERRESTRIAL } - +" with ${planets.size} planet${if (planets.size == 1) "" else "s"}, ${habitablePlanets.size} of them habitable" + +" with " + if (habitablePlanets.size == planets.size) + "${planets.size} habitable planets" + else if (habitablePlanets.isEmpty()) + +"${planets.size} non-habitable planets" + else + +"${planets.size} planets, ${habitablePlanets.size} of them habitable" } p { style = "text-align:center" @@ -244,7 +250,7 @@ object CampaignUI { } p { style = "text-align:center" - +"${system.totalFleetStrength} fleet strength" + +"${system.totalFleetStrength} fleet strength present" } selectedSystemIndicators[selection.id]?.visible = true -- 2.25.1