Un needed else?
This commit is contained in:
@@ -156,37 +156,34 @@ public class PyramidPlunderOverlay extends Overlay
|
|||||||
|
|
||||||
if (config.showPlunderStatus())
|
if (config.showPlunderStatus())
|
||||||
{
|
{
|
||||||
final Widget widget = client.getWidget(WidgetInfo.PYRAMID_PLUNDER_DATA);
|
final Widget widget = client.getWidget(WidgetInfo.PYRAMID_PLUNDER_DATA);
|
||||||
if (widget == null)
|
if (widget == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleDefaultWidget(config.hideWidget());
|
||||||
|
|
||||||
|
panelComponent.getChildren().clear();
|
||||||
|
|
||||||
|
panelComponent.getChildren().add(TitleComponent.builder()
|
||||||
|
.text("Pyramid Plunder")
|
||||||
|
.build());
|
||||||
|
|
||||||
|
//Calculate time based on current pp timer tick
|
||||||
|
final int currentTick = client.getVar(Varbits.PYRAMID_PLUNDER_TIMER);
|
||||||
|
final double baseTick = (MAX_TICK_COUNT - currentTick) * TICK_LENGTH;
|
||||||
|
final double timeLeft = Math.max(0.0, baseTick);
|
||||||
|
final String timeLeftStr = TIME_LEFT_FORMATTER.format(timeLeft);
|
||||||
|
|
||||||
|
tableComponent.addRow("Time left:", ColorUtil.prependColorTag(timeLeftStr, getColor(currentTick)));
|
||||||
|
tableComponent.addRow("Room:", client.getVar(Varbits.PYRAMID_PLUNDER_ROOM) + "/8");
|
||||||
|
|
||||||
|
panelComponent.getChildren().add(tableComponent);
|
||||||
|
|
||||||
|
return panelComponent.render(graphics);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
toggleDefaultWidget(config.hideWidget());
|
|
||||||
|
|
||||||
panelComponent.getChildren().clear();
|
|
||||||
|
|
||||||
panelComponent.getChildren().add(TitleComponent.builder()
|
|
||||||
.text("Pyramid Plunder")
|
|
||||||
.build());
|
|
||||||
|
|
||||||
//Calculate time based on current pp timer tick
|
|
||||||
final int currentTick = client.getVar(Varbits.PYRAMID_PLUNDER_TIMER);
|
|
||||||
final double baseTick = (MAX_TICK_COUNT - currentTick) * TICK_LENGTH;
|
|
||||||
final double timeLeft = Math.max(0.0, baseTick);
|
|
||||||
final String timeLeftStr = TIME_LEFT_FORMATTER.format(timeLeft);
|
|
||||||
|
|
||||||
tableComponent.addRow("Time left:", ColorUtil.prependColorTag(timeLeftStr, getColor(currentTick)));
|
|
||||||
tableComponent.addRow("Room:", client.getVar(Varbits.PYRAMID_PLUNDER_ROOM) + "/8");
|
|
||||||
|
|
||||||
panelComponent.getChildren().add(tableComponent);
|
|
||||||
|
|
||||||
return panelComponent.render(graphics);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void toggleDefaultWidget(boolean hide)
|
void toggleDefaultWidget(boolean hide)
|
||||||
|
|||||||
Reference in New Issue
Block a user