Show impassable tile percentage on Map Editor View summary (#9917)

This commit is contained in:
SomeTroglodyte 2023-08-16 16:59:14 +02:00 committed by GitHub
parent 52c0dcfb38
commit 9889bfcd1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -513,8 +513,7 @@ Starting location(s): [param] =
Continent: [param] ([amount] tiles) =
Resource abundance =
Change map to fit selected ruleset? =
Area: [amount] tiles, [amount2] continents/islands =
Area: [amount] tiles, [amount2]% water, [amount3] continents/islands =
Area: [amount] tiles, [amount2]% water, [amount3]% impassable, [amount4] continents/islands =
Do you want to leave without saving the recent changes? =
Leave =
Do you want to load another map without saving the recent changes? =

View File

@ -42,7 +42,6 @@ import kotlinx.coroutines.Job
//todo normalize properly
//todo Remove "Area: [amount] tiles, [amount2] continents/islands = " after 2022-07-01
//todo functional Tab for Units (empty Tab is prepared but commented out in MapEditorEditTab.AllEditSubTabs)
//todo copy/paste tile areas? (As tool tab, brush sized, floodfill forbidden, tab displays copied area)
//todo Synergy with Civilopedia for drawing loose tiles / terrain icons

View File

@ -95,8 +95,9 @@ class MapEditorViewTab(
val area = tileMap.values.size
val waterPercent = (tileMap.values.count { it.isWater } * 100f / area).toInt()
val impassablePercent = (tileMap.values.count { it.isImpassible() } * 100f / area).toInt()
val continents = tileMap.continentSizes.size
val statsText = "Area: [$area] tiles, [$waterPercent]% water, [$continents] continents/islands"
val statsText = "Area: [$area] tiles, [$waterPercent]% water, [$impassablePercent]% impassable, [$continents] continents/islands"
val statsLabel = WrappableLabel(statsText, labelWidth)
add(statsLabel.apply { wrap = true }).row()