Refactor Bonus Widget

This commit is contained in:
Patrick
2022-06-23 19:49:16 +04:00
parent 9dd3f3c6b6
commit eac082b05e
2 changed files with 19 additions and 9 deletions

View File

@@ -16,9 +16,6 @@ import java.awt.*;
public class FoundryOverlay3D extends Overlay {
private static final int BONUS_COLOR = 0xfcd703;
private static final int BONUS_WIDGET = 49414148;
private static final int HAND_IN_WIDGET = 49414221;
private static final int FINISH_ANIM = 9457;
@@ -54,15 +51,11 @@ public class FoundryOverlay3D extends Overlay {
return ColorScheme.PROGRESS_ERROR_COLOR;
}
Widget bonusWidget = client.getWidget(BONUS_WIDGET);
if (bonusWidget != null
&& bonusWidget.getChildren() != null
&& bonusWidget.getChildren().length != 0
&& bonusWidget.getChild(0).getTextColor() == BONUS_COLOR) {
if (BonusWidget.isActive(client))
{
return Color.CYAN;
}
int actionsLeft = helper.getActionsLeftInStage();
int heatLeft = helper.getActionsForHeatLevel();
if (actionsLeft <= 1 || heatLeft <= 1)