mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-05 21:11:35 +07:00
Show impassable tile percentage on Map Editor View summary (#9917)
This commit is contained in:
parent
52c0dcfb38
commit
9889bfcd1d
@ -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? =
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user