Default to not show info box anywhere.
Added a red "Open bank" text if you haven't opened the bank yet. Updated the count to only update when itemContainerChanged triggers.
This commit is contained in:
@@ -524,7 +524,7 @@ public interface EasyGiantsFoundryConfig extends Config
|
||||
description = "Where to show the info box",
|
||||
section = totalMetalsInfo
|
||||
)
|
||||
default Location location() { return Location.GIANTS_FOUNDRY; }
|
||||
default Location location() { return Location.NOWHERE; }
|
||||
|
||||
@ConfigItem(
|
||||
position = 2,
|
||||
|
||||
@@ -57,7 +57,12 @@ class EasyGiantsFoundryMetalInfo extends OverlayPanel
|
||||
|| config.location() == Location.NOWHERE)
|
||||
return null;
|
||||
|
||||
CountBars();
|
||||
if (bank == null)
|
||||
panelComponent.getChildren().add(LineComponent.builder()
|
||||
.left("Open bank")
|
||||
.leftColor(Color.RED)
|
||||
.build());
|
||||
|
||||
if (bronzeBars > 0 || config.showZeroValues())
|
||||
AddMetalBarText("Bronze bars:", bronzeBars);
|
||||
if (ironBars > 0 || config.showZeroValues())
|
||||
|
||||
@@ -270,12 +270,15 @@ public class EasyGiantsFoundryPlugin extends Plugin
|
||||
updateSmithsOutfitPieces();
|
||||
}
|
||||
}
|
||||
else if (event.getContainerId() == InventoryID.BANK.getId()) {
|
||||
else {
|
||||
if (event.getContainerId() == InventoryID.BANK.getId()) {
|
||||
metalInfo.bank = event.getItemContainer();
|
||||
}
|
||||
else if (event.getContainerId() == InventoryID.INVENTORY.getId()) {
|
||||
metalInfo.inventory = event.getItemContainer();
|
||||
}
|
||||
metalInfo.CountBars();
|
||||
}
|
||||
}
|
||||
|
||||
public void onMenuEntryAdded(MenuEntryAdded event)
|
||||
|
||||
Reference in New Issue
Block a user