mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 19:08:48 -04:00
.
This commit is contained in:
parent
f872150da4
commit
7a35388e7a
@ -25,7 +25,7 @@ class ResourceSupplyList(
|
||||
|
||||
/** Fetch a [ResourceSupply] entry or `null` if no match found */
|
||||
fun get(resource: TileResource, origin: String) =
|
||||
firstOrNull { it.resource == resource && it.origin == origin }
|
||||
firstOrNull { it.resource.name == resource.name && it.origin == origin }
|
||||
|
||||
/** Get the total amount for a resource by [resourceName] */
|
||||
fun sumBy(resourceName: String) =
|
||||
|
@ -57,7 +57,7 @@ class ResourcesOverviewTab(
|
||||
|
||||
private val resourceDrilldown: ResourceSupplyList = viewingPlayer.detailedCivResources
|
||||
private val extraDrilldown: ResourceSupplyList = getExtraDrilldown()
|
||||
private val allResources = ResourceSupplyList().apply { addAll(resourceDrilldown.asSequence() + extraDrilldown.asSequence()) }
|
||||
private val allResources = ResourceSupplyList().apply { add(resourceDrilldown); add(extraDrilldown) }
|
||||
|
||||
// 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user