Merge pull request #860 from Kyleeld/nmz-fix-4-sammich

NMZ total points added as config option
This commit is contained in:
Tyler Bochard
2019-07-02 18:53:20 -04:00
committed by GitHub
2 changed files with 18 additions and 2 deletions

View File

@@ -36,13 +36,24 @@ public interface NightmareZoneConfig extends Config
keyName = "moveoverlay", keyName = "moveoverlay",
name = "Override NMZ overlay", name = "Override NMZ overlay",
description = "Overrides the overlay so it doesn't conflict with other RuneLite plugins", description = "Overrides the overlay so it doesn't conflict with other RuneLite plugins",
position = 1 position = 0
) )
default boolean moveOverlay() default boolean moveOverlay()
{ {
return true; return true;
} }
@ConfigItem(
keyName = "showtotalpoints",
name = "total points NMZ overlay",
description = "shows total points to overlay",
position = 1
)
default boolean showtotalpoints()
{
return false;
}
@ConfigItem( @ConfigItem(
keyName = "powersurgenotification", keyName = "powersurgenotification",
name = "Power surge notification", name = "Power surge notification",

View File

@@ -107,7 +107,12 @@ class NightmareZoneOverlay extends Overlay
TableComponent tableComponent = new TableComponent(); TableComponent tableComponent = new TableComponent();
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT); tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
tableComponent.addRow("Points:", StackFormatter.formatNumber(client.getVar(Varbits.NMZ_POINTS))); tableComponent.addRow("Points:", StackFormatter.formatNumber(client.getVar(Varbits.NMZ_POINTS)));
tableComponent.addRow("Total:", StackFormatter.formatNumber(client.getVar(VarPlayer.NMZ_REWARD_POINTS) + client.getVar(Varbits.NMZ_POINTS)));
if (config.showtotalpoints())
{
tableComponent.addRow("Total:", StackFormatter.formatNumber(client.getVar(VarPlayer.NMZ_REWARD_POINTS) + client.getVar(Varbits.NMZ_POINTS)));
}
panelComponent.getChildren().add(tableComponent); panelComponent.getChildren().add(tableComponent);
return panelComponent.render(graphics); return panelComponent.render(graphics);