Crucible Overlay, Tools action overlay, Lava/waterfall prediction
Added crucible content and alloy quality calculation and overlay Added tools action/heat status overlay Added lava/waterfall action prediction and overlay Added border highlighting
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
package com.toofifty.easygiantsfoundry;
|
||||
|
||||
import static com.toofifty.easygiantsfoundry.EasyGiantsFoundryHelper.getHeatColor;
|
||||
import com.toofifty.easygiantsfoundry.enums.Heat;
|
||||
import com.toofifty.easygiantsfoundry.enums.Stage;
|
||||
import java.awt.Color;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
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;
|
||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||
@@ -21,35 +22,22 @@ public class FoundryOverlay2D extends OverlayPanel
|
||||
private final Client client;
|
||||
private final EasyGiantsFoundryPlugin plugin;
|
||||
private final EasyGiantsFoundryState state;
|
||||
private final EasyGiantsFoundryHelper helper;
|
||||
private final EasyGiantsFoundryConfig config;
|
||||
|
||||
@Inject
|
||||
private FoundryOverlay2D(Client client, EasyGiantsFoundryPlugin plugin, EasyGiantsFoundryState state, EasyGiantsFoundryHelper helper, EasyGiantsFoundryConfig config)
|
||||
private FoundryOverlay2D(
|
||||
Client client,
|
||||
EasyGiantsFoundryPlugin plugin,
|
||||
EasyGiantsFoundryState state,
|
||||
EasyGiantsFoundryConfig config)
|
||||
{
|
||||
this.client = client;
|
||||
this.plugin = plugin;
|
||||
this.state = state;
|
||||
this.helper = helper;
|
||||
this.config = config;
|
||||
this.setPosition(OverlayPosition.BOTTOM_LEFT);
|
||||
}
|
||||
|
||||
private Color getHeatColor(int actions, int heat)
|
||||
{
|
||||
if (heat >= actions)
|
||||
{
|
||||
return ColorScheme.PROGRESS_COMPLETE_COLOR;
|
||||
}
|
||||
|
||||
if (heat > 0)
|
||||
{
|
||||
return ColorScheme.PROGRESS_INPROGRESS_COLOR;
|
||||
}
|
||||
|
||||
return ColorScheme.PROGRESS_ERROR_COLOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
@@ -64,7 +52,8 @@ public class FoundryOverlay2D extends OverlayPanel
|
||||
panelComponent.getChildren().add(TitleComponent.builder().text("Easy Giant's Foundry").build());
|
||||
}
|
||||
|
||||
if (swordPickedUp) {
|
||||
if (swordPickedUp)
|
||||
{
|
||||
Heat heat = state.getCurrentHeat();
|
||||
Stage stage = state.getCurrentStage();
|
||||
|
||||
@@ -81,8 +70,8 @@ public class FoundryOverlay2D extends OverlayPanel
|
||||
);
|
||||
}
|
||||
|
||||
int actionsLeft = helper.getActionsLeftInStage();
|
||||
int heatLeft = helper.getActionsForHeatLevel();
|
||||
int actionsLeft = state.getActionsLeftInStage();
|
||||
int heatLeft = state.getActionsForHeatLevel();
|
||||
|
||||
if (config.drawActionsLeft())
|
||||
{
|
||||
@@ -102,7 +91,7 @@ public class FoundryOverlay2D extends OverlayPanel
|
||||
if (config.drawShopPoints())
|
||||
{
|
||||
panelComponent.getChildren().add(
|
||||
LineComponent.builder().left("Reputation").right(plugin.getReputation() + "").build()
|
||||
LineComponent.builder().left("Reputation").right(plugin.getReputation() + "").build()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user