mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 09:48:12 +07:00
3.19.13
This commit is contained in:
@ -11,7 +11,7 @@ import com.unciv.models.stats.Stat
|
||||
// parameterName values should be compliant with autogenerated values in TranslationFileWriter.generateStringsFromJSONs
|
||||
// Eventually we'll merge the translation generation to take this as the source of that
|
||||
@Suppress("unused") // Some are used only via enumerating the enum matching on parameterName
|
||||
enum class UniqueParameterType(val parameterName:String) {
|
||||
enum class UniqueParameterType(var parameterName:String) {
|
||||
Number("amount") {
|
||||
override fun getErrorSeverity(parameterText: String, ruleset: Ruleset):
|
||||
UniqueType.UniqueComplianceErrorSeverity? {
|
||||
@ -369,7 +369,7 @@ enum class UniqueParameterType(val parameterName:String) {
|
||||
"in cities following this religion",
|
||||
)
|
||||
|
||||
fun safeValueOf(param: String) = values().firstOrNull { it.parameterName == param } ?: Unknown
|
||||
fun safeValueOf(param: String) = values().firstOrNull { it.parameterName == param } ?: Unknown.apply { this.parameterName = param }
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user