mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-23 03:23:17 -04:00
Hopefully solve ghost 'duplicate resource' bug
This commit is contained in:
parent
9ba855d627
commit
427abfa530
@ -25,7 +25,7 @@ class ResourceSupplyList(
|
|||||||
|
|
||||||
/** Fetch a [ResourceSupply] entry or `null` if no match found */
|
/** Fetch a [ResourceSupply] entry or `null` if no match found */
|
||||||
fun get(resource: TileResource, origin: String) =
|
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] */
|
/** Get the total amount for a resource by [resourceName] */
|
||||||
fun sumBy(resourceName: String) =
|
fun sumBy(resourceName: String) =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user