agility plugin: Reduce visibility of classes
Ref: runelite/runelite#3911
This commit is contained in:
@@ -33,9 +33,9 @@ import net.runelite.client.plugins.Plugin;
|
|||||||
import net.runelite.client.ui.overlay.infobox.Timer;
|
import net.runelite.client.ui.overlay.infobox.Timer;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class AgilityArenaTimer extends Timer
|
class AgilityArenaTimer extends Timer
|
||||||
{
|
{
|
||||||
public AgilityArenaTimer(Plugin plugin)
|
AgilityArenaTimer(Plugin plugin)
|
||||||
{
|
{
|
||||||
super(1, ChronoUnit.MINUTES, getTicketImage(), plugin);
|
super(1, ChronoUnit.MINUTES, getTicketImage(), plugin);
|
||||||
setTooltip("Time left until location changes");
|
setTooltip("Time left until location changes");
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import net.runelite.client.ui.overlay.OverlayLayer;
|
|||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
|
|
||||||
public class AgilityOverlay extends Overlay
|
class AgilityOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private static final int MAX_DISTANCE = 2350;
|
private static final int MAX_DISTANCE = 2350;
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ public class AgilityOverlay extends Overlay
|
|||||||
private final AgilityConfig config;
|
private final AgilityConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public AgilityOverlay(Client client, AgilityPlugin plugin, AgilityConfig config)
|
private AgilityOverlay(Client client, AgilityPlugin plugin, AgilityConfig config)
|
||||||
{
|
{
|
||||||
setPosition(OverlayPosition.DYNAMIC);
|
setPosition(OverlayPosition.DYNAMIC);
|
||||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||||
|
|||||||
@@ -33,19 +33,19 @@ import net.runelite.api.Skill;
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class AgilitySession
|
class AgilitySession
|
||||||
{
|
{
|
||||||
private final Courses course;
|
private final Courses course;
|
||||||
private Instant lastLapCompleted;
|
private Instant lastLapCompleted;
|
||||||
private int totalLaps;
|
private int totalLaps;
|
||||||
private int lapsTillLevel;
|
private int lapsTillLevel;
|
||||||
|
|
||||||
public AgilitySession(Courses course)
|
AgilitySession(Courses course)
|
||||||
{
|
{
|
||||||
this.course = course;
|
this.course = course;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void incrementLapCount(Client client)
|
void incrementLapCount(Client client)
|
||||||
{
|
{
|
||||||
lastLapCompleted = Instant.now();
|
lastLapCompleted = Instant.now();
|
||||||
++totalLaps;
|
++totalLaps;
|
||||||
@@ -63,7 +63,7 @@ public class AgilitySession
|
|||||||
lapsTillLevel = remainingXp > 0 ? (int) Math.ceil(remainingXp / course.getTotalXp()) : 0;
|
lapsTillLevel = remainingXp > 0 ? (int) Math.ceil(remainingXp / course.getTotalXp()) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetLapCount()
|
void resetLapCount()
|
||||||
{
|
{
|
||||||
totalLaps = 0;
|
totalLaps = 0;
|
||||||
lapsTillLevel = 0;
|
lapsTillLevel = 0;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import java.util.Map;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
|
|
||||||
public enum Courses
|
enum Courses
|
||||||
{
|
{
|
||||||
GNOME(86.5, 46, 9781),
|
GNOME(86.5, 46, 9781),
|
||||||
DRAYNOR(120.0, 79, 12338),
|
DRAYNOR(120.0, 79, 12338),
|
||||||
@@ -77,7 +77,7 @@ public enum Courses
|
|||||||
this.courseEndWorldPoints = courseEndWorldPoints;
|
this.courseEndWorldPoints = courseEndWorldPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Courses getCourse(int regionId)
|
static Courses getCourse(int regionId)
|
||||||
{
|
{
|
||||||
return coursesByRegion.get(regionId);
|
return coursesByRegion.get(regionId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import net.runelite.client.ui.overlay.OverlayPriority;
|
|||||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
|
|
||||||
public class LapCounterOverlay extends Overlay
|
class LapCounterOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private final AgilityPlugin plugin;
|
private final AgilityPlugin plugin;
|
||||||
private final AgilityConfig config;
|
private final AgilityConfig config;
|
||||||
@@ -43,7 +43,7 @@ public class LapCounterOverlay extends Overlay
|
|||||||
private final PanelComponent panelComponent = new PanelComponent();
|
private final PanelComponent panelComponent = new PanelComponent();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
LapCounterOverlay(AgilityPlugin plugin, AgilityConfig config)
|
private LapCounterOverlay(AgilityPlugin plugin, AgilityConfig config)
|
||||||
{
|
{
|
||||||
setPosition(OverlayPosition.TOP_LEFT);
|
setPosition(OverlayPosition.TOP_LEFT);
|
||||||
setPriority(OverlayPriority.LOW);
|
setPriority(OverlayPriority.LOW);
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ import java.util.Set;
|
|||||||
import static net.runelite.api.ObjectID.*;
|
import static net.runelite.api.ObjectID.*;
|
||||||
import static net.runelite.api.NullObjectID.*;
|
import static net.runelite.api.NullObjectID.*;
|
||||||
|
|
||||||
public class Obstacles
|
class Obstacles
|
||||||
{
|
{
|
||||||
public static final Set<Integer> COURSE_OBSTACLE_IDS = ImmutableSet.of(
|
static final Set<Integer> COURSE_OBSTACLE_IDS = ImmutableSet.of(
|
||||||
// Gnome
|
// Gnome
|
||||||
OBSTACLE_NET_23134, TREE_BRANCH_23559, TREE_BRANCH_23560, OBSTACLE_NET_23135, OBSTACLE_PIPE_23138,
|
OBSTACLE_NET_23134, TREE_BRANCH_23559, TREE_BRANCH_23560, OBSTACLE_NET_23135, OBSTACLE_PIPE_23138,
|
||||||
OBSTACLE_PIPE_23139, LOG_BALANCE_23145, BALANCING_ROPE_23557,
|
OBSTACLE_PIPE_23139, LOG_BALANCE_23145, BALANCING_ROPE_23557,
|
||||||
@@ -79,7 +79,7 @@ public class Obstacles
|
|||||||
GAP_11406, GAP_11429, GAP_11430, STEEP_ROOF, GAP_11630, PLANK_11631, WOODEN_BEAMS
|
GAP_11406, GAP_11429, GAP_11430, STEEP_ROOF, GAP_11630, PLANK_11631, WOODEN_BEAMS
|
||||||
);
|
);
|
||||||
|
|
||||||
public static final Set<Integer> SHORTCUT_OBSTACLE_IDS = ImmutableSet.of(
|
static final Set<Integer> SHORTCUT_OBSTACLE_IDS = ImmutableSet.of(
|
||||||
// Grand Exchange
|
// Grand Exchange
|
||||||
UNDERWALL_TUNNEL_16529, UNDERWALL_TUNNEL_16530,
|
UNDERWALL_TUNNEL_16529, UNDERWALL_TUNNEL_16530,
|
||||||
// South Varrock
|
// South Varrock
|
||||||
@@ -192,10 +192,10 @@ public class Obstacles
|
|||||||
CLIMBING_ROCKS_11948, CLIMBING_ROCKS_11949
|
CLIMBING_ROCKS_11948, CLIMBING_ROCKS_11949
|
||||||
);
|
);
|
||||||
|
|
||||||
public static final Set<Integer> TRAP_OBSTACLE_IDS = ImmutableSet.of(
|
static final Set<Integer> TRAP_OBSTACLE_IDS = ImmutableSet.of(
|
||||||
// Agility pyramid
|
// Agility pyramid
|
||||||
NULL_3550, NULL_10872, NULL_10873
|
NULL_3550, NULL_10872, NULL_10873
|
||||||
);
|
);
|
||||||
|
|
||||||
public static final List<Integer> TRAP_OBSTACLE_REGIONS = ImmutableList.of(12105, 13356);
|
static final List<Integer> TRAP_OBSTACLE_REGIONS = ImmutableList.of(12105, 13356);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user