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 PlayerBusyState(override val jsonName: String) : IStringSerializable {
	NONE("none"),
	CHATTING("chatting"),
	MENU("menu");

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