From 7c60db4fbf6b67dc5144436d2387331219128d3c Mon Sep 17 00:00:00 2001 From: nea Date: Thu, 1 Jun 2023 23:10:09 +0200 Subject: Profile Viewer Skill Page v1 --- src/main/kotlin/moe/nea/firmament/apis/Profiles.kt | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/main/kotlin/moe/nea/firmament/apis/Profiles.kt') diff --git a/src/main/kotlin/moe/nea/firmament/apis/Profiles.kt b/src/main/kotlin/moe/nea/firmament/apis/Profiles.kt index c9286fc..b05d2fc 100644 --- a/src/main/kotlin/moe/nea/firmament/apis/Profiles.kt +++ b/src/main/kotlin/moe/nea/firmament/apis/Profiles.kt @@ -10,6 +10,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.UseSerializers import kotlin.reflect.KProperty1 +import net.minecraft.util.DyeColor import moe.nea.firmament.util.json.DashlessUUIDSerializer import moe.nea.firmament.util.json.InstantAsLongSerializer @@ -30,18 +31,18 @@ data class Profile( val members: Map, ) -enum class Skill(val accessor: KProperty1) { - FARMING(Member::experienceSkillFarming), - FORAGING(Member::experienceSkillForaging), - MINING(Member::experienceSkillMining), - ALCHEMY(Member::experienceSkillAlchemy), - TAMING(Member::experienceSkillTaming), - FISHING(Member::experienceSkillFishing), - RUNECRAFTING(Member::experienceSkillRunecrafting), - CARPENTRY(Member::experienceSkillCarpentry), - COMBAT(Member::experienceSkillCombat), - SOCIAL(Member::experienceSkillSocial), - ENCHANTING(Member::experienceSkillEnchanting), +enum class Skill(val accessor: KProperty1, val color: DyeColor) { + FARMING(Member::experienceSkillFarming, DyeColor.YELLOW), + FORAGING(Member::experienceSkillForaging, DyeColor.BROWN), + MINING(Member::experienceSkillMining, DyeColor.LIGHT_GRAY), + ALCHEMY(Member::experienceSkillAlchemy, DyeColor.PURPLE), + TAMING(Member::experienceSkillTaming, DyeColor.GREEN), + FISHING(Member::experienceSkillFishing, DyeColor.BLUE), + RUNECRAFTING(Member::experienceSkillRunecrafting, DyeColor.PINK), + CARPENTRY(Member::experienceSkillCarpentry, DyeColor.ORANGE), + COMBAT(Member::experienceSkillCombat, DyeColor.RED), + SOCIAL(Member::experienceSkillSocial, DyeColor.WHITE), + ENCHANTING(Member::experienceSkillEnchanting, DyeColor.MAGENTA), ; fun getMaximumLevel(leveling: Leveling) = leveling.maximumLevels[name.lowercase()] ?: TODO("Repo error") -- cgit