@@ -12,7 +12,6 @@ import net.runelite.client.ui.ColorScheme;
|
|||||||
@ConfigGroup(EasyGiantsFoundryConfig.GROUP)
|
@ConfigGroup(EasyGiantsFoundryConfig.GROUP)
|
||||||
public interface EasyGiantsFoundryConfig extends Config
|
public interface EasyGiantsFoundryConfig extends Config
|
||||||
{
|
{
|
||||||
|
|
||||||
String GROUP = "easygiantsfoundry";
|
String GROUP = "easygiantsfoundry";
|
||||||
String SOUND_ID = "soundID";
|
String SOUND_ID = "soundID";
|
||||||
String POINTS_KEY = "easygiantsfoundrypoints";
|
String POINTS_KEY = "easygiantsfoundrypoints";
|
||||||
@@ -315,11 +314,23 @@ public interface EasyGiantsFoundryConfig extends Config
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "bonusActions",
|
||||||
|
name = "Bonus Actions",
|
||||||
|
description = "Toggle for Bonus actions text",
|
||||||
|
position = 5,
|
||||||
|
section = infoPanelList
|
||||||
|
)
|
||||||
|
default boolean drawBonusActions()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "shopPoints",
|
keyName = "shopPoints",
|
||||||
name = "Reputation",
|
name = "Reputation",
|
||||||
description = "Toggle for reputation text",
|
description = "Toggle for reputation text",
|
||||||
position = 5,
|
position = 6,
|
||||||
section = infoPanelList
|
section = infoPanelList
|
||||||
)
|
)
|
||||||
default boolean drawShopPoints()
|
default boolean drawShopPoints()
|
||||||
@@ -327,7 +338,6 @@ public interface EasyGiantsFoundryConfig extends Config
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ConfigSection(
|
@ConfigSection(
|
||||||
name = "Info Overlay",
|
name = "Info Overlay",
|
||||||
description = "Overlay Text Info On Objects",
|
description = "Overlay Text Info On Objects",
|
||||||
|
|||||||
@@ -383,6 +383,8 @@ public class EasyGiantsFoundryPlugin extends Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
state.addBonusActionReceived();
|
||||||
|
|
||||||
if (config.bonusNotification())
|
if (config.bonusNotification())
|
||||||
{
|
{
|
||||||
notifier.notify("Bonus - Click tool");
|
notifier.notify("Bonus - Click tool");
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ public class EasyGiantsFoundryState
|
|||||||
@Getter
|
@Getter
|
||||||
private boolean enabled;
|
private boolean enabled;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private int bonusActionsReceived = 0;
|
||||||
|
|
||||||
@Setter
|
@Setter
|
||||||
private int smithsOutfitPieces;
|
private int smithsOutfitPieces;
|
||||||
|
|
||||||
@@ -39,6 +42,7 @@ public class EasyGiantsFoundryState
|
|||||||
{
|
{
|
||||||
stages.clear();
|
stages.clear();
|
||||||
heatRangeRatio = 0;
|
heatRangeRatio = 0;
|
||||||
|
bonusActionsReceived = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeatAmount()
|
public int getHeatAmount()
|
||||||
@@ -187,6 +191,21 @@ public class EasyGiantsFoundryState
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getBonusActionsExpected()
|
||||||
|
{
|
||||||
|
if (getStages().size() >= 6)
|
||||||
|
{
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addBonusActionReceived()
|
||||||
|
{
|
||||||
|
++bonusActionsReceived;
|
||||||
|
}
|
||||||
|
|
||||||
public int getCrucibleCount()
|
public int getCrucibleCount()
|
||||||
{
|
{
|
||||||
int bronze = client.getVarbitValue(VARBIT_BRONZE_COUNT);
|
int bronze = client.getVarbitValue(VARBIT_BRONZE_COUNT);
|
||||||
@@ -292,5 +311,4 @@ public class EasyGiantsFoundryState
|
|||||||
}
|
}
|
||||||
|
|
||||||
public HeatActionStateMachine heatingCoolingState = new HeatActionStateMachine();
|
public HeatActionStateMachine heatingCoolingState = new HeatActionStateMachine();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ import static com.toofifty.easygiantsfoundry.EasyGiantsFoundryHelper.getHeatColo
|
|||||||
import com.toofifty.easygiantsfoundry.enums.Heat;
|
import com.toofifty.easygiantsfoundry.enums.Heat;
|
||||||
import com.toofifty.easygiantsfoundry.enums.Stage;
|
import com.toofifty.easygiantsfoundry.enums.Stage;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.client.ui.ColorScheme;
|
||||||
import net.runelite.client.ui.overlay.OverlayPanel;
|
import net.runelite.client.ui.overlay.OverlayPanel;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||||
@@ -38,6 +40,31 @@ public class FoundryOverlay2D extends OverlayPanel
|
|||||||
this.setPosition(OverlayPosition.BOTTOM_LEFT);
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color getBonusActionsColor(int received, int expected)
|
||||||
|
{
|
||||||
|
if (received >= expected)
|
||||||
|
{
|
||||||
|
return ColorScheme.PROGRESS_COMPLETE_COLOR;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ColorScheme.PROGRESS_INPROGRESS_COLOR;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics)
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
@@ -85,6 +112,12 @@ public class FoundryOverlay2D extends OverlayPanel
|
|||||||
LineComponent.builder().left("Heat left").right(heatLeft + "").rightColor(getHeatColor(actionsLeft, heatLeft)).build()
|
LineComponent.builder().left("Heat left").right(heatLeft + "").rightColor(getHeatColor(actionsLeft, heatLeft)).build()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (config.drawBonusActions())
|
||||||
|
{
|
||||||
|
panelComponent.getChildren().add(
|
||||||
|
LineComponent.builder().left("Bonus actions").right(state.getBonusActionsReceived() + "/" + state.getBonusActionsExpected()).rightColor(getBonusActionsColor(state.getBonusActionsReceived(), state.getBonusActionsExpected())).build()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// int points = plugin.getPointsTracker().getShopPoints();
|
// int points = plugin.getPointsTracker().getShopPoints();
|
||||||
|
|||||||
Reference in New Issue
Block a user