Item Charges: add Abyssal Bracelet charge tracking (#6184)

Closes #6167
This commit is contained in:
Alexsuperfly
2018-10-26 04:17:34 -04:00
committed by Tomas Slusny
parent feb7876563
commit 5a29622602
4 changed files with 23 additions and 15 deletions

View File

@@ -182,11 +182,22 @@ public interface ItemChargeConfig extends Config
return true; return true;
} }
@ConfigItem(
keyName = "showAbyssalBraceletCharges",
name = "Show Abyssal Bracelet Charges",
description = "Configures if abyssal bracelet item charge is shown",
position = 13
)
default boolean showAbyssalBraceletCharges()
{
return true;
}
@ConfigItem( @ConfigItem(
keyName = "recoilNotification", keyName = "recoilNotification",
name = "Ring of Recoil Notification", name = "Ring of Recoil Notification",
description = "Configures if the ring of recoil breaking notification is shown", description = "Configures if the ring of recoil breaking notification is shown",
position = 13 position = 14
) )
default boolean recoilNotification() default boolean recoilNotification()
{ {

View File

@@ -39,12 +39,7 @@ import net.runelite.api.queries.EquipmentItemQuery;
import net.runelite.api.queries.InventoryWidgetItemQuery; import net.runelite.api.queries.InventoryWidgetItemQuery;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetItem; import net.runelite.api.widgets.WidgetItem;
import static net.runelite.client.plugins.itemcharges.ItemChargeType.FUNGICIDE_SPRAY; import static net.runelite.client.plugins.itemcharges.ItemChargeType.*;
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.BELLOWS;
import net.runelite.client.ui.FontManager; import net.runelite.client.ui.FontManager;
import net.runelite.client.ui.overlay.Overlay; import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer; import net.runelite.client.ui.overlay.OverlayLayer;
@@ -104,7 +99,8 @@ class ItemChargeOverlay extends Overlay
|| (type == IMPBOX && !config.showImpCharges()) || (type == IMPBOX && !config.showImpCharges())
|| (type == WATERCAN && !config.showWateringCanCharges()) || (type == WATERCAN && !config.showWateringCanCharges())
|| (type == WATERSKIN && !config.showWaterskinCharges()) || (type == WATERSKIN && !config.showWaterskinCharges())
|| (type == BELLOWS && !config.showBellowCharges())) || (type == BELLOWS && !config.showBellowCharges())
|| (type == ABYSSAL_BRACELET && !config.showAbyssalBraceletCharges()))
{ {
continue; continue;
} }
@@ -159,6 +155,6 @@ class ItemChargeOverlay extends Overlay
{ {
return config.showTeleportCharges() || config.showDodgyCount() || config.showFungicideCharges() return config.showTeleportCharges() || config.showDodgyCount() || config.showFungicideCharges()
|| config.showImpCharges() || config.showWateringCanCharges() || config.showWaterskinCharges() || config.showImpCharges() || config.showWateringCanCharges() || config.showWaterskinCharges()
|| config.showBellowCharges(); || config.showBellowCharges() || config.showAbyssalBraceletCharges();
} }
} }

View File

@@ -26,6 +26,7 @@ package net.runelite.client.plugins.itemcharges;
enum ItemChargeType enum ItemChargeType
{ {
ABYSSAL_BRACELET,
BELLOWS, BELLOWS,
FUNGICIDE_SPRAY, FUNGICIDE_SPRAY,
IMPBOX, IMPBOX,

View File

@@ -30,17 +30,17 @@ import javax.annotation.Nullable;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import static net.runelite.api.ItemID.*; import static net.runelite.api.ItemID.*;
import static net.runelite.client.plugins.itemcharges.ItemChargeType.FUNGICIDE_SPRAY; import static net.runelite.client.plugins.itemcharges.ItemChargeType.*;
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.BELLOWS;
@AllArgsConstructor @AllArgsConstructor
@Getter @Getter
enum ItemWithCharge enum ItemWithCharge
{ {
ABRACE1(ABYSSAL_BRACELET, ABYSSAL_BRACELET1, 1),
ABRACE2(ABYSSAL_BRACELET, ABYSSAL_BRACELET2, 2),
ABRACE3(ABYSSAL_BRACELET, ABYSSAL_BRACELET3, 3),
ABRACE4(ABYSSAL_BRACELET, ABYSSAL_BRACELET4, 4),
ABRACE5(ABYSSAL_BRACELET, ABYSSAL_BRACELET5, 5),
BELLOWS0(BELLOWS, OGRE_BELLOWS, 0), BELLOWS0(BELLOWS, OGRE_BELLOWS, 0),
BELLOWS1(BELLOWS, OGRE_BELLOWS_1, 1), BELLOWS1(BELLOWS, OGRE_BELLOWS_1, 1),
BELLOWS2(BELLOWS, OGRE_BELLOWS_2, 2), BELLOWS2(BELLOWS, OGRE_BELLOWS_2, 2),