summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-03-06 21:49:08 +0100
committerGitHub <noreply@github.com>2024-03-06 21:49:08 +0100
commitde0f0e888a4c0767c8e8ca911113482a3b1f9d5c (patch)
treeaa390c371a4643ac966f7bd95decb80fe1c08e45 /src/main/java/at/hannibal2/skyhanni/utils
parentfb61f5717ee24829781a3fbe2152a647ef7137ed (diff)
downloadskyhanni-de0f0e888a4c0767c8e8ca911113482a3b1f9d5c.tar.gz
skyhanni-de0f0e888a4c0767c8e8ca911113482a3b1f9d5c.tar.bz2
skyhanni-de0f0e888a4c0767c8e8ca911113482a3b1f9d5c.zip
Renormalize line endings to be \n (#1112)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt110
1 files changed, 55 insertions, 55 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt
index 75412b83f..100d93b19 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt
@@ -1,55 +1,55 @@
-package at.hannibal2.skyhanni.utils
-
-import at.hannibal2.skyhanni.test.command.ErrorManager
-
-// TODO: replace id with ordinal
-enum class LorenzRarity(val color: LorenzColor, val id: Int) {
-
- COMMON(LorenzColor.WHITE, 0),
- UNCOMMON(LorenzColor.GREEN, 1),
- RARE(LorenzColor.BLUE, 2),
- EPIC(LorenzColor.DARK_PURPLE, 3),
- LEGENDARY(LorenzColor.GOLD, 4),
- MYTHIC(LorenzColor.LIGHT_PURPLE, 5),
- DIVINE(LorenzColor.AQUA, 6),
- SUPREME(LorenzColor.DARK_RED, 7),
- SPECIAL(LorenzColor.RED, 8),
- VERY_SPECIAL(LorenzColor.RED, 9),
- ULTIMATE(LorenzColor.DARK_RED, 10),
- ;
-
- val chatColorCode by lazy { color.getChatColor() }
- val rawName = name.replace("_", " ")
-
- fun oneBelow(logError: Boolean = true): LorenzRarity? {
- val rarityBelow = getById(ordinal - 1)
- if (rarityBelow == null && logError) {
- ErrorManager.logErrorStateWithData(
- "Problem with item rarity detected.",
- "Trying to get an item rarity below common",
- "ordinal" to ordinal
- )
- }
- return rarityBelow
- }
-
- fun oneAbove(logError: Boolean = true): LorenzRarity? {
- val rarityBelow = getById(ordinal + 1)
- if (rarityBelow == null && logError) {
- ErrorManager.logErrorStateWithData(
- "Problem with item rarity detected.",
- "Trying to get an item rarity above special",
- "ordinal" to ordinal
- )
- }
- return rarityBelow
- }
-
- fun isAtLeast(other: LorenzRarity): Boolean = this.ordinal >= other.ordinal
-
- companion object {
-
- fun getById(id: Int) = if (entries.size > id) entries[id] else null
- fun getByName(name: String) = entries.firstOrNull { it.name == name }
- }
-}
+package at.hannibal2.skyhanni.utils
+
+import at.hannibal2.skyhanni.test.command.ErrorManager
+
+// TODO: replace id with ordinal
+enum class LorenzRarity(val color: LorenzColor, val id: Int) {
+
+ COMMON(LorenzColor.WHITE, 0),
+ UNCOMMON(LorenzColor.GREEN, 1),
+ RARE(LorenzColor.BLUE, 2),
+ EPIC(LorenzColor.DARK_PURPLE, 3),
+ LEGENDARY(LorenzColor.GOLD, 4),
+ MYTHIC(LorenzColor.LIGHT_PURPLE, 5),
+ DIVINE(LorenzColor.AQUA, 6),
+ SUPREME(LorenzColor.DARK_RED, 7),
+ SPECIAL(LorenzColor.RED, 8),
+ VERY_SPECIAL(LorenzColor.RED, 9),
+ ULTIMATE(LorenzColor.DARK_RED, 10),
+ ;
+
+ val chatColorCode by lazy { color.getChatColor() }
+ val rawName = name.replace("_", " ")
+
+ fun oneBelow(logError: Boolean = true): LorenzRarity? {
+ val rarityBelow = getById(ordinal - 1)
+ if (rarityBelow == null && logError) {
+ ErrorManager.logErrorStateWithData(
+ "Problem with item rarity detected.",
+ "Trying to get an item rarity below common",
+ "ordinal" to ordinal
+ )
+ }
+ return rarityBelow
+ }
+
+ fun oneAbove(logError: Boolean = true): LorenzRarity? {
+ val rarityBelow = getById(ordinal + 1)
+ if (rarityBelow == null && logError) {
+ ErrorManager.logErrorStateWithData(
+ "Problem with item rarity detected.",
+ "Trying to get an item rarity above special",
+ "ordinal" to ordinal
+ )
+ }
+ return rarityBelow
+ }
+
+ fun isAtLeast(other: LorenzRarity): Boolean = this.ordinal >= other.ordinal
+
+ companion object {
+
+ fun getById(id: Int) = if (entries.size > id) entries[id] else null
+ fun getByName(name: String) = entries.firstOrNull { it.name == name }
+ }
+}