mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 15:01:09 -04:00
Fixed rejection reason texts not showing the instance's text - see #6131
This commit is contained in:
parent
bf0a44413f
commit
ea362a448b
@ -97,7 +97,11 @@ class RejectionReasons: HashSet<RejectionReasonInstance>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getMostImportantRejectionReason(): String? {
|
fun getMostImportantRejectionReason(): String? {
|
||||||
return orderOfErrorMessages.firstOrNull { contains(it) }?.errorMessage
|
for (rejectionReason in orderOfErrorMessages) {
|
||||||
|
val rejectionReasonInstance = firstOrNull { it.rejectionReason == rejectionReason }
|
||||||
|
if (rejectionReasonInstance != null) return rejectionReasonInstance.errorMessage
|
||||||
|
}
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used for constant variables in the functions above
|
// Used for constant variables in the functions above
|
||||||
|
Loading…
x
Reference in New Issue
Block a user