From b9c0aaa585a913d5c139c8e5aa7437925b1acfa2 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Thu, 4 Apr 2024 20:31:39 +0200 Subject: Improvement: Anita and SkyMart highlight (#1118) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../rift/everywhere/motes/ShowMotesNpcSellPrice.kt | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift') 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() -- cgit