Skip to content

Commit

Permalink
Empty array check changes in DetailedQuestStep
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoinkwiz committed Sep 24, 2023
1 parent 6017adc commit c3fb2f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/com/questhelper/steps/DetailedQuestStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public DetailedQuestStep(QuestHelper questHelper, String text, Requirement... re
this.requirements.addAll(Arrays.asList(requirements));
}

public DetailedQuestStep(QuestHelper questHelper, String text, List<ItemRequirement> requirements)
public DetailedQuestStep(QuestHelper questHelper, String text, List<Requirement> requirements)
{
super(questHelper, text);
this.requirements.addAll(requirements);
Expand Down Expand Up @@ -234,7 +234,7 @@ public void setRecommended(List<Requirement> newRecommended)

public void addTeleport(Requirement newTeleport)
{
teleport.add(newTeleport);
teleport.add(newTeleport);
}

@Subscribe
Expand Down Expand Up @@ -497,12 +497,12 @@ public void makeOverlayHint(PanelComponent panelComponent, QuestHelperPlugin plu
return;
}

if (!requirements.isEmpty() || additionalRequirements.size() > 0)
if (!requirements.isEmpty() || !additionalRequirements.isEmpty())
{
panelComponent.getChildren().add(LineComponent.builder().left("Requirements:").build());
}
Stream<Requirement> stream = requirements.stream();
if (additionalRequirements.size() > 0)
if (!additionalRequirements.isEmpty())
{
stream = Stream.concat(stream, additionalRequirements.stream());
}
Expand Down Expand Up @@ -550,7 +550,7 @@ private void renderInventory(Graphics2D graphics)

WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation();
WorldPoint goalWp = QuestPerspective.getInstanceWorldPointFromReal(client, worldPoint);
if (goalWp == null || playerLocation.distanceTo(goalWp) > 30)
if (goalWp == null || playerLocation.distanceTo(goalWp) > 100)
{
for (Requirement requirement : teleport)
{
Expand Down

0 comments on commit c3fb2f3

Please sign in to comment.