mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 13:49:54 +07:00
Fixed preferred victory type ruleset validation - should NOT be invariant! (#11640)
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user