Resolved DamageUnitsPlunder's warnings for City parameter and warnings for "Aircraft" - see #6430

This commit is contained in:
Yair Morgenstern 2022-04-19 14:24:01 +03:00
parent bc16a69bd2
commit de1a1ee48a
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,6 @@ import com.unciv.models.ruleset.Ruleset
import com.unciv.models.ruleset.RulesetCache
import com.unciv.models.ruleset.VictoryType
import com.unciv.models.ruleset.tile.ResourceType
import com.unciv.models.ruleset.tile.TerrainType
import com.unciv.models.stats.Stat
import com.unciv.models.translations.TranslationFileWriter // for Kdoc only
@ -106,6 +105,7 @@ enum class UniqueParameterType(
UniqueType.UniqueComplianceErrorSeverity? {
if (parameterText in knownValues) return null
if (ruleset.unitTypes.containsKey(parameterText)) return null
if (ruleset.unitTypes.values.any { it.uniques.contains(parameterText) }) return null
return UniqueType.UniqueComplianceErrorSeverity.WarningOnly
}

View File

@ -463,7 +463,7 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags:
UnitUpgradeCost("[amount]% Gold cost of upgrading", UniqueTarget.Unit, UniqueTarget.Global),
GreatPersonEarnedFaster("[greatPerson] is earned [amount]% faster", UniqueTarget.Unit, UniqueTarget.Global),
DamageUnitsPlunder("Earn [amount]% of the damage done to [mapUnitFilter] units as [plunderableStat]", UniqueTarget.Unit, UniqueTarget.Global),
DamageUnitsPlunder("Earn [amount]% of the damage done to [combatantFilter] units as [plunderableStat]", UniqueTarget.Unit, UniqueTarget.Global),
CaptureCityPlunder("Upon capturing a city, receive [amount] times its [stat] production as [plunderableStat] immediately", UniqueTarget.Unit, UniqueTarget.Global),
KillUnitPlunder("Earn [amount]% of killed [mapUnitFilter] unit's [costOrStrength] as [plunderableStat]", UniqueTarget.Unit, UniqueTarget.Global),
KillUnitPlunderNearCity("Earn [amount]% of [mapUnitFilter] unit's [costOrStrength] as [plunderableStat] when killed within 4 tiles of a city following this religion", UniqueTarget.FollowerBelief),