mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04: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) =
|
Continent: [param] ([amount] tiles) =
|
||||||
Resource abundance =
|
Resource abundance =
|
||||||
Change map to fit selected ruleset? =
|
Change map to fit selected ruleset? =
|
||||||
Area: [amount] tiles, [amount2] continents/islands =
|
Area: [amount] tiles, [amount2]% water, [amount3]% impassable, [amount4] continents/islands =
|
||||||
Area: [amount] tiles, [amount2]% water, [amount3] continents/islands =
|
|
||||||
Do you want to leave without saving the recent changes? =
|
Do you want to leave without saving the recent changes? =
|
||||||
Leave =
|
Leave =
|
||||||
Do you want to load another map without saving the recent changes? =
|
Do you want to load another map without saving the recent changes? =
|
||||||
|
@ -42,7 +42,6 @@ import kotlinx.coroutines.Job
|
|||||||
|
|
||||||
//todo normalize properly
|
//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 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 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
|
//todo Synergy with Civilopedia for drawing loose tiles / terrain icons
|
||||||
|
@ -95,8 +95,9 @@ class MapEditorViewTab(
|
|||||||
|
|
||||||
val area = tileMap.values.size
|
val area = tileMap.values.size
|
||||||
val waterPercent = (tileMap.values.count { it.isWater } * 100f / area).toInt()
|
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 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)
|
val statsLabel = WrappableLabel(statsText, labelWidth)
|
||||||
add(statsLabel.apply { wrap = true }).row()
|
add(statsLabel.apply { wrap = true }).row()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user