aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/apis
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-06-01 23:10:09 +0200
committernea <nea@nea.moe>2023-06-01 23:10:09 +0200
commit7c60db4fbf6b67dc5144436d2387331219128d3c (patch)
tree53eb08b732d802ab76b39a4f650aaf9fc5564a53 /src/main/kotlin/moe/nea/firmament/apis
parent6e3c41fbafd837b891bc01e3baa0424effcdb734 (diff)
downloadFirmament-7c60db4fbf6b67dc5144436d2387331219128d3c.tar.gz
Firmament-7c60db4fbf6b67dc5144436d2387331219128d3c.tar.bz2
Firmament-7c60db4fbf6b67dc5144436d2387331219128d3c.zip
Profile Viewer Skill Page v1
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/apis')
-rw-r--r--src/main/kotlin/moe/nea/firmament/apis/Profiles.kt25
1 files changed, 13 insertions, 12 deletions
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<UUID, Member>,
)
-enum class Skill(val accessor: KProperty1<Member, Double>) {
- 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<Member, Double>, 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")