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",
|
description = "Where to show the info box",
|
||||||
section = totalMetalsInfo
|
section = totalMetalsInfo
|
||||||
)
|
)
|
||||||
default Location location() { return Location.GIANTS_FOUNDRY; }
|
default Location location() { return Location.NOWHERE; }
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 2,
|
position = 2,
|
||||||
|
|||||||
@@ -57,7 +57,12 @@ class EasyGiantsFoundryMetalInfo extends OverlayPanel
|
|||||||
|| config.location() == Location.NOWHERE)
|
|| config.location() == Location.NOWHERE)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
CountBars();
|
if (bank == null)
|
||||||
|
panelComponent.getChildren().add(LineComponent.builder()
|
||||||
|
.left("Open bank")
|
||||||
|
.leftColor(Color.RED)
|
||||||
|
.build());
|
||||||
|
|
||||||
if (bronzeBars > 0 || config.showZeroValues())
|
if (bronzeBars > 0 || config.showZeroValues())
|
||||||
AddMetalBarText("Bronze bars:", bronzeBars);
|
AddMetalBarText("Bronze bars:", bronzeBars);
|
||||||
if (ironBars > 0 || config.showZeroValues())
|
if (ironBars > 0 || config.showZeroValues())
|
||||||
|
|||||||
@@ -270,12 +270,15 @@ public class EasyGiantsFoundryPlugin extends Plugin
|
|||||||
updateSmithsOutfitPieces();
|
updateSmithsOutfitPieces();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event.getContainerId() == InventoryID.BANK.getId()) {
|
else {
|
||||||
metalInfo.bank = event.getItemContainer();
|
if (event.getContainerId() == InventoryID.BANK.getId()) {
|
||||||
}
|
metalInfo.bank = event.getItemContainer();
|
||||||
else if (event.getContainerId() == InventoryID.INVENTORY.getId()) {
|
}
|
||||||
metalInfo.inventory = event.getItemContainer();
|
else if (event.getContainerId() == InventoryID.INVENTORY.getId()) {
|
||||||
}
|
metalInfo.inventory = event.getItemContainer();
|
||||||
|
}
|
||||||
|
metalInfo.CountBars();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onMenuEntryAdded(MenuEntryAdded event)
|
public void onMenuEntryAdded(MenuEntryAdded event)
|
||||||
|
|||||||
Reference in New Issue
Block a user