Fix promotion uniques being ignored if it didn't match a promotion names (#12539)
Some checks failed
Build and test / Check code and run unit tests (push) Failing after 5m42s
Conflict marking / main (push) Failing after 6s
Detekt / detekt (ubuntu-latest) (push) Failing after 19s
Generate mkdocs from docs folder / deploy (push) Failing after 20s
Close stale issues and PRs / stale (push) Successful in 14s
Docker / build (push) Failing after 46s

This commit is contained in:
SeventhM
2024-11-29 04:23:15 -08:00
committed by GitHub
parent 2a8536b60e
commit 4f5d550e7b

View File

@ -588,7 +588,7 @@ class MapUnit : IsPartOfGameInfoSerialization {
else -> {
if (baseUnit.matchesFilter(filter, cache.state, false)) return true
if (civ.matchesFilter(filter, cache.state, false)) return true
if (nonUnitUniquesMap.hasUnique(filter, cache.state))
if (nonUnitUniquesMap.hasUnique(filter, cache.state)) return true
if (promotions.promotions.contains(filter)) return true
// Badly optimized, but it's rare that statuses is even non-empty
// Statuses really should be converted to a hashmap