aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-10-02 20:00:31 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-10-02 20:00:31 +0200
commitfdd5bb7acd10c2ab51b76a3ec47a9ac8405021e2 (patch)
treeb77a542f77549bc5e93e4f678264ca833572227d /src/main
parentb45002ecafb9fd212d3c956dcd7b2249d6607a8b (diff)
downloadskyhanni-fdd5bb7acd10c2ab51b76a3ec47a9ac8405021e2.tar.gz
skyhanni-fdd5bb7acd10c2ab51b76a3ec47a9ac8405021e2.tar.bz2
skyhanni-fdd5bb7acd10c2ab51b76a3ec47a9ac8405021e2.zip
code cleanup
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt
index afd5900f7..25ddb8dac 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt
@@ -66,13 +66,13 @@ object BazaarApi {
searchForBazaarItem(internalName.itemNameWithoutColor, amount)
}
- fun searchForBazaarItem(displayName: String, amount: Int = -1) {
+ fun searchForBazaarItem(displayName: String, amount: Int? = null) {
if (!LorenzUtils.inSkyBlock) return
if (NEUItems.neuHasFocus()) return
if (LorenzUtils.noTradeMode) return
if (DungeonAPI.inDungeon() || LorenzUtils.inKuudraFight) return
HypixelCommands.bazaar(displayName.removeColor())
- if (amount != -1) OSUtils.copyToClipboard(amount.toString())
+ amount?.let { OSUtils.copyToClipboard(it.toString()) }
currentSearchedItem = displayName.removeColor()
}
@@ -96,12 +96,12 @@ object BazaarApi {
orderOptionProduct = internalName
} else if (itemName.contains("BUY")) {
// pickup items from bazaar order
- OwnInventoryData.ignoreItem(1.seconds, { it == internalName })
+ OwnInventoryData.ignoreItem(1.seconds) { it == internalName }
}
}
if (InventoryUtils.openInventoryName() == "Order options" && itemName == "§cCancel Order") {
// pickup items from own bazaar order
- OwnInventoryData.ignoreItem(1.seconds, { it == orderOptionProduct })
+ OwnInventoryData.ignoreItem(1.seconds) { it == orderOptionProduct }
}
}
@@ -123,6 +123,7 @@ object BazaarApi {
}
}
+ // TODO cache
@SubscribeEvent
fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) {
if (!LorenzUtils.inSkyBlock) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt
index a177d3fe6..dfd7e38f9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt
@@ -103,7 +103,7 @@ object BazaarCancelledBuyOrderClipboard {
event.blockedReason = "bazaar cancelled buy order clipboard"
val lastClicked = lastClickedItem ?: error("last clicked bz item is null")
- val message = "Bazaar buy order cancelled. Click to reorder. " +
+ val message = "Bazaar buy order cancelled. Click to re-order. " +
"(§8${latestAmount.addSeparators()}x §r${lastClicked.itemName}§e)"
ChatUtils.clickableChat(
message,