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