Always display overlay for title and reputation
This commit is contained in:
@@ -2,6 +2,7 @@ package com.toofifty.easygiantsfoundry;
|
||||
|
||||
import com.toofifty.easygiantsfoundry.enums.Heat;
|
||||
import com.toofifty.easygiantsfoundry.enums.Stage;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.client.ui.ColorScheme;
|
||||
import net.runelite.client.ui.overlay.OverlayPanel;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
@@ -17,14 +18,17 @@ import java.awt.Graphics2D;
|
||||
@Singleton
|
||||
public class FoundryOverlay2D extends OverlayPanel
|
||||
{
|
||||
private static final int REGION_ID = 13491;
|
||||
private final Client client;
|
||||
private final EasyGiantsFoundryPlugin plugin;
|
||||
private final EasyGiantsFoundryState state;
|
||||
private final EasyGiantsFoundryHelper helper;
|
||||
private final EasyGiantsFoundryConfig config;
|
||||
|
||||
@Inject
|
||||
private FoundryOverlay2D(EasyGiantsFoundryPlugin plugin, EasyGiantsFoundryState state, EasyGiantsFoundryHelper helper, EasyGiantsFoundryConfig config)
|
||||
private FoundryOverlay2D(Client client, EasyGiantsFoundryPlugin plugin, EasyGiantsFoundryState state, EasyGiantsFoundryHelper helper, EasyGiantsFoundryConfig config)
|
||||
{
|
||||
this.client = client;
|
||||
this.plugin = plugin;
|
||||
this.state = state;
|
||||
this.helper = helper;
|
||||
@@ -50,18 +54,21 @@ public class FoundryOverlay2D extends OverlayPanel
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
if (!state.isEnabled() || state.getCurrentStage() == null)
|
||||
if (client.getLocalPlayer().getWorldLocation().getRegionID() != REGION_ID)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Heat heat = state.getCurrentHeat();
|
||||
Stage stage = state.getCurrentStage();
|
||||
boolean swordPickedUp = state.isEnabled() && state.getCurrentStage() != null;
|
||||
|
||||
if (config.drawTitle())
|
||||
{
|
||||
panelComponent.getChildren().add(TitleComponent.builder().text("Easy Giant's Foundry").build());
|
||||
}
|
||||
|
||||
if (swordPickedUp) {
|
||||
Heat heat = state.getCurrentHeat();
|
||||
Stage stage = state.getCurrentStage();
|
||||
|
||||
if (config.drawHeatInfo())
|
||||
{
|
||||
panelComponent.getChildren().add(
|
||||
@@ -90,6 +97,7 @@ public class FoundryOverlay2D extends OverlayPanel
|
||||
LineComponent.builder().left("Heat left").right(heatLeft + "").rightColor(getHeatColor(actionsLeft, heatLeft)).build()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
int points = plugin.getPointsTracker().getShopPoints();
|
||||
if (config.drawShopPoints())
|
||||
|
||||
Reference in New Issue
Block a user