raidsthieving: use interface instead of type
This commit is contained in:
@@ -29,6 +29,7 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import static net.runelite.client.plugins.raidsthieving.BatSolver.SolutionSet.SOLUTION_SETS;
|
||||
|
||||
@@ -37,7 +38,7 @@ public class BatSolver
|
||||
private Map<Integer, Integer> numberOfSolutionsWithPoison;
|
||||
private final SolutionSet solution;
|
||||
|
||||
private final HashSet<Integer> grubsChests;
|
||||
private final Set<Integer> grubsChests;
|
||||
|
||||
public BatSolver(final ThievingRoomType roomType)
|
||||
{
|
||||
@@ -59,9 +60,9 @@ public class BatSolver
|
||||
calculateChanceOfPoison();
|
||||
}
|
||||
|
||||
public TreeSet<Integer> matchSolutions()
|
||||
public Set<Integer> matchSolutions()
|
||||
{
|
||||
TreeSet<Integer> possibleEmptyChests = new TreeSet<>();
|
||||
Set<Integer> possibleEmptyChests = new TreeSet<>();
|
||||
for (SolutionSet knownSolution : SolutionSet.SOLUTION_SETS)
|
||||
{
|
||||
if (knownSolution.getType() == solution.getType() && matchSolution(knownSolution))
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.util.Map;
|
||||
import java.util.TreeSet;
|
||||
import java.util.Set;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import net.runelite.api.Client;
|
||||
@@ -120,7 +120,7 @@ public class ChestOverlay extends Overlay
|
||||
BatSolver solver = plugin.getSolver();
|
||||
if (solver != null && chestId != -1)
|
||||
{
|
||||
TreeSet<Integer> matches = solver.matchSolutions();
|
||||
Set<Integer> matches = solver.matchSolutions();
|
||||
return matches.contains(chestId) || matches.size() == 0;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user