aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/garden
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-03-09 21:49:44 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-03-09 21:49:44 +0100
commit1f03f5d0f1f368f809e009fe62f8631682c70ed6 (patch)
treecef47bc6043111b62517e938872a08ce43b8822e /src/main/java/at/hannibal2/skyhanni/features/garden
parentea8d09297d037807f00b62778f99901060f4e375 (diff)
downloadskyhanni-1f03f5d0f1f368f809e009fe62f8631682c70ed6.tar.gz
skyhanni-1f03f5d0f1f368f809e009fe62f8631682c70ed6.tar.bz2
skyhanni-1f03f5d0f1f368f809e009fe62f8631682c70ed6.zip
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
index a34c7e8c0..979e661b2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
@@ -26,7 +26,6 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.CollectionUtils.sortedDesc
import at.hannibal2.skyhanni.utils.ConfigUtils
import at.hannibal2.skyhanni.utils.InventoryUtils
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.KeyboardManager
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -480,7 +479,7 @@ object ComposterOverlay {
BazaarApi.searchForBazaarItem(itemName, itemsNeeded)
return
}
- val having = InventoryUtils.countItemsInLowerInventory { it.getInternalName() == internalName }
+ val having = InventoryUtils.getAmountOfItemInInventory(internalName)
if (having >= itemsNeeded) {
ChatUtils.chat("$itemName §8x${itemsNeeded} §ealready found in inventory!")
return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
index d63127c87..e051520f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
@@ -541,7 +541,7 @@ class GardenVisitorFeatures {
private fun hasItemsInInventory(visitor: VisitorAPI.Visitor): Boolean {
var ready = true
for ((internalName, required) in visitor.shoppingList) {
- val having = InventoryUtils.countItemsInLowerInventory { it.getInternalName() == internalName }
+ val having = InventoryUtils.getAmountOfItemInInventory(internalName)
if (having < required) {
ready = false
}