mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 10:18:26 +07:00
Resolved #7982 - Misspelling replacement text contains conditionals
This commit is contained in:
@ -458,13 +458,12 @@ class Ruleset {
|
|||||||
val text =
|
val text =
|
||||||
"$name's unique \"${unique.text}\" looks like it may be a misspelling of:\n" +
|
"$name's unique \"${unique.text}\" looks like it may be a misspelling of:\n" +
|
||||||
similarUniques.joinToString("\n") { uniqueType ->
|
similarUniques.joinToString("\n") { uniqueType ->
|
||||||
val deprecationAnnotation =
|
var text = "\"${uniqueType.text}"
|
||||||
UniqueType::class.java.getField(uniqueType.name)
|
if (unique.conditionals.isNotEmpty())
|
||||||
.getAnnotation(Deprecated::class.java)
|
text += " " + unique.conditionals.joinToString(" ") { "<${it.text}>" }
|
||||||
if (deprecationAnnotation == null)
|
text += "\""
|
||||||
"\"${uniqueType.text}\""
|
if (uniqueType.getDeprecationAnnotation() != null) text += " (Deprecated)"
|
||||||
else
|
return@joinToString text
|
||||||
"\"${uniqueType.text}\" (Deprecated)"
|
|
||||||
}.prependIndent("\t")
|
}.prependIndent("\t")
|
||||||
listOf(RulesetError(text, RulesetErrorSeverity.OK))
|
listOf(RulesetError(text, RulesetErrorSeverity.OK))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user