Skip to content

Commit

Permalink
spec counter: add defence drain infobox config
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed Jun 16, 2024
1 parent 029d3b6 commit 34f3ce2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ default boolean specDrops()
@ConfigItem(
position = 1,
keyName = "specDropMisses",
name = "Spec Drops Misses",
name = "Spec Drop Misses",
description = "Draws an overlay over the player when a special attack misses"
)
default boolean specDropMisses()
Expand Down Expand Up @@ -89,6 +89,17 @@ default boolean infobox()
return true;
}

@ConfigItem(
position = 3,
keyName = "defenceDrainInfobox",
name = "Show defence drain infobox",
description = "If infoboxes are enabled, adds a defence drain percentage infobox for Dragon warhammer and Elder maul"
)
default boolean defenceDrainInfobox()
{
return true;
}

@ConfigItem(
position = 10,
keyName = "dragonWarhammerThreshold",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ private SpecialWeapon usedSpecialWeapon()

private void updateCounter(SpecialWeapon specialWeapon, String name, int hit, float defenceDrain)
{
if (defenceDrain > 0)
if (defenceDrain > 0 && config.defenceDrainInfobox())
{
if (percentageInfobox == null)
{
Expand Down

0 comments on commit 34f3ce2

Please sign in to comment.