package ru.dbotthepony.kstarbound.defs.actor.player

import ru.dbotthepony.kommons.io.IntValueCodec
import ru.dbotthepony.kommons.io.StreamCodec
import ru.dbotthepony.kommons.io.map
import ru.dbotthepony.kstarbound.json.builder.IStringSerializable

enum class PlayerGamemode(override val jsonName: String) : IStringSerializable {
	CASUAL("casual"),
	SURVIVAL("survival"),
	HARDCORE("hardcore");

	companion object {
		val CODEC = StreamCodec.Enum(PlayerGamemode::class.java)
		val LEGACY_CODEC = IntValueCodec.map({ entries[this] }, { ordinal })
	}
}
