aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-01 15:02:15 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-01 15:02:15 +0100
commit9ed29514ac55f613323ee623765b02ddd5d59fdd (patch)
tree6cb54b250966e0dbc0c1fbbc40c669e6f38e41f3 /src/main/java
parent6210bbc52d156b5b8a1557e90744f69de7dbcf7f (diff)
downloadskyhanni-9ed29514ac55f613323ee623765b02ddd5d59fdd.tar.gz
skyhanni-9ed29514ac55f613323ee623765b02ddd5d59fdd.tar.bz2
skyhanni-9ed29514ac55f613323ee623765b02ddd5d59fdd.zip
Code cleanup
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt4
3 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt
index a873854b5..a3bc56396 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.features.event
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.data.HypixelData
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.data.WinterAPI
import at.hannibal2.skyhanni.events.EntityCustomNameUpdateEvent
@@ -79,7 +78,7 @@ object UniqueGiftingOpportunitiesFeatures {
}
private fun isBingo(entity: EntityLivingBase) =
- !HypixelData.bingo && entity.displayName.formattedText.endsWith("Ⓑ§r")
+ !LorenzUtils.isBingoProfile && entity.displayName.formattedText.endsWith("Ⓑ§r")
private fun isIronman(entity: EntityLivingBase) =
!LorenzUtils.noTradeMode && entity.displayName.formattedText.endsWith("♲§r")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt
index cc2a09b9d..2f7be15ec 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt
@@ -206,9 +206,10 @@ enum class DiscordStatus(private val displayMessageSupplier: Supplier<String>?)
var profile = "SkyBlock Level: [$sbLevel] on "
profile += when {
- HypixelData.ironman -> "♲"
- HypixelData.bingo -> "Ⓑ"
- HypixelData.stranded -> "☀"
+
+ LorenzUtils.isIronmanProfile -> "♲"
+ LorenzUtils.isBingoProfile -> "Ⓑ"
+ LorenzUtils.isStrandedProfile -> "☀"
else -> ""
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
index 98b661478..bda72e394 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
@@ -66,10 +66,12 @@ object LorenzUtils {
val noTradeMode get() = HypixelData.noTrade
- val isStrandedProfile get() = HypixelData.stranded
+ val isStrandedProfile get() = inSkyBlock && HypixelData.stranded
val isBingoProfile get() = inSkyBlock && (HypixelData.bingo || TestBingo.testBingo)
+ val isIronmanProfile get() = inSkyBlock && HypixelData.ironman
+
val lastWorldSwitch get() = HypixelData.joinedWorld
// TODO log based on chat category (error, warning, debug, user error, normal)