mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-21 02:13:57 -04:00
Avoid crash from "remove building in this city" uniques when not applied in the context of a city - see #13348
This commit is contained in:
parent
19876c97ed
commit
325b8dcc38
@ -945,7 +945,7 @@ object UniqueTriggerActivation {
|
||||
|
||||
UniqueType.RemoveBuilding -> {
|
||||
val applicableCities =
|
||||
if (unique.params[1] == "in this city") sequenceOf(relevantCity!!)
|
||||
if (unique.params[1] == "in this city") if (relevantCity == null) emptySequence() else sequenceOf(relevantCity!!)
|
||||
else civInfo.cities.asSequence().filter { it.matchesFilter(unique.params[1]) }
|
||||
if (applicableCities.none()) return null
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user