aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2023-11-03 10:23:57 +1100
committerGitHub <noreply@github.com>2023-11-03 00:23:57 +0100
commit3b2b937b9dc78295a183b3772ea8889c9132280c (patch)
tree4daf12a1d8abfe16b38215673255a79e8edd3963 /src/main/java/at
parent379b7ee6e42f758284e6871072cd52149ecb7d34 (diff)
downloadskyhanni-3b2b937b9dc78295a183b3772ea8889c9132280c.tar.gz
skyhanni-3b2b937b9dc78295a183b3772ea8889c9132280c.tar.bz2
skyhanni-3b2b937b9dc78295a183b3772ea8889c9132280c.zip
changed a few .toString to .asString to fix stuff (#678)
changed a few .toString to .asString to fix stuff #678
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt4
3 files changed, 8 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt
index 973d7ac1e..bfe3cb5bb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt
@@ -3,5 +3,5 @@ package at.hannibal2.skyhanni.features.fishing
import at.hannibal2.skyhanni.utils.InventoryUtils
object FishingAPI {
- fun hasFishingRodInHand() = InventoryUtils.itemInHandId.toString().contains("ROD")
-} \ No newline at end of file
+ fun hasFishingRodInHand() = InventoryUtils.itemInHandId.asString().contains("ROD")
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
index d9161c692..17fc083fa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
@@ -21,7 +21,6 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.NEUInternalName
-import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getEnchantments
@@ -174,10 +173,10 @@ class FarmingFortuneDisplay {
return 0.0
}
return if (internalName.startsWith("THEORETICAL_HOE")) {
- listOf(10.0, 25.0, 50.0)[internalName.toString().last().digitToInt() - 1]
- } else when (internalName) {
- "FUNGI_CUTTER".asInternalName() -> 30.0
- "COCO_CHOPPER".asInternalName() -> 20.0
+ listOf(10.0, 25.0, 50.0)[internalName.asString().last().digitToInt() - 1]
+ } else when (internalName.asString()) {
+ "FUNGI_CUTTER" -> 30.0
+ "COCO_CHOPPER" -> 20.0
else -> 0.0
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt
index d21ffebe7..d6aabd3b5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt
@@ -18,9 +18,9 @@ enum class VisitorReward(private val rawInternalName: String) {
private val internalName by lazy { rawInternalName.asInternalName() }
val itemStack by lazy { internalName.getItemStack() }
- val displayName by lazy { itemStack.nameWithEnchantment ?: internalName.toString() }
+ val displayName by lazy { itemStack.nameWithEnchantment ?: internalName.asString() }
companion object {
fun getByInternalName(internalName: NEUInternalName) = entries.firstOrNull { it.internalName == internalName }
}
-} \ No newline at end of file
+}