4.5.0-patch3

Fixed 'unitsToRemove' error
This commit is contained in:
Yair Morgenstern
2023-02-26 10:13:25 +02:00
parent 8e17c9ed98
commit cff8876ec8
2 changed files with 3 additions and 3 deletions

View File

@ -162,7 +162,7 @@ class Ruleset {
cityStateTypes.putAll(ruleset.cityStateTypes)
ruleset.modOptions.unitsToRemove
.flatMap { unitToRemove ->
units.filter { it.value.matchesFilter(unitToRemove) }.keys
units.filter { it.apply { value.ruleset=this@Ruleset }.value.matchesFilter(unitToRemove) }.keys
}.toSet().forEach {
units.remove(it)
}