mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 03:53:12 -04:00
memperf: remove instead of adding, so in cases where there's no suffix we don't allocate any memory for no reason
This commit is contained in:
parent
036a2e6e9c
commit
a566bb6bc0
@ -517,7 +517,7 @@ class Tile : IsPartOfGameInfoSerialization, Json.Serializable {
|
|||||||
val hasResourceWithFilter =
|
val hasResourceWithFilter =
|
||||||
tileResource.name == filter
|
tileResource.name == filter
|
||||||
|| tileResource.hasUnique(filter)
|
|| tileResource.hasUnique(filter)
|
||||||
|| tileResource.resourceType.name + " resource" == filter
|
|| filter.removeSuffix(" resource") == tileResource.resourceType.name
|
||||||
if (!hasResourceWithFilter) return false
|
if (!hasResourceWithFilter) return false
|
||||||
|
|
||||||
// Now that we know that this resource matches the filter - can the observer see that there's a resource here?
|
// Now that we know that this resource matches the filter - can the observer see that there's a resource here?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user