aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-09-29 19:41:58 +1000
committerGitHub <noreply@github.com>2024-09-29 11:41:58 +0200
commit8988f7d34d706b909012dceea8bad65b4863ea44 (patch)
treebe907ec20f3cfbd46f0ea314d615a47596e177ba /src/main/java/at/hannibal2/skyhanni/features/misc
parent3569dec0ab32c357eb34cff79c200f379f3d19ce (diff)
downloadskyhanni-8988f7d34d706b909012dceea8bad65b4863ea44.tar.gz
skyhanni-8988f7d34d706b909012dceea8bad65b4863ea44.tar.bz2
skyhanni-8988f7d34d706b909012dceea8bad65b4863ea44.zip
Backend: Detekt Fixes Part 4 (#2610)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt22
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt4
2 files changed, 13 insertions, 13 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt
index f1fad4e63..63d64bbb0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt
@@ -38,19 +38,19 @@ object UserLuckBreakdown {
private lateinit var mainLuckItem: ItemStack
private val mainLuckID = "ENDER_PEARL".asInternalName()
- private val mainLuckName = "§a✴ SkyHanni User Luck"
+ private const val MAIN_LUCK_NAME = "§a✴ SkyHanni User Luck"
private lateinit var fillerItem: ItemStack
private var fillerID = "STAINED_GLASS_PANE".asInternalName()
- private val fillerName = " "
+ private const val FILLER_NAME = " "
private lateinit var limboItem: ItemStack
private var limboID = "ENDER_PEARL".asInternalName()
- private val limboName = "§a✴ Limbo Personal Best"
+ private const val LIMBO_NAME = "§a✴ Limbo Personal Best"
private lateinit var skillsItem: ItemStack
private var skillsID = "DIAMOND_SWORD".asInternalName()
- private val skillsName = "§a✴ Category: Skills"
+ private const val SKILLS_NAME = "§a✴ Category: Skills"
private var showAllStats = true
@@ -63,7 +63,7 @@ object UserLuckBreakdown {
"§7Show all stats: §.(?<toggle>.*)",
)
- private val luckTooltipString = "§5§o §a✴ SkyHanni User Luck §f"
+ private const val LUCK_TOOLTIP = "§5§o §a✴ SkyHanni User Luck §f"
private var inCustomBreakdown = false
private val validItemSlots = (10..53).filter { it !in listOf(17, 18, 26, 27, 35, 36) && it !in 44..53 }
@@ -178,7 +178,7 @@ object UserLuckBreakdown {
if (lastIndex == -1) return
val luckString = tryTruncateFloat(totalLuck)
- event.toolTip.add(lastIndex, "$luckTooltipString$luckString")
+ event.toolTip.add(lastIndex, "$LUCK_TOOLTIP$luckString")
}
private fun statsBreakdownLoreTooltip(event: LorenzToolTipEvent, limboLuck: Float) {
@@ -205,7 +205,7 @@ object UserLuckBreakdown {
if (totalLuck == 0f) return
val luckString = tryTruncateFloat(totalLuck)
- event.toolTip.add(lastIndex, "$luckTooltipString$luckString")
+ event.toolTip.add(lastIndex, "$LUCK_TOOLTIP$luckString")
}
private fun tryTruncateFloat(input: Float): String {
@@ -239,7 +239,7 @@ object UserLuckBreakdown {
private fun createItems() {
fillerItem = ItemUtils.createItemStack(
fillerID.getItemStack().item,
- fillerName,
+ FILLER_NAME,
listOf(),
1,
15,
@@ -251,17 +251,17 @@ object UserLuckBreakdown {
mainLuckItem = ItemUtils.createItemStack(
mainLuckID.getItemStack().item,
- "$mainLuckName §f${tryTruncateFloat(totalLuck)}",
+ "$MAIN_LUCK_NAME §f${tryTruncateFloat(totalLuck)}",
*createItemLore("mainMenu", totalLuck),
)
limboItem = ItemUtils.createItemStack(
limboID.getItemStack().item,
- limboName,
+ LIMBO_NAME,
*createItemLore("limbo", limboLuck),
)
skillsItem = ItemUtils.createItemStack(
skillsID.getItemStack().item,
- skillsName,
+ SKILLS_NAME,
*createItemLore("skills"),
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt
index 1c46b40d6..443f5c80b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt
@@ -43,7 +43,7 @@ object LimboPlaytime {
private val enabled get() = SkyHanniMod.feature.misc.showLimboTimeInPlaytimeDetailed
private val itemID = "ENDER_PEARL".asInternalName()
- private val itemName = "§aLimbo"
+ private const val ITEM_NAME = "§aLimbo"
private lateinit var limboItem: ItemStack
private var lastCreateCooldown = SimpleTimeMark.farPast()
@@ -60,7 +60,7 @@ object LimboPlaytime {
lastCreateCooldown = SimpleTimeMark.now()
limboItem = ItemUtils.createItemStack(
itemID.getItemStack().item,
- itemName,
+ ITEM_NAME,
*createItemLore()
)
}