mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Better Resource order in empire overview screen (#2577)
This commit is contained in:
parent
2b3a9c14bf
commit
a940eda4a9
@ -542,8 +542,11 @@ class EmpireOverviewScreen(private val viewingPlayer:CivilizationInfo, private v
|
||||
|
||||
// First row of table has all the icons
|
||||
resourcesTable.add()
|
||||
// Order of source ResourceSupplyList: by tiles, enumerating the map in that spiral pattern
|
||||
// UI should not surprise player, thus we need a deterministic and guessable order
|
||||
val resources = resourceDrilldown.map { it.resource }
|
||||
.filter { it.resourceType!=ResourceType.Bonus }.distinct().sortedBy { it.resourceType }
|
||||
.filter { it.resourceType!=ResourceType.Bonus }.distinct()
|
||||
.sortedWith(compareBy( { it.resourceType }, { it.name.tr() } ))
|
||||
|
||||
var visibleLabel: Label? = null
|
||||
for(resource in resources) {
|
||||
@ -630,4 +633,4 @@ class EmpireOverviewScreen(private val viewingPlayer:CivilizationInfo, private v
|
||||
return civGroup
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user