summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/rift
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-04-04 20:31:39 +0200
committerGitHub <noreply@github.com>2024-04-04 20:31:39 +0200
commitb9c0aaa585a913d5c139c8e5aa7437925b1acfa2 (patch)
treebf75aeee89d28934a5f5de37da13da4b9c3af765 /src/main/java/at/hannibal2/skyhanni/features/rift
parent704b90b4a25a88cb3ad33fa77a1b9423caaf472d (diff)
downloadskyhanni-b9c0aaa585a913d5c139c8e5aa7437925b1acfa2.tar.gz
skyhanni-b9c0aaa585a913d5c139c8e5aa7437925b1acfa2.tar.bz2
skyhanni-b9c0aaa585a913d5c139c8e5aa7437925b1acfa2.zip
Improvement: Anita and SkyMart highlight (#1118)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
index 98649093d..88269a643 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
@@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.rift.everywhere.motes
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.config.features.rift.motes.RiftInventoryValueConfig.NumberFormatEntry
-import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
@@ -16,18 +15,15 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.ConfigUtils
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
-import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
import at.hannibal2.skyhanni.utils.NumberUtil
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
-import at.hannibal2.skyhanni.utils.RenderUtils.highlight
import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.renderables.Renderable
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
-import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class ShowMotesNpcSellPrice {
@@ -63,20 +59,6 @@ class ShowMotesNpcSellPrice {
processItems()
}
- @SubscribeEvent(priority = EventPriority.LOW)
- fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) {
- if (!isInventoryValueEnabled()) return
- val name = InventoryUtils.openInventoryName()
- if (!name.contains("Rift Storage")) return
- for ((_, indexes) in Renderable.list) {
- for (slot in InventoryUtils.getItemsInOpenChest()) {
- if (indexes.contains(slot.slotIndex)) {
- slot highlight LorenzColor.GREEN
- }
- }
- }
- }
-
@SubscribeEvent
fun onTooltip(event: LorenzToolTipEvent) {
if (!isShowPriceEnabled()) return
@@ -109,7 +91,6 @@ class ShowMotesNpcSellPrice {
itemMap.clear()
slotList.clear()
inInventory = false
- Renderable.list.clear()
}
private fun processItems() {
@@ -165,7 +146,7 @@ class ShowMotesNpcSellPrice {
add("")
add("§6Total value: §d$price coins")
}
- add(Renderable.hoverTips("§6${stack.displayName}: §b$price", tips, indexes = index, stack = stack))
+ add(Renderable.hoverTips("§6${stack.displayName}: §b$price", tips, highlightsOnHoverSlots = index, stack = stack))
})
}
val total = itemMap.values.fold(0.0) { acc, pair -> acc + pair.second }.formatPrice()