mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-22 02:07:43 +07: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 =
|
||||
tileResource.name == filter
|
||||
|| tileResource.hasUnique(filter)
|
||||
|| tileResource.resourceType.name + " resource" == filter
|
||||
|| filter.removeSuffix(" resource") == tileResource.resourceType.name
|
||||
if (!hasResourceWithFilter) return false
|
||||
|
||||
// Now that we know that this resource matches the filter - can the observer see that there's a resource here?
|
||||
|
Loading…
Reference in New Issue
Block a user