diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java index 2b29cbac07..66c14ea22d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java @@ -216,11 +216,69 @@ public interface ItemChargeConfig extends Config return true; } + @ConfigItem( + keyName = "showAmuletOfChemistryCharges", + name = "Show Amulet of Chemistry Charges", + description = "Configures if amulet of chemistry item charge is shown", + position = 16 + ) + default boolean showAmuletOfChemistryCharges() + { + return true; + } + + @ConfigItem( + keyName = "amuletOfChemistry", + name = "", + description = "", + hidden = true + ) + default int amuletOfChemistry() + { + return -1; + } + + @ConfigItem( + keyName = "amuletOfChemistry", + name = "", + description = "" + ) + void amuletOfChemistry(int amuletOfChemistry); + + @ConfigItem( + keyName = "showAmuletOfBountyCharges", + name = "Show Amulet of Bounty Charges", + description = "Configures if amulet of bounty item charge is shown", + position = 17 + ) + default boolean showAmuletOfBountyCharges() + { + return true; + } + + @ConfigItem( + keyName = "amuletOfBounty", + name = "", + description = "", + hidden = true + ) + default int amuletOfBounty() + { + return -1; + } + + @ConfigItem( + keyName = "amuletOfBounty", + name = "", + description = "" + ) + void amuletOfBounty(int amuletOfBounty); + @ConfigItem( keyName = "recoilNotification", name = "Ring of Recoil Notification", description = "Configures if the ring of recoil breaking notification is shown", - position = 16 + position = 18 ) default boolean recoilNotification() { @@ -231,7 +289,7 @@ public interface ItemChargeConfig extends Config keyName = "showBindingNecklaceCharges", name = "Show Binding Necklace Charges", description = "Configures if binding necklace item charge is shown", - position = 17 + position = 19 ) default boolean showBindingNecklaceCharges() { @@ -260,7 +318,7 @@ public interface ItemChargeConfig extends Config keyName = "bindingNotification", name = "Binding Necklace Notification", description = "Configures if the binding necklace breaking notification is shown", - position = 18 + position = 20 ) default boolean bindingNotification() { @@ -271,7 +329,7 @@ public interface ItemChargeConfig extends Config keyName = "showExplorerRingCharges", name = "Show Explorer's Ring Alch Charges", description = "Configures if explorer's ring alchemy charges are shown", - position = 19 + position = 21 ) default boolean showExplorerRingCharges() { @@ -300,7 +358,7 @@ public interface ItemChargeConfig extends Config keyName = "showRingOfForgingCount", name = "Show Ring of Forging Charges", description = "Configures if the Ring of Forging charge count is shown", - position = 20 + position = 22 ) default boolean showRingOfForgingCount() { @@ -329,7 +387,7 @@ public interface ItemChargeConfig extends Config keyName = "ringOfForgingNotification", name = "Ring of Forging Notification", description = "Configures if the Ring of Forging breaking notification is enabled", - position = 21 + position = 23 ) default boolean ringOfForgingNotification() { @@ -340,7 +398,7 @@ public interface ItemChargeConfig extends Config keyName = "showInfoboxes", name = "Show Infoboxes", description = "Configures whether to show an infobox equipped charge items", - position = 22 + position = 24 ) default boolean showInfoboxes() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeOverlay.java index 4155410692..d23db92cc7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeOverlay.java @@ -31,15 +31,7 @@ import java.awt.Rectangle; import javax.inject.Inject; import net.runelite.api.ItemID; import net.runelite.api.widgets.WidgetItem; -import static net.runelite.client.plugins.itemcharges.ItemChargeType.ABYSSAL_BRACELET; -import static net.runelite.client.plugins.itemcharges.ItemChargeType.BELLOWS; -import static net.runelite.client.plugins.itemcharges.ItemChargeType.FUNGICIDE_SPRAY; -import static net.runelite.client.plugins.itemcharges.ItemChargeType.IMPBOX; -import static net.runelite.client.plugins.itemcharges.ItemChargeType.TELEPORT; -import static net.runelite.client.plugins.itemcharges.ItemChargeType.WATERCAN; -import static net.runelite.client.plugins.itemcharges.ItemChargeType.WATERSKIN; -import static net.runelite.client.plugins.itemcharges.ItemChargeType.FRUIT_BASKET; -import static net.runelite.client.plugins.itemcharges.ItemChargeType.SACK; +import static net.runelite.client.plugins.itemcharges.ItemChargeType.*; import net.runelite.client.ui.FontManager; import net.runelite.client.ui.overlay.WidgetItemOverlay; import net.runelite.client.ui.overlay.components.TextComponent; @@ -105,6 +97,24 @@ class ItemChargeOverlay extends WidgetItemOverlay charges = config.ringOfForging(); } + else if (itemId == ItemID.AMULET_OF_CHEMISTRY) + { + if (!config.showAmuletOfChemistryCharges()) + { + return; + } + + charges = config.amuletOfChemistry(); + } + else if (itemId == ItemID.AMULET_OF_BOUNTY) + { + if (!config.showAmuletOfBountyCharges()) + { + return; + } + + charges = config.amuletOfBounty(); + } else { ItemWithCharge chargeItem = ItemWithCharge.findItem(itemId); @@ -122,7 +132,9 @@ class ItemChargeOverlay extends WidgetItemOverlay || (type == BELLOWS && !config.showBellowCharges()) || (type == FRUIT_BASKET && !config.showBasketCharges()) || (type == SACK && !config.showSackCharges()) - || (type == ABYSSAL_BRACELET && !config.showAbyssalBraceletCharges())) + || (type == ABYSSAL_BRACELET && !config.showAbyssalBraceletCharges()) + || (type == AMULET_OF_CHEMISTRY && !config.showAmuletOfChemistryCharges()) + || (type == AMULET_OF_BOUNTY && !config.showAmuletOfBountyCharges())) { return; } @@ -143,6 +155,8 @@ class ItemChargeOverlay extends WidgetItemOverlay return config.showTeleportCharges() || config.showDodgyCount() || config.showFungicideCharges() || config.showImpCharges() || config.showWateringCanCharges() || config.showWaterskinCharges() || config.showBellowCharges() || config.showBasketCharges() || config.showSackCharges() - || config.showAbyssalBraceletCharges() || config.showExplorerRingCharges() || config.showRingOfForgingCount(); + || config.showAbyssalBraceletCharges() || config.showExplorerRingCharges() || config.showRingOfForgingCount() + || config.showAmuletOfChemistryCharges() || config.showAmuletOfBountyCharges(); + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargePlugin.java index 95bff3d854..854ce32f82 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargePlugin.java @@ -80,11 +80,27 @@ public class ItemChargePlugin extends Plugin "You can smelt ([0-9+]+|one) more pieces? of iron ore before a ring melts\\."); private static final String RING_OF_FORGING_USED_TEXT = "You retrieve a bar of iron."; private static final String RING_OF_FORGING_BREAK_TEXT = "