package ru.dbotthepony.kstarbound.defs.item

import com.google.gson.stream.JsonWriter
import ru.dbotthepony.kstarbound.json.builder.IStringSerializable

enum class ItemRarity(override val jsonName: String) : IStringSerializable {
	COMMON("Common"),
	UNCOMMON("Uncommon"),
	RARE("Rare"),
	LEGENDARY("Legendary"),
	ESSENTIAL("Essential");

	override fun match(name: String): Boolean {
		return name == this.jsonName || name.lowercase() == this.name.lowercase()
	}
}
