27 lines
732 B
Kotlin
27 lines
732 B
Kotlin
package de.pheerai.rcdbquery.dataMappings.type
|
|
|
|
import de.pheerai.rcdbquery.dataMappings.internal.RcdbParamOption
|
|
import de.pheerai.rcdbquery.dataMappings.internal.StringGeneratable
|
|
|
|
public enum class Type(
|
|
override val prettyName: String,
|
|
override val fullName: String,
|
|
override val paramValue: Long
|
|
): RcdbParamOption<Long> {
|
|
STEEL("Steel", 1),
|
|
WOOD("Wood", 2),
|
|
;
|
|
|
|
constructor(name: String, paramValue: Long): this(name, name, paramValue)
|
|
|
|
public companion object: StringGeneratable<Type> {
|
|
override val paramKey: String = "ty"
|
|
|
|
override fun of(input: String): Type? = when(input) {
|
|
"Steel" -> STEEL
|
|
"Wood" -> WOOD
|
|
else -> null
|
|
}
|
|
}
|
|
}
|