bank value plugin: add option to display exact value

This commit is contained in:
Magic fTail
2018-07-19 17:05:03 +02:00
committed by Adam
parent 7a0ed04005
commit fd09843bb6
2 changed files with 37 additions and 4 deletions

View File

@@ -92,12 +92,30 @@ class BankTitle
if (config.showGE() && gePrice != 0)
{
strCurrentTab += " (EX: " + StackFormatter.quantityToStackSize(gePrice) + ")";
strCurrentTab += " (EX: ";
if (config.showExact())
{
strCurrentTab += StackFormatter.formatNumber(gePrice) + ")";
}
else
{
strCurrentTab += StackFormatter.quantityToStackSize(gePrice) + ")";
}
}
if (config.showHA() && haPrice != 0)
{
strCurrentTab += " (HA: " + StackFormatter.quantityToStackSize(haPrice) + ")";
strCurrentTab += " (HA: ";
if (config.showExact())
{
strCurrentTab += StackFormatter.formatNumber(haPrice) + ")";
}
else
{
strCurrentTab += StackFormatter.quantityToStackSize(haPrice) + ")";
}
}
log.debug("Setting bank title: {}", bankTitle + strCurrentTab);

View File

@@ -35,7 +35,9 @@ public interface BankValueConfig extends Config
@ConfigItem(
keyName = "showGE",
name = "Show Grand Exchange price",
description = "Show grand exchange price total (GE)")
description = "Show grand exchange price total (GE)",
position = 1
)
default boolean showGE()
{
return true;
@@ -44,9 +46,22 @@ public interface BankValueConfig extends Config
@ConfigItem(
keyName = "showHA",
name = "Show high alchemy price",
description = "Show high alchemy price total (HA)")
description = "Show high alchemy price total (HA)",
position = 2
)
default boolean showHA()
{
return false;
}
@ConfigItem(
keyName = "showExact",
name = "Show exact bank value",
description = "Show exact bank value",
position = 3
)
default boolean showExact()
{
return false;
}
}