From: TheSaminator Date: Mon, 4 Jul 2022 23:03:06 +0000 (-0400) Subject: Fixes to text X-Git-Url: https://gitweb.starshipfights.net/?a=commitdiff_plain;h=e4ae56e15ce473121cf28c2fcdeb70ccfd85d90d;p=starship-fights Fixes to text --- 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