Add counter for fungicide spray #3727

This commit is contained in:
Mitchell Kovacs
2018-06-10 17:19:07 -04:00
committed by Adam
parent 00624a8e13
commit e786ef2478
4 changed files with 31 additions and 4 deletions

View File

@@ -102,11 +102,22 @@ public interface ItemChargeConfig extends Config
return true; return true;
} }
@ConfigItem(
keyName = "showFungicideCharges",
name = "Show Fungicide Charges",
description = "Configures if fungicide item charges is shown",
position = 7
)
default boolean showFungicideCharges()
{
return true;
}
@ConfigItem( @ConfigItem(
keyName = "showWateringCanCharges", keyName = "showWateringCanCharges",
name = "Show Watering Can Charges", name = "Show Watering Can Charges",
description = "Configures if watering can item charge is shown", description = "Configures if watering can item charge is shown",
position = 7 position = 8
) )
default boolean showWateringCanCharges() default boolean showWateringCanCharges()
{ {
@@ -117,7 +128,7 @@ public interface ItemChargeConfig extends Config
keyName = "showWaterskinCharges", keyName = "showWaterskinCharges",
name = "Show Waterskin Charges", name = "Show Waterskin Charges",
description = "Configures if waterskin item charge is shown", description = "Configures if waterskin item charge is shown",
position = 8 position = 9
) )
default boolean showWaterskinCharges() default boolean showWaterskinCharges()
{ {
@@ -128,7 +139,7 @@ public interface ItemChargeConfig extends Config
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 = 9 position = 10
) )
default boolean recoilNotification() default boolean recoilNotification()
{ {

View File

@@ -38,6 +38,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.IMPBOX; 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.TELEPORT;
import static net.runelite.client.plugins.itemcharges.ItemChargeType.WATERCAN; import static net.runelite.client.plugins.itemcharges.ItemChargeType.WATERCAN;
@@ -66,7 +67,8 @@ class ItemChargeOverlay extends Overlay
@Override @Override
public Dimension render(Graphics2D graphics) public Dimension render(Graphics2D graphics)
{ {
if (!config.showTeleportCharges() && !config.showImpCharges() && !config.showWateringCanCharges() && !config.showWaterskinCharges()) if (!config.showTeleportCharges() && !config.showFungicideCharges() && !config.showImpCharges()
&& !config.showWateringCanCharges() && !config.showWaterskinCharges())
{ {
return null; return null;
} }
@@ -83,6 +85,7 @@ class ItemChargeOverlay extends Overlay
ItemChargeType type = chargeItem.getType(); ItemChargeType type = chargeItem.getType();
if ((type == TELEPORT && !config.showTeleportCharges()) if ((type == TELEPORT && !config.showTeleportCharges())
|| (type == FUNGICIDE_SPRAY && !config.showFungicideCharges())
|| (type == IMPBOX && !config.showImpCharges()) || (type == IMPBOX && !config.showImpCharges())
|| (type == WATERCAN && !config.showWateringCanCharges()) || (type == WATERCAN && !config.showWateringCanCharges())
|| (type == WATERSKIN && !config.showWaterskinCharges())) || (type == WATERSKIN && !config.showWaterskinCharges()))

View File

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

View File

@@ -30,6 +30,7 @@ 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.IMPBOX; 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.TELEPORT;
import static net.runelite.client.plugins.itemcharges.ItemChargeType.WATERCAN; import static net.runelite.client.plugins.itemcharges.ItemChargeType.WATERCAN;
@@ -60,6 +61,17 @@ enum ItemWithCharge
ELYRE3(TELEPORT, ENCHANTED_LYRE3, 3), ELYRE3(TELEPORT, ENCHANTED_LYRE3, 3),
ELYRE4(TELEPORT, ENCHANTED_LYRE4, 4), ELYRE4(TELEPORT, ENCHANTED_LYRE4, 4),
ELYRE5(TELEPORT, ENCHANTED_LYRE5, 5), ELYRE5(TELEPORT, ENCHANTED_LYRE5, 5),
FUNGICIDE0(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_0, 0),
FUNGICIDE1(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_1, 1),
FUNGICIDE2(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_2, 2),
FUNGICIDE3(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_3, 3),
FUNGICIDE4(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_4, 4),
FUNGICIDE5(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_5, 5),
FUNGICIDE6(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_6, 6),
FUNGICIDE7(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_7, 7),
FUNGICIDE8(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_8, 8),
FUNGICIDE9(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_9, 9),
FUNGICIDE10(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_10, 10),
GAMES1(TELEPORT, GAMES_NECKLACE1, 1), GAMES1(TELEPORT, GAMES_NECKLACE1, 1),
GAMES2(TELEPORT, GAMES_NECKLACE2, 2), GAMES2(TELEPORT, GAMES_NECKLACE2, 2),
GAMES3(TELEPORT, GAMES_NECKLACE3, 3), GAMES3(TELEPORT, GAMES_NECKLACE3, 3),