Plugin: Add Kharedst's Memoirs to ItemChargePlugin
This commit is contained in:
@@ -42,6 +42,11 @@ import lombok.Getter;
|
||||
@Getter
|
||||
public enum Varbits
|
||||
{
|
||||
/*
|
||||
* Kharedst's Memoirs Teleport Item
|
||||
*/
|
||||
KHAREDSTS_MEMOIRS_CHARGES(6035),
|
||||
|
||||
/*
|
||||
* If chatbox is transparent or not
|
||||
*/
|
||||
|
||||
@@ -483,11 +483,22 @@ public interface ItemChargeConfig extends Config
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showKharedstsMemoirsCharges",
|
||||
name = "Show Kharedst's Memoirs Charges",
|
||||
description = "Configures if Kharedst's Memoirs item charge is shown",
|
||||
position = 27
|
||||
)
|
||||
default boolean showKharedstsMemoirsCharges()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showInfoboxes",
|
||||
name = "Show Infoboxes",
|
||||
description = "Configures whether to show an infobox equipped charge items",
|
||||
position = 27
|
||||
position = 28
|
||||
)
|
||||
default boolean showInfoboxes()
|
||||
{
|
||||
|
||||
@@ -129,6 +129,14 @@ class ItemChargeOverlay extends WidgetItemOverlay
|
||||
}
|
||||
charges = plugin.getChronicle();
|
||||
}
|
||||
else if (itemId == ItemID.KHAREDSTS_MEMOIRS)
|
||||
{
|
||||
if (!plugin.isShowKharedstsMemoirs())
|
||||
{
|
||||
return;
|
||||
}
|
||||
charges = plugin.getKharedstsMemoirs();
|
||||
}
|
||||
else if (itemId >= ItemID.EXPLORERS_RING_1 && itemId <= ItemID.EXPLORERS_RING_4)
|
||||
{
|
||||
if (!plugin.isShowExplorerRingCharges())
|
||||
|
||||
@@ -224,12 +224,16 @@ public class ItemChargePlugin extends Plugin
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean showChronicleCharges;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean showKharedstsMemoirs;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean showXericTalismanCharges;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean showrecoil;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private int chronicle;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private int kharedstsMemoirs;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean showRingOfForgingCount;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private int ringOfForging;
|
||||
@@ -657,6 +661,8 @@ public class ItemChargePlugin extends Plugin
|
||||
lastExplorerRingCharge = explorerRingCharge;
|
||||
updateExplorerRingCharges(explorerRingCharge);
|
||||
}
|
||||
|
||||
this.kharedstsMemoirs = client.getVar(Varbits.KHAREDSTS_MEMOIRS_CHARGES);
|
||||
}
|
||||
|
||||
private void updateDodgyNecklaceCharges(final int value)
|
||||
@@ -940,6 +946,7 @@ public class ItemChargePlugin extends Plugin
|
||||
this.showSoulBearerCharges = config.showSoulBearerCharges();
|
||||
this.soulBearer = config.soulBearer();
|
||||
this.showChronicleCharges = config.showChronicleCharges();
|
||||
this.showKharedstsMemoirs = config.showKharedstsMemoirsCharges();
|
||||
this.showXericTalismanCharges = config.showXericTalismanCharges();
|
||||
this.showrecoil = config.showrecoil();
|
||||
this.chronicle = config.chronicle();
|
||||
|
||||
Reference in New Issue
Block a user