Fixed preferred victory type ruleset validation - should NOT be invariant! (#11640)

This commit is contained in:
Yair Morgenstern
2024-05-23 06:59:15 +03:00
committed by GitHub
parent 4bbeece29e
commit 479bc3ec85

View File

@ -270,6 +270,8 @@ class RulesetValidator(val ruleset: Ruleset) {
uniqueValidator.checkUniques(nation, lines, true, tryFixUnknownUniques)
if (nation.preferredVictoryType != Constants.neutralVictoryType && nation.preferredVictoryType !in ruleset.victories)
lines.add("${nation.name}'s preferredVictoryType is ${nation.preferredVictoryType} which does not exist!", sourceObject = nation)
if (nation.cityStateType != null && nation.cityStateType !in ruleset.cityStateTypes)
lines.add("${nation.name} is of city-state type ${nation.cityStateType} which does not exist!", sourceObject = nation)
if (nation.favoredReligion != null && nation.favoredReligion !in ruleset.religions)
@ -577,9 +579,6 @@ class RulesetValidator(val ruleset: Ruleset) {
lines.add("${nation.name} can settle cities, but has no city names!", sourceObject = nation)
}
if (nation.preferredVictoryType != Constants.neutralVictoryType && nation.preferredVictoryType !in ruleset.victories)
lines.add("${nation.name}'s preferredVictoryType is ${nation.preferredVictoryType} which does not exist!", sourceObject = nation)
// https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast
val constrastRatio = nation.getContrastRatio()
if (constrastRatio < 3) {