@@ -316,7 +316,7 @@ public class Notifier
|
|||||||
|
|
||||||
private static Process sendCommand(final List<String> commands) throws IOException
|
private static Process sendCommand(final List<String> commands) throws IOException
|
||||||
{
|
{
|
||||||
return new ProcessBuilder(commands.toArray(new String[commands.size()]))
|
return new ProcessBuilder(commands.toArray(new String[0]))
|
||||||
.redirectErrorStream(true)
|
.redirectErrorStream(true)
|
||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ public class RuneLite
|
|||||||
|
|
||||||
Authenticator.setDefault(new Authenticator()
|
Authenticator.setDefault(new Authenticator()
|
||||||
{
|
{
|
||||||
private PasswordAuthentication auth = new PasswordAuthentication(user, pass);
|
private final PasswordAuthentication auth = new PasswordAuthentication(user, pass);
|
||||||
|
|
||||||
protected PasswordAuthentication getPasswordAuthentication()
|
protected PasswordAuthentication getPasswordAuthentication()
|
||||||
{
|
{
|
||||||
@@ -308,7 +308,7 @@ public class RuneLite
|
|||||||
log.info("Client initialization took {}ms. Uptime: {}ms", end - start, uptime);
|
log.info("Client initialization took {}ms. Uptime: {}ms", end - start, uptime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() throws Exception
|
private void start() throws Exception
|
||||||
{
|
{
|
||||||
// Load RuneLite or Vanilla client
|
// Load RuneLite or Vanilla client
|
||||||
final boolean isOutdated = client == null;
|
final boolean isOutdated = client == null;
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ import net.runelite.client.callback.Hooks;
|
|||||||
import net.runelite.client.chat.ChatMessageManager;
|
import net.runelite.client.chat.ChatMessageManager;
|
||||||
import net.runelite.client.config.ChatColorConfig;
|
import net.runelite.client.config.ChatColorConfig;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import net.runelite.client.config.RuneLiteConfig;
|
|
||||||
import net.runelite.client.config.OpenOSRSConfig;
|
import net.runelite.client.config.OpenOSRSConfig;
|
||||||
|
import net.runelite.client.config.RuneLiteConfig;
|
||||||
import net.runelite.client.eventbus.EventBus;
|
import net.runelite.client.eventbus.EventBus;
|
||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import net.runelite.client.menus.MenuManager;
|
import net.runelite.client.menus.MenuManager;
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ public class Hooks implements Callbacks
|
|||||||
/**
|
/**
|
||||||
* Get the Graphics2D for the MainBufferProvider image
|
* Get the Graphics2D for the MainBufferProvider image
|
||||||
* This caches the Graphics2D instance so it can be reused
|
* This caches the Graphics2D instance so it can be reused
|
||||||
|
*
|
||||||
* @param mainBufferProvider
|
* @param mainBufferProvider
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
package net.runelite.client.chat;
|
package net.runelite.client.chat;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import net.runelite.client.util.ColorUtil;
|
|
||||||
import net.runelite.api.util.Text;
|
import net.runelite.api.util.Text;
|
||||||
|
import net.runelite.client.util.ColorUtil;
|
||||||
|
|
||||||
public class ChatMessageBuilder
|
public class ChatMessageBuilder
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,13 +46,13 @@ import net.runelite.api.MessageNode;
|
|||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
import net.runelite.api.Varbits;
|
import net.runelite.api.Varbits;
|
||||||
import net.runelite.api.events.ChatMessage;
|
import net.runelite.api.events.ChatMessage;
|
||||||
import net.runelite.client.events.ConfigChanged;
|
|
||||||
import net.runelite.api.events.ResizeableChanged;
|
import net.runelite.api.events.ResizeableChanged;
|
||||||
import net.runelite.api.events.ScriptCallbackEvent;
|
import net.runelite.api.events.ScriptCallbackEvent;
|
||||||
import net.runelite.api.events.VarbitChanged;
|
import net.runelite.api.events.VarbitChanged;
|
||||||
import net.runelite.client.callback.ClientThread;
|
import net.runelite.client.callback.ClientThread;
|
||||||
import net.runelite.client.config.ChatColorConfig;
|
import net.runelite.client.config.ChatColorConfig;
|
||||||
import net.runelite.client.eventbus.EventBus;
|
import net.runelite.client.eventbus.EventBus;
|
||||||
|
import net.runelite.client.events.ConfigChanged;
|
||||||
import net.runelite.client.ui.JagexColors;
|
import net.runelite.client.ui.JagexColors;
|
||||||
import net.runelite.client.util.ColorUtil;
|
import net.runelite.client.util.ColorUtil;
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ public @interface ConfigItem
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* For Config items that have a value of multiple enums,
|
* For Config items that have a value of multiple enums,
|
||||||
|
*
|
||||||
* @return the number of rows that are display in the item without having to scroll.
|
* @return the number of rows that are display in the item without having to scroll.
|
||||||
*/
|
*/
|
||||||
int displayRows() default 2;
|
int displayRows() default 2;
|
||||||
@@ -82,6 +83,7 @@ public @interface ConfigItem
|
|||||||
/**
|
/**
|
||||||
* Use this to indicate the enum class that is going to be used in the multiple select config.
|
* Use this to indicate the enum class that is going to be used in the multiple select config.
|
||||||
* This implementation made debugging problems with multiple selects a lot easier
|
* This implementation made debugging problems with multiple selects a lot easier
|
||||||
|
*
|
||||||
* @return The Enum that will be used for the multiple select
|
* @return The Enum that will be used for the multiple select
|
||||||
*/
|
*/
|
||||||
Class<? extends Enum> enumClass() default Enum.class;
|
Class<? extends Enum> enumClass() default Enum.class;
|
||||||
|
|||||||
@@ -59,10 +59,10 @@ import javax.inject.Inject;
|
|||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.client.events.ConfigChanged;
|
|
||||||
import net.runelite.client.RuneLite;
|
import net.runelite.client.RuneLite;
|
||||||
import static net.runelite.client.RuneLite.PROFILES_DIR;
|
import static net.runelite.client.RuneLite.PROFILES_DIR;
|
||||||
import net.runelite.client.eventbus.EventBus;
|
import net.runelite.client.eventbus.EventBus;
|
||||||
|
import net.runelite.client.events.ConfigChanged;
|
||||||
import net.runelite.client.util.ColorUtil;
|
import net.runelite.client.util.ColorUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class DatabaseManager
|
|||||||
Settings settings = new Settings();
|
Settings settings = new Settings();
|
||||||
settings.setExecuteLogging(false);
|
settings.setExecuteLogging(false);
|
||||||
|
|
||||||
return DSL.using(connection, SQLDialect.H2, settings);
|
return DSL.using(connection, SQLDialect.H2, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean checkTableExists(String table)
|
public boolean checkTableExists(String table)
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ import net.runelite.client.config.OpenOSRSConfig;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class EventBus implements EventBusInterface
|
public class EventBus implements EventBusInterface
|
||||||
{
|
{
|
||||||
private Map<Object, Object> subscriptionList = new HashMap<>();
|
private final Map<Object, Object> subscriptionList = new HashMap<>();
|
||||||
private Map<Class<?>, Relay<Object>> subjectList = new HashMap<>();
|
private final Map<Class<?>, Relay<Object>> subjectList = new HashMap<>();
|
||||||
private Map<Object, CompositeDisposable> subscriptionsMap = new HashMap<>();
|
private final Map<Object, CompositeDisposable> subscriptionsMap = new HashMap<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private OpenOSRSConfig openOSRSConfig;
|
private OpenOSRSConfig openOSRSConfig;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class Flexo extends Robot
|
|||||||
public static final int fixedWidth = Constants.GAME_FIXED_WIDTH;
|
public static final int fixedWidth = Constants.GAME_FIXED_WIDTH;
|
||||||
public static final int fixedHeight = Constants.GAME_FIXED_HEIGHT;
|
public static final int fixedHeight = Constants.GAME_FIXED_HEIGHT;
|
||||||
public static boolean isStretched;
|
public static boolean isStretched;
|
||||||
public static int minDelay = 45;
|
public static final int minDelay = 45;
|
||||||
public static MouseMotionFactory currentMouseMotionFactory;
|
public static MouseMotionFactory currentMouseMotionFactory;
|
||||||
public boolean pausedIndefinitely = false;
|
public boolean pausedIndefinitely = false;
|
||||||
private Robot peer;
|
private Robot peer;
|
||||||
@@ -74,7 +74,7 @@ public class Flexo extends Robot
|
|||||||
.getDefaultScreenDevice());
|
.getDefaultScreenDevice());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init(GraphicsDevice screen) throws AWTException
|
private void init(GraphicsDevice screen)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,18 +26,7 @@
|
|||||||
package net.runelite.client.game;
|
package net.runelite.client.game;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import static net.runelite.api.NullObjectID.NULL_25337;
|
import static net.runelite.api.NullObjectID.*;
|
||||||
import static net.runelite.api.NullObjectID.NULL_26371;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_26375;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_26884;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_26886;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_29868;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_29869;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_29870;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_31823;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_31849;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_33327;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_33328;
|
|
||||||
import static net.runelite.api.ObjectID.*;
|
import static net.runelite.api.ObjectID.*;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
|
|
||||||
@@ -45,40 +34,40 @@ import net.runelite.api.coords.WorldPoint;
|
|||||||
public enum AgilityShortcut
|
public enum AgilityShortcut
|
||||||
{
|
{
|
||||||
GENERIC_SHORTCUT(1, "Shortcut", null,
|
GENERIC_SHORTCUT(1, "Shortcut", null,
|
||||||
// Trollheim
|
// Trollheim
|
||||||
ROCKS_3790, ROCKS_3791,
|
ROCKS_3790, ROCKS_3791,
|
||||||
// Fremennik Slayer Cave
|
// Fremennik Slayer Cave
|
||||||
STEPS_29993,
|
STEPS_29993,
|
||||||
// Fossil Island
|
// Fossil Island
|
||||||
LADDER_30938, LADDER_30939, LADDER_30940, LADDER_30941, RUBBER_CAP_MUSHROOM,
|
LADDER_30938, LADDER_30939, LADDER_30940, LADDER_30941, RUBBER_CAP_MUSHROOM,
|
||||||
// Brimhaven dungeon
|
// Brimhaven dungeon
|
||||||
CREVICE_30198,
|
CREVICE_30198,
|
||||||
// Lumbridge
|
// Lumbridge
|
||||||
STILE_12982,
|
STILE_12982,
|
||||||
// Gu'Tanoth Bridge
|
// Gu'Tanoth Bridge
|
||||||
GAP, GAP_2831,
|
GAP, GAP_2831,
|
||||||
// Lumbridge Swamp Caves
|
// Lumbridge Swamp Caves
|
||||||
STEPPING_STONE_5948, STEPPING_STONE_5949, ROCKS_6673,
|
STEPPING_STONE_5948, STEPPING_STONE_5949, ROCKS_6673,
|
||||||
// Morytania Pirate Ship
|
// Morytania Pirate Ship
|
||||||
ROCK_16115,
|
ROCK_16115,
|
||||||
// Lumber Yard
|
// Lumber Yard
|
||||||
BROKEN_FENCE_2618,
|
BROKEN_FENCE_2618,
|
||||||
// McGrubor's Wood
|
// McGrubor's Wood
|
||||||
LOOSE_RAILING,
|
LOOSE_RAILING,
|
||||||
// Underwater Area Fossil Island
|
// Underwater Area Fossil Island
|
||||||
TUNNEL_30959, HOLE_30966, OBSTACLE, OBSTACLE_30767, OBSTACLE_30964, OBSTACLE_30962, PLANT_DOOR_30961,
|
TUNNEL_30959, HOLE_30966, OBSTACLE, OBSTACLE_30767, OBSTACLE_30964, OBSTACLE_30962, PLANT_DOOR_30961,
|
||||||
// Tree Gnome Village
|
// Tree Gnome Village
|
||||||
LOOSE_RAILING_2186,
|
LOOSE_RAILING_2186,
|
||||||
// Burgh de Rott
|
// Burgh de Rott
|
||||||
LOW_FENCE,
|
LOW_FENCE,
|
||||||
// Taverley
|
// Taverley
|
||||||
STILE,
|
STILE,
|
||||||
// Asgarnian Ice Dungeon
|
// Asgarnian Ice Dungeon
|
||||||
STEPS,
|
STEPS,
|
||||||
// Fossil Island Wyvern Cave
|
// Fossil Island Wyvern Cave
|
||||||
STAIRS_31485,
|
STAIRS_31485,
|
||||||
// Trollweiss Mountain Cave
|
// Trollweiss Mountain Cave
|
||||||
ROCKY_HANDHOLDS, ROCKY_HANDHOLDS_19847),
|
ROCKY_HANDHOLDS, ROCKY_HANDHOLDS_19847),
|
||||||
BRIMHAVEN_DUNGEON_MEDIUM_PIPE_RETURN(1, "Pipe Squeeze", null, new WorldPoint(2698, 9491, 0), PIPE_21727),
|
BRIMHAVEN_DUNGEON_MEDIUM_PIPE_RETURN(1, "Pipe Squeeze", null, new WorldPoint(2698, 9491, 0), PIPE_21727),
|
||||||
BRIMHAVEN_DUNGEON_PIPE_RETURN(1, "Pipe Squeeze", null, new WorldPoint(2655, 9573, 0), PIPE_21728),
|
BRIMHAVEN_DUNGEON_PIPE_RETURN(1, "Pipe Squeeze", null, new WorldPoint(2655, 9573, 0), PIPE_21728),
|
||||||
BRIMHAVEN_DUNGEON_STEPPING_STONES_RETURN(1, "Pipe Squeeze", null, STEPPING_STONE_21739),
|
BRIMHAVEN_DUNGEON_STEPPING_STONES_RETURN(1, "Pipe Squeeze", null, STEPPING_STONE_21739),
|
||||||
@@ -206,7 +195,7 @@ public enum AgilityShortcut
|
|||||||
REVENANT_CAVES_ANKOU_EAST(75, "Jump", new WorldPoint(3201, 10195, 0), PILLAR_31561),
|
REVENANT_CAVES_ANKOU_EAST(75, "Jump", new WorldPoint(3201, 10195, 0), PILLAR_31561),
|
||||||
REVENANT_CAVES_ANKOU_NORTH(75, "Jump", new WorldPoint(3180, 10209, 0), PILLAR_31561),
|
REVENANT_CAVES_ANKOU_NORTH(75, "Jump", new WorldPoint(3180, 10209, 0), PILLAR_31561),
|
||||||
ZUL_ANDRA_ISLAND_CROSSING(76, "Stepping Stone", new WorldPoint(2156, 3073, 0), STEPPING_STONE_10663),
|
ZUL_ANDRA_ISLAND_CROSSING(76, "Stepping Stone", new WorldPoint(2156, 3073, 0), STEPPING_STONE_10663),
|
||||||
SHILO_VILLAGE_STEPPING_STONES( 77, "Stepping Stones", new WorldPoint(2863, 2974, 0), STEPPING_STONE_16466),
|
SHILO_VILLAGE_STEPPING_STONES(77, "Stepping Stones", new WorldPoint(2863, 2974, 0), STEPPING_STONE_16466),
|
||||||
IORWERTHS_DUNGEON_NORTHERN_SHORTCUT_EAST(78, "Tight Gap", new WorldPoint(3221, 12441, 0), TIGHT_GAP),
|
IORWERTHS_DUNGEON_NORTHERN_SHORTCUT_EAST(78, "Tight Gap", new WorldPoint(3221, 12441, 0), TIGHT_GAP),
|
||||||
IORWERTHS_DUNGEON_NORTHERN_SHORTCUT_WEST(78, "Tight Gap", new WorldPoint(3215, 12441, 0), TIGHT_GAP_36693),
|
IORWERTHS_DUNGEON_NORTHERN_SHORTCUT_WEST(78, "Tight Gap", new WorldPoint(3215, 12441, 0), TIGHT_GAP_36693),
|
||||||
KHARAZI_JUNGLE_VINE_CLIMB(79, "Vine", new WorldPoint(2897, 2939, 0), NULL_26884, NULL_26886),
|
KHARAZI_JUNGLE_VINE_CLIMB(79, "Vine", new WorldPoint(2897, 2939, 0), NULL_26884, NULL_26886),
|
||||||
|
|||||||
@@ -45,9 +45,9 @@ import net.runelite.api.IndexedSprite;
|
|||||||
import net.runelite.api.SpriteID;
|
import net.runelite.api.SpriteID;
|
||||||
import net.runelite.api.events.ClanChanged;
|
import net.runelite.api.events.ClanChanged;
|
||||||
import net.runelite.api.events.GameStateChanged;
|
import net.runelite.api.events.GameStateChanged;
|
||||||
|
import net.runelite.api.util.Text;
|
||||||
import net.runelite.client.eventbus.EventBus;
|
import net.runelite.client.eventbus.EventBus;
|
||||||
import net.runelite.client.util.ImageUtil;
|
import net.runelite.client.util.ImageUtil;
|
||||||
import net.runelite.api.util.Text;
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class ClanManager
|
public class ClanManager
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class HiscoreLoader extends CacheLoader<HiscoreManager.HiscoreKey, HiscoreResult
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HiscoreResult load(@NotNull HiscoreManager.HiscoreKey hiscoreKey) throws Exception
|
public HiscoreResult load(@NotNull HiscoreManager.HiscoreKey hiscoreKey)
|
||||||
{
|
{
|
||||||
return EMPTY;
|
return EMPTY;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ public class ItemManager
|
|||||||
return getRepairValue(itemId, false);
|
return getRepairValue(itemId, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRepairValue(int itemId, boolean fullValue)
|
private int getRepairValue(int itemId, boolean fullValue)
|
||||||
{
|
{
|
||||||
final ItemReclaimCost b = ItemReclaimCost.of(itemId);
|
final ItemReclaimCost b = ItemReclaimCost.of(itemId);
|
||||||
|
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ import javax.inject.Singleton;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.AnimationID;
|
import net.runelite.api.AnimationID;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.TileItem;
|
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.NpcID;
|
import net.runelite.api.NpcID;
|
||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
import net.runelite.api.Tile;
|
import net.runelite.api.Tile;
|
||||||
|
import net.runelite.api.TileItem;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.api.events.AnimationChanged;
|
import net.runelite.api.events.AnimationChanged;
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ public class NPCStats
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Based off the formula found here: http://services.runescape.com/m=forum/c=PLuJ4cy6gtA/forums.ws?317,318,712,65587452,209,337584542#209
|
* Based off the formula found here: http://services.runescape.com/m=forum/c=PLuJ4cy6gtA/forums.ws?317,318,712,65587452,209,337584542#209
|
||||||
|
*
|
||||||
* @return bonus XP modifier
|
* @return bonus XP modifier
|
||||||
*/
|
*/
|
||||||
public double calculateXpModifier()
|
public double calculateXpModifier()
|
||||||
|
|||||||
@@ -41,15 +41,15 @@ public class SoundManager
|
|||||||
AudioInputStream in = AudioSystem.getAudioInputStream(this.getClass().getClassLoader().getResource(sound.getFilePath()));
|
AudioInputStream in = AudioSystem.getAudioInputStream(this.getClass().getClassLoader().getResource(sound.getFilePath()));
|
||||||
AudioFormat outFormat = SoundManager.this.getOutFormat(in.getFormat());
|
AudioFormat outFormat = SoundManager.this.getOutFormat(in.getFormat());
|
||||||
DataLine.Info info = new DataLine.Info(SourceDataLine.class, outFormat);
|
DataLine.Info info = new DataLine.Info(SourceDataLine.class, outFormat);
|
||||||
SourceDataLine line = (SourceDataLine)AudioSystem.getLine(info);
|
SourceDataLine line = (SourceDataLine) AudioSystem.getLine(info);
|
||||||
if (line != null)
|
if (line != null)
|
||||||
{
|
{
|
||||||
line.open(outFormat, 2200);
|
line.open(outFormat, 2200);
|
||||||
if (line.isControlSupported(FloatControl.Type.MASTER_GAIN))
|
if (line.isControlSupported(FloatControl.Type.MASTER_GAIN))
|
||||||
{
|
{
|
||||||
int volume = SoundManager.this.runeliteConfig.volume();
|
int volume = SoundManager.this.runeliteConfig.volume();
|
||||||
FloatControl gainControl = (FloatControl)line.getControl(FloatControl.Type.MASTER_GAIN);
|
FloatControl gainControl = (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN);
|
||||||
BooleanControl muteControl = (BooleanControl)line.getControl(BooleanControl.Type.MUTE);
|
BooleanControl muteControl = (BooleanControl) line.getControl(BooleanControl.Type.MUTE);
|
||||||
if (volume == 0)
|
if (volume == 0)
|
||||||
{
|
{
|
||||||
muteControl.setValue(true);
|
muteControl.setValue(true);
|
||||||
@@ -57,7 +57,7 @@ public class SoundManager
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
muteControl.setValue(false);
|
muteControl.setValue(false);
|
||||||
gainControl.setValue((float)(Math.log((double)volume / 100.0) / Math.log(10.0) * 20.0));
|
gainControl.setValue((float) (Math.log((double) volume / 100.0) / Math.log(10.0) * 20.0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
line.start();
|
line.start();
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class SpriteManager
|
|||||||
@Inject
|
@Inject
|
||||||
private InfoBoxManager infoBoxManager;
|
private InfoBoxManager infoBoxManager;
|
||||||
|
|
||||||
public Cache<Long, BufferedImage> cache = CacheBuilder.newBuilder()
|
private final Cache<Long, BufferedImage> cache = CacheBuilder.newBuilder()
|
||||||
.maximumSize(128L)
|
.maximumSize(128L)
|
||||||
.expireAfterAccess(1, TimeUnit.HOURS)
|
.expireAfterAccess(1, TimeUnit.HOURS)
|
||||||
.build();
|
.build();
|
||||||
|
|||||||
@@ -21,9 +21,8 @@ public class XpDropManager
|
|||||||
private int damage = 0;
|
private int damage = 0;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private int tickShow = 0;
|
private int tickShow = 0;
|
||||||
private int previousExpGained;
|
private final Client client;
|
||||||
private Client client;
|
private final EventBus eventBus;
|
||||||
private EventBus eventBus;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private XpDropManager(
|
private XpDropManager(
|
||||||
@@ -50,7 +49,7 @@ public class XpDropManager
|
|||||||
Integer previous = previousSkillExpTable.put(skill, xp);
|
Integer previous = previousSkillExpTable.put(skill, xp);
|
||||||
if (previous != null)
|
if (previous != null)
|
||||||
{
|
{
|
||||||
previousExpGained = xp - previous;
|
int previousExpGained = xp - previous;
|
||||||
XpDropEvent xpDropEvent = new XpDropEvent();
|
XpDropEvent xpDropEvent = new XpDropEvent();
|
||||||
xpDropEvent.setExp(previousExpGained);
|
xpDropEvent.setExp(previousExpGained);
|
||||||
xpDropEvent.setSkill(skill);
|
xpDropEvent.setSkill(skill);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class ChatboxItemSearch extends ChatboxTextInput
|
|||||||
private final ItemManager itemManager;
|
private final ItemManager itemManager;
|
||||||
private final Client client;
|
private final Client client;
|
||||||
|
|
||||||
private Map<Integer, ItemDefinition> results = new LinkedHashMap<>();
|
private final Map<Integer, ItemDefinition> results = new LinkedHashMap<>();
|
||||||
private String tooltipText;
|
private String tooltipText;
|
||||||
private int index = -1;
|
private int index = -1;
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ public class ChatboxItemSearch extends ChatboxTextInput
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ChatboxItemSearch(ChatboxPanelManager chatboxPanelManager, ClientThread clientThread,
|
private ChatboxItemSearch(ChatboxPanelManager chatboxPanelManager, ClientThread clientThread,
|
||||||
ItemManager itemManager, Client client)
|
ItemManager itemManager, Client client)
|
||||||
{
|
{
|
||||||
super(chatboxPanelManager, clientThread);
|
super(chatboxPanelManager, clientThread);
|
||||||
this.chatboxPanelManager = chatboxPanelManager;
|
this.chatboxPanelManager = chatboxPanelManager;
|
||||||
@@ -181,7 +181,7 @@ public class ChatboxItemSearch extends ChatboxTextInput
|
|||||||
{
|
{
|
||||||
if (onItemSelected != null)
|
if (onItemSelected != null)
|
||||||
{
|
{
|
||||||
onItemSelected.accept(results.keySet().toArray(new Integer[results.size()])[index]);
|
onItemSelected.accept(results.keySet().toArray(new Integer[0])[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
chatboxPanelManager.close();
|
chatboxPanelManager.close();
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ import lombok.Getter;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.FontID;
|
import net.runelite.api.FontID;
|
||||||
import net.runelite.api.FontTypeFace;
|
import net.runelite.api.FontTypeFace;
|
||||||
|
import net.runelite.api.util.Text;
|
||||||
import net.runelite.api.widgets.JavaScriptCallback;
|
import net.runelite.api.widgets.JavaScriptCallback;
|
||||||
import net.runelite.api.widgets.Widget;
|
import net.runelite.api.widgets.Widget;
|
||||||
import net.runelite.api.widgets.WidgetPositionMode;
|
import net.runelite.api.widgets.WidgetPositionMode;
|
||||||
@@ -58,7 +59,6 @@ import net.runelite.client.callback.ClientThread;
|
|||||||
import net.runelite.client.input.KeyListener;
|
import net.runelite.client.input.KeyListener;
|
||||||
import net.runelite.client.input.MouseListener;
|
import net.runelite.client.input.MouseListener;
|
||||||
import net.runelite.client.util.MiscUtils;
|
import net.runelite.client.util.MiscUtils;
|
||||||
import net.runelite.api.util.Text;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ChatboxTextInput extends ChatboxInput implements KeyListener, MouseListener
|
public class ChatboxTextInput extends ChatboxInput implements KeyListener, MouseListener
|
||||||
@@ -67,7 +67,7 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse
|
|||||||
private static final Pattern BREAK_MATCHER = Pattern.compile("[^a-zA-Z0-9']");
|
private static final Pattern BREAK_MATCHER = Pattern.compile("[^a-zA-Z0-9']");
|
||||||
|
|
||||||
private final ChatboxPanelManager chatboxPanelManager;
|
private final ChatboxPanelManager chatboxPanelManager;
|
||||||
protected final ClientThread clientThread;
|
final ClientThread clientThread;
|
||||||
|
|
||||||
private static IntPredicate getDefaultCharValidator()
|
private static IntPredicate getDefaultCharValidator()
|
||||||
{
|
{
|
||||||
@@ -135,7 +135,7 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChatboxTextInput lines(int lines)
|
protected ChatboxTextInput lines(int lines)
|
||||||
{
|
{
|
||||||
this.lines = lines;
|
this.lines = lines;
|
||||||
if (built)
|
if (built)
|
||||||
@@ -573,7 +573,7 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void close()
|
void close()
|
||||||
{
|
{
|
||||||
if (this.onClose != null)
|
if (this.onClose != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -83,10 +83,7 @@ public class BaseComparableEntry extends AbstractComparableEntry
|
|||||||
{
|
{
|
||||||
int type = entry.getOpcode();
|
int type = entry.getOpcode();
|
||||||
|
|
||||||
if (this.type != type)
|
return this.type == type;
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ public interface ComparableEntries
|
|||||||
*
|
*
|
||||||
* @param option has to equal entry option
|
* @param option has to equal entry option
|
||||||
* @param target has to equal entry option
|
* @param target has to equal entry option
|
||||||
*
|
|
||||||
* @return a new BaseComparableEntry
|
* @return a new BaseComparableEntry
|
||||||
*/
|
*/
|
||||||
static BaseComparableEntry newBaseComparableEntry(String option, String target)
|
static BaseComparableEntry newBaseComparableEntry(String option, String target)
|
||||||
@@ -23,10 +22,9 @@ public interface ComparableEntries
|
|||||||
* BaseComparableEntries should only be used if there's
|
* BaseComparableEntries should only be used if there's
|
||||||
* no better ComparableEntry available.
|
* no better ComparableEntry available.
|
||||||
*
|
*
|
||||||
* @param option has to equal option
|
* @param option has to equal option
|
||||||
* @param target equal or contains depending on strictTarget
|
* @param target equal or contains depending on strictTarget
|
||||||
* @param strictTarget read up one line
|
* @param strictTarget read up one line
|
||||||
*
|
|
||||||
* @return a new BaseComparableEntry
|
* @return a new BaseComparableEntry
|
||||||
*/
|
*/
|
||||||
static BaseComparableEntry newBaseComparableEntry(String option, String target, boolean strictTarget)
|
static BaseComparableEntry newBaseComparableEntry(String option, String target, boolean strictTarget)
|
||||||
@@ -38,13 +36,12 @@ public interface ComparableEntries
|
|||||||
* BaseComparableEntries should only be used if there's
|
* BaseComparableEntries should only be used if there's
|
||||||
* no better ComparableEntry available.
|
* no better ComparableEntry available.
|
||||||
*
|
*
|
||||||
* @param option equal or contains depending on strictOption
|
* @param option equal or contains depending on strictOption
|
||||||
* @param target equal or contains depending on strictTarget
|
* @param target equal or contains depending on strictTarget
|
||||||
* @param id has to be the same, or -1 to skip checking
|
* @param id has to be the same, or -1 to skip checking
|
||||||
* @param type has to be the same, or -1 to skip checking
|
* @param type has to be the same, or -1 to skip checking
|
||||||
* @param strictOption strict option or nah
|
* @param strictOption strict option or nah
|
||||||
* @param strictTarget strict target or nah
|
* @param strictTarget strict target or nah
|
||||||
*
|
|
||||||
* @return a new BaseComparableEntry
|
* @return a new BaseComparableEntry
|
||||||
*/
|
*/
|
||||||
static BaseComparableEntry newBaseComparableEntry(String option, String target, int id, int type, boolean strictOption, boolean strictTarget)
|
static BaseComparableEntry newBaseComparableEntry(String option, String target, int id, int type, boolean strictOption, boolean strictTarget)
|
||||||
@@ -57,7 +54,7 @@ public interface ComparableEntries
|
|||||||
* in their name. It then checks the ItemDefinition
|
* in their name. It then checks the ItemDefinition
|
||||||
* for each of them, to see if it's possible for
|
* for each of them, to see if it's possible for
|
||||||
* the item to have option as one of their options.
|
* the item to have option as one of their options.
|
||||||
*
|
* <p>
|
||||||
* This has to be ran on the clientthread!
|
* This has to be ran on the clientthread!
|
||||||
*/
|
*/
|
||||||
static ItemComparableEntry newInvItemComparableEntry(Client client, String option, String itemName)
|
static ItemComparableEntry newInvItemComparableEntry(Client client, String option, String itemName)
|
||||||
|
|||||||
@@ -639,7 +639,7 @@ public class MenuManager
|
|||||||
/**
|
/**
|
||||||
* Adds to the map of swaps.
|
* Adds to the map of swaps.
|
||||||
*/
|
*/
|
||||||
public void addSwap(String option, String target, String option2, String target2, boolean strictOption, boolean strictTarget)
|
private void addSwap(String option, String target, String option2, String target2, boolean strictOption, boolean strictTarget)
|
||||||
{
|
{
|
||||||
option = option.trim().toLowerCase();
|
option = option.trim().toLowerCase();
|
||||||
target = Text.standardize(target);
|
target = Text.standardize(target);
|
||||||
@@ -660,7 +660,7 @@ public class MenuManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void removeSwap(String option, String target, String option2, String target2, boolean strictOption, boolean strictTarget)
|
private void removeSwap(String option, String target, String option2, String target2, boolean strictOption, boolean strictTarget)
|
||||||
{
|
{
|
||||||
option = option.trim().toLowerCase();
|
option = option.trim().toLowerCase();
|
||||||
target = Text.standardize(target);
|
target = Text.standardize(target);
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ public abstract class Plugin implements Module
|
|||||||
for (Method method : this.getClass().getDeclaredMethods())
|
for (Method method : this.getClass().getDeclaredMethods())
|
||||||
{
|
{
|
||||||
if (method.getAnnotation(Subscribe.class) == null)
|
if (method.getAnnotation(Subscribe.class) == null)
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
assert method.getParameterCount() == 1 : "Methods annotated with @Subscribe should have only one parameter";
|
assert method.getParameterCount() == 1 : "Methods annotated with @Subscribe should have only one parameter";
|
||||||
|
|
||||||
|
|||||||
@@ -570,6 +570,7 @@ public class PluginManager
|
|||||||
* Plugins in group 2 has dependents in group 1, etc.
|
* Plugins in group 2 has dependents in group 1, etc.
|
||||||
* This allows for loading dependent groups serially, starting from the last group,
|
* This allows for loading dependent groups serially, starting from the last group,
|
||||||
* while loading plugins within each group in parallel.
|
* while loading plugins within each group in parallel.
|
||||||
|
*
|
||||||
* @param graph
|
* @param graph
|
||||||
* @param <T>
|
* @param <T>
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
@@ -24,11 +24,12 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.achievementdiary;
|
package net.runelite.client.plugins.achievementdiary;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
public class CombatLevelRequirement implements Requirement
|
public class CombatLevelRequirement implements Requirement
|
||||||
{
|
{
|
||||||
private final int level;
|
private final int level;
|
||||||
|
|||||||
@@ -27,9 +27,10 @@ package net.runelite.client.plugins.achievementdiary;
|
|||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
class DiaryRequirement
|
class DiaryRequirement
|
||||||
{
|
{
|
||||||
private final String task;
|
private final String task;
|
||||||
|
|||||||
@@ -79,16 +79,6 @@ public class DiaryRequirementsPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private ClientThread clientThread;
|
private ClientThread clientThread;
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void startUp() throws Exception
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void shutDown() throws Exception
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
private void onWidgetLoaded(final WidgetLoaded event)
|
private void onWidgetLoaded(final WidgetLoaded event)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,12 +24,13 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.achievementdiary;
|
package net.runelite.client.plugins.achievementdiary;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.runelite.api.Favour;
|
import net.runelite.api.Favour;
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
public class FavourRequirement implements Requirement
|
public class FavourRequirement implements Requirement
|
||||||
{
|
{
|
||||||
private final Favour house;
|
private final Favour house;
|
||||||
|
|||||||
@@ -27,11 +27,12 @@ package net.runelite.client.plugins.achievementdiary;
|
|||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
public abstract class GenericDiaryRequirement
|
public abstract class GenericDiaryRequirement
|
||||||
{
|
{
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private Set<DiaryRequirement> requirements = new HashSet<>();
|
private Set<DiaryRequirement> requirements = new HashSet<>();
|
||||||
|
|
||||||
protected void add(String task, Requirement... requirements)
|
protected void add(String task, Requirement... requirements)
|
||||||
|
|||||||
@@ -27,11 +27,12 @@ package net.runelite.client.plugins.achievementdiary;
|
|||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
public class OrRequirement implements Requirement
|
public class OrRequirement implements Requirement
|
||||||
{
|
{
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final List<Requirement> requirements;
|
private final List<Requirement> requirements;
|
||||||
|
|
||||||
public OrRequirement(Requirement... reqs)
|
public OrRequirement(Requirement... reqs)
|
||||||
|
|||||||
@@ -24,11 +24,12 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.achievementdiary;
|
package net.runelite.client.plugins.achievementdiary;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
public class QuestPointRequirement implements Requirement
|
public class QuestPointRequirement implements Requirement
|
||||||
{
|
{
|
||||||
private final int qp;
|
private final int qp;
|
||||||
|
|||||||
@@ -24,11 +24,12 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.achievementdiary;
|
package net.runelite.client.plugins.achievementdiary;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.runelite.api.Quest;
|
import net.runelite.api.Quest;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class QuestRequirement implements Requirement
|
public class QuestRequirement implements Requirement
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,12 +24,13 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.achievementdiary;
|
package net.runelite.client.plugins.achievementdiary;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.runelite.api.Skill;
|
import net.runelite.api.Skill;
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
public class SkillRequirement implements Requirement
|
public class SkillRequirement implements Requirement
|
||||||
{
|
{
|
||||||
private final Skill skill;
|
private final Skill skill;
|
||||||
|
|||||||
@@ -135,12 +135,6 @@ public class AgilityPlugin extends Plugin
|
|||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private int agilityLevel;
|
private int agilityLevel;
|
||||||
|
|
||||||
@Provides
|
|
||||||
AgilityConfig getConfig(ConfigManager configManager)
|
|
||||||
{
|
|
||||||
return configManager.getConfig(AgilityConfig.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Config values
|
// Config values
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean removeDistanceCap;
|
private boolean removeDistanceCap;
|
||||||
@@ -167,8 +161,14 @@ public class AgilityPlugin extends Plugin
|
|||||||
private boolean notifyAgilityArena;
|
private boolean notifyAgilityArena;
|
||||||
private boolean showAgilityArenaTimer;
|
private boolean showAgilityArenaTimer;
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
AgilityConfig getConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(AgilityConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ public class AgilityPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
eventBus.unregister(MENU_SUBS);
|
eventBus.unregister(MENU_SUBS);
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ public class AgilityPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateConfig()
|
private void updateConfig()
|
||||||
{
|
{
|
||||||
this.removeDistanceCap = config.removeDistanceCap();
|
this.removeDistanceCap = config.removeDistanceCap();
|
||||||
this.showLapCount = config.showLapCount();
|
this.showLapCount = config.showLapCount();
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
package net.runelite.client.plugins.agility;
|
package net.runelite.client.plugins.agility;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
@@ -32,8 +33,8 @@ import net.runelite.api.Experience;
|
|||||||
import net.runelite.api.Skill;
|
import net.runelite.api.Skill;
|
||||||
import net.runelite.api.VarPlayer;
|
import net.runelite.api.VarPlayer;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Setter
|
@Setter(AccessLevel.PACKAGE)
|
||||||
class AgilitySession
|
class AgilitySession
|
||||||
{
|
{
|
||||||
private final Courses course;
|
private final Courses course;
|
||||||
|
|||||||
@@ -70,6 +70,12 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class HydraPlugin extends Plugin
|
public class HydraPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
private static final int[] HYDRA_REGIONS = {
|
||||||
|
5279, 5280,
|
||||||
|
5535, 5536
|
||||||
|
};
|
||||||
|
private static final int STUN_LENGTH = 7;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private Map<LocalPoint, Projectile> poisonProjectiles = new HashMap<>();
|
private Map<LocalPoint, Projectile> poisonProjectiles = new HashMap<>();
|
||||||
|
|
||||||
@@ -88,12 +94,6 @@ public class HydraPlugin extends Plugin
|
|||||||
private boolean inHydraInstance;
|
private boolean inHydraInstance;
|
||||||
private int lastAttackTick;
|
private int lastAttackTick;
|
||||||
|
|
||||||
private static final int[] HYDRA_REGIONS = {
|
|
||||||
5279, 5280,
|
|
||||||
5535, 5536
|
|
||||||
};
|
|
||||||
private static final int STUN_LENGTH = 7;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class AmmoPlugin extends Plugin
|
|||||||
private AmmoCounter counterBox;
|
private AmmoCounter counterBox;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
|
|
||||||
clientThread.invokeLater(() ->
|
clientThread.invokeLater(() ->
|
||||||
@@ -79,7 +79,7 @@ public class AmmoPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
infoBoxManager.removeInfoBox(counterBox);
|
infoBoxManager.removeInfoBox(counterBox);
|
||||||
counterBox = null;
|
counterBox = null;
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ public class AnimationSmoothingPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
client.setInterpolatePlayerAnimations(false);
|
client.setInterpolatePlayerAnimations(false);
|
||||||
client.setInterpolateNpcAnimations(false);
|
client.setInterpolateNpcAnimations(false);
|
||||||
|
|||||||
@@ -74,20 +74,74 @@ public class AntiDragPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private KeyManager keyManager;
|
private KeyManager keyManager;
|
||||||
|
|
||||||
@Provides
|
|
||||||
AntiDragConfig getConfig(ConfigManager configManager)
|
|
||||||
{
|
|
||||||
return configManager.getConfig(AntiDragConfig.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean toggleDrag;
|
private boolean toggleDrag;
|
||||||
private boolean configOverlay;
|
private boolean configOverlay;
|
||||||
private boolean changeCursor;
|
private boolean changeCursor;
|
||||||
private CustomCursor selectedCursor;
|
private CustomCursor selectedCursor;
|
||||||
private Keybind key;
|
private Keybind key;
|
||||||
|
|
||||||
|
private final HotkeyListener toggleListener = new HotkeyListener(() -> this.key)
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void hotkeyPressed()
|
||||||
|
{
|
||||||
|
toggleDrag = !toggleDrag;
|
||||||
|
if (toggleDrag)
|
||||||
|
{
|
||||||
|
if (configOverlay)
|
||||||
|
{
|
||||||
|
overlayManager.add(overlay);
|
||||||
|
}
|
||||||
|
if (changeCursor)
|
||||||
|
{
|
||||||
|
clientUI.setCursor(selectedCursor.getCursorImage(), selectedCursor.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
client.setInventoryDragDelay(config.dragDelay());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
overlayManager.remove(overlay);
|
||||||
|
client.setInventoryDragDelay(DEFAULT_DELAY);
|
||||||
|
clientUI.resetCursor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private final HotkeyListener holdListener = new HotkeyListener(() -> this.key)
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void hotkeyPressed()
|
||||||
|
{
|
||||||
|
if (configOverlay)
|
||||||
|
{
|
||||||
|
overlayManager.add(overlay);
|
||||||
|
}
|
||||||
|
if (changeCursor)
|
||||||
|
{
|
||||||
|
clientUI.setCursor(selectedCursor.getCursorImage(), selectedCursor.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
client.setInventoryDragDelay(config.dragDelay());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void hotkeyReleased()
|
||||||
|
{
|
||||||
|
overlayManager.remove(overlay);
|
||||||
|
client.setInventoryDragDelay(DEFAULT_DELAY);
|
||||||
|
clientUI.resetCursor();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
AntiDragConfig getConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(AntiDragConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
overlay.setColor(config.color());
|
overlay.setColor(config.color());
|
||||||
updateConfig();
|
updateConfig();
|
||||||
@@ -100,7 +154,7 @@ public class AntiDragPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
client.setInventoryDragDelay(DEFAULT_DELAY);
|
client.setInventoryDragDelay(DEFAULT_DELAY);
|
||||||
keyManager.unregisterKeyListener(holdListener);
|
keyManager.unregisterKeyListener(holdListener);
|
||||||
@@ -194,58 +248,4 @@ public class AntiDragPlugin extends Plugin
|
|||||||
keyManager.unregisterKeyListener(toggleListener);
|
keyManager.unregisterKeyListener(toggleListener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final HotkeyListener toggleListener = new HotkeyListener(() -> this.key)
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void hotkeyPressed()
|
|
||||||
{
|
|
||||||
toggleDrag = !toggleDrag;
|
|
||||||
if (toggleDrag)
|
|
||||||
{
|
|
||||||
if (configOverlay)
|
|
||||||
{
|
|
||||||
overlayManager.add(overlay);
|
|
||||||
}
|
|
||||||
if (changeCursor)
|
|
||||||
{
|
|
||||||
clientUI.setCursor(selectedCursor.getCursorImage(), selectedCursor.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
client.setInventoryDragDelay(config.dragDelay());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
overlayManager.remove(overlay);
|
|
||||||
client.setInventoryDragDelay(DEFAULT_DELAY);
|
|
||||||
clientUI.resetCursor();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private final HotkeyListener holdListener = new HotkeyListener(() -> this.key)
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void hotkeyPressed()
|
|
||||||
{
|
|
||||||
if (configOverlay)
|
|
||||||
{
|
|
||||||
overlayManager.add(overlay);
|
|
||||||
}
|
|
||||||
if (changeCursor)
|
|
||||||
{
|
|
||||||
clientUI.setCursor(selectedCursor.getCursorImage(), selectedCursor.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
client.setInventoryDragDelay(config.dragDelay());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void hotkeyReleased()
|
|
||||||
{
|
|
||||||
overlayManager.remove(overlay);
|
|
||||||
client.setInventoryDragDelay(DEFAULT_DELAY);
|
|
||||||
clientUI.resetCursor();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ package net.runelite.client.plugins.aoewarnings;
|
|||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.client.config.Config;
|
import net.runelite.client.config.Config;
|
||||||
@@ -40,7 +41,7 @@ import net.runelite.client.config.Title;
|
|||||||
@ConfigGroup("aoe")
|
@ConfigGroup("aoe")
|
||||||
public interface AoeWarningConfig extends Config
|
public interface AoeWarningConfig extends Config
|
||||||
{
|
{
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
enum FontStyle
|
enum FontStyle
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -72,30 +72,42 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class AoeWarningPlugin extends Plugin
|
public class AoeWarningPlugin extends Plugin
|
||||||
{
|
{
|
||||||
@Inject
|
|
||||||
public AoeWarningConfig config;
|
|
||||||
@Inject
|
|
||||||
private Notifier notifier;
|
|
||||||
@Inject
|
|
||||||
private OverlayManager overlayManager;
|
|
||||||
@Inject
|
|
||||||
private AoeWarningOverlay coreOverlay;
|
|
||||||
@Inject
|
|
||||||
private BombOverlay bombOverlay;
|
|
||||||
@Inject
|
|
||||||
private Client client;
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<WorldPoint> lightningTrail = new ArrayList<>();
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<GameObject> acidTrail = new ArrayList<>();
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<GameObject> crystalSpike = new ArrayList<>();
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<GameObject> wintertodtSnowFall = new ArrayList<>();
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final Set<CrystalBomb> bombs = new HashSet<>();
|
private final Set<CrystalBomb> bombs = new HashSet<>();
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final Set<ProjectileContainer> projectiles = new HashSet<>();
|
private final Set<ProjectileContainer> projectiles = new HashSet<>();
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public AoeWarningConfig config;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Notifier notifier;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AoeWarningOverlay coreOverlay;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BombOverlay bombOverlay;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Client client;
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<WorldPoint> lightningTrail = new ArrayList<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<GameObject> acidTrail = new ArrayList<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<GameObject> crystalSpike = new ArrayList<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<GameObject> wintertodtSnowFall = new ArrayList<>();
|
||||||
|
|
||||||
// Config values
|
// Config values
|
||||||
private boolean aoeNotifyAll;
|
private boolean aoeNotifyAll;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@@ -176,7 +188,7 @@ public class AoeWarningPlugin extends Plugin
|
|||||||
overlayManager.remove(coreOverlay);
|
overlayManager.remove(coreOverlay);
|
||||||
overlayManager.remove(bombOverlay);
|
overlayManager.remove(bombOverlay);
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
private void onConfigChanged(ConfigChanged event)
|
private void onConfigChanged(ConfigChanged event)
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class AttackStylesPlugin extends Plugin
|
|||||||
private int attackStyleVarbit = -1;
|
private int attackStyleVarbit = -1;
|
||||||
private int equippedWeaponTypeVarbit = -1;
|
private int equippedWeaponTypeVarbit = -1;
|
||||||
private int castingModeVarbit = -1;
|
private int castingModeVarbit = -1;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Nullable
|
@Nullable
|
||||||
private AttackStyle attackStyle;
|
private AttackStyle attackStyle;
|
||||||
private final Set<Skill> warnedSkills = new HashSet<>();
|
private final Set<Skill> warnedSkills = new HashSet<>();
|
||||||
@@ -112,7 +112,7 @@ public class AttackStylesPlugin extends Plugin
|
|||||||
boolean removeWarnedStyles;
|
boolean removeWarnedStyles;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ public class BankPlugin extends Plugin
|
|||||||
private boolean rightClickBankLoot;
|
private boolean rightClickBankLoot;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
searchString = "";
|
searchString = "";
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class ContainerCalculation
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final int newHash = hashItems(items);
|
final int newHash = hashItems(items);
|
||||||
|
|
||||||
if (containerPrices != null && hash == newHash)
|
if (containerPrices != null && hash == newHash)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -97,9 +97,9 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener, KeyLis
|
|||||||
{
|
{
|
||||||
public static final String CONFIG_GROUP = "banktags";
|
public static final String CONFIG_GROUP = "banktags";
|
||||||
public static final String TAG_SEARCH = "tag:";
|
public static final String TAG_SEARCH = "tag:";
|
||||||
private static final String EDIT_TAGS_MENU_OPTION = "Edit-tags";
|
|
||||||
public static final String ICON_SEARCH = "icon_";
|
public static final String ICON_SEARCH = "icon_";
|
||||||
public static final String VAR_TAG_SUFFIX = "*";
|
public static final String VAR_TAG_SUFFIX = "*";
|
||||||
|
private static final String EDIT_TAGS_MENU_OPTION = "Edit-tags";
|
||||||
private static final String NUMBER_REGEX = "[0-9]+(\\.[0-9]+)?[kmb]?";
|
private static final String NUMBER_REGEX = "[0-9]+(\\.[0-9]+)?[kmb]?";
|
||||||
|
|
||||||
private static final String SEARCH_BANK_INPUT_TEXT =
|
private static final String SEARCH_BANK_INPUT_TEXT =
|
||||||
@@ -112,6 +112,8 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener, KeyLis
|
|||||||
" *(((?<op>[<>=]|>=|<=) *(?<num>" + NUMBER_REGEX + "))|" +
|
" *(((?<op>[<>=]|>=|<=) *(?<num>" + NUMBER_REGEX + "))|" +
|
||||||
"((?<num1>" + NUMBER_REGEX + ") *- *(?<num2>" + NUMBER_REGEX + ")))$", Pattern.CASE_INSENSITIVE);
|
"((?<num1>" + NUMBER_REGEX + ") *- *(?<num2>" + NUMBER_REGEX + ")))$", Pattern.CASE_INSENSITIVE);
|
||||||
|
|
||||||
|
@VisibleForTesting
|
||||||
|
final Multiset<Integer> itemQuantities = HashMultiset.create();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ItemManager itemManager;
|
private ItemManager itemManager;
|
||||||
@@ -151,8 +153,6 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener, KeyLis
|
|||||||
|
|
||||||
private boolean shiftPressed = false;
|
private boolean shiftPressed = false;
|
||||||
private int nextRowIndex = 0;
|
private int nextRowIndex = 0;
|
||||||
@VisibleForTesting
|
|
||||||
Multiset<Integer> itemQuantities = HashMultiset.create();
|
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
BankTagsConfig getConfig(ConfigManager configManager)
|
BankTagsConfig getConfig(ConfigManager configManager)
|
||||||
@@ -171,6 +171,18 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener, KeyLis
|
|||||||
spriteManager.addSpriteOverrides(TabSprites.values());
|
spriteManager.addSpriteOverrides(TabSprites.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void shutDown()
|
||||||
|
{
|
||||||
|
keyManager.unregisterKeyListener(this);
|
||||||
|
mouseManager.unregisterMouseWheelListener(this);
|
||||||
|
clientThread.invokeLater(tabInterface::destroy);
|
||||||
|
spriteManager.removeSpriteOverrides(TabSprites.values());
|
||||||
|
|
||||||
|
shiftPressed = false;
|
||||||
|
itemQuantities.clear();
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
private void cleanConfig()
|
private void cleanConfig()
|
||||||
{
|
{
|
||||||
@@ -224,19 +236,7 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener, KeyLis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private boolean isSearching()
|
||||||
public void shutDown()
|
|
||||||
{
|
|
||||||
keyManager.unregisterKeyListener(this);
|
|
||||||
mouseManager.unregisterMouseWheelListener(this);
|
|
||||||
clientThread.invokeLater(tabInterface::destroy);
|
|
||||||
spriteManager.removeSpriteOverrides(TabSprites.values());
|
|
||||||
|
|
||||||
shiftPressed = false;
|
|
||||||
itemQuantities.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isSearching()
|
|
||||||
{
|
{
|
||||||
return client.getVar(VarClientInt.INPUT_TYPE) == InputType.SEARCH.getType()
|
return client.getVar(VarClientInt.INPUT_TYPE) == InputType.SEARCH.getType()
|
||||||
|| (client.getVar(VarClientInt.INPUT_TYPE) <= 0
|
|| (client.getVar(VarClientInt.INPUT_TYPE) <= 0
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import java.util.stream.Collectors;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
|
import net.runelite.api.util.Text;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import net.runelite.client.game.ItemVariationMapping;
|
import net.runelite.client.game.ItemVariationMapping;
|
||||||
@@ -45,7 +46,6 @@ import net.runelite.client.plugins.cluescrolls.clues.FairyRingClue;
|
|||||||
import net.runelite.client.plugins.cluescrolls.clues.HotColdClue;
|
import net.runelite.client.plugins.cluescrolls.clues.HotColdClue;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.MapClue;
|
import net.runelite.client.plugins.cluescrolls.clues.MapClue;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
|
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
|
||||||
import net.runelite.api.util.Text;
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class TagManager
|
public class TagManager
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public class TabInterface
|
|||||||
private final Rectangle bounds = new Rectangle();
|
private final Rectangle bounds = new Rectangle();
|
||||||
private final Rectangle canvasBounds = new Rectangle();
|
private final Rectangle canvasBounds = new Rectangle();
|
||||||
|
|
||||||
private ChatboxItemSearch searchProvider;
|
private final ChatboxItemSearch searchProvider;
|
||||||
private TagTab activeTab;
|
private TagTab activeTab;
|
||||||
private int maxTabs;
|
private int maxTabs;
|
||||||
private int currentTabIndex;
|
private int currentTabIndex;
|
||||||
@@ -302,7 +302,7 @@ public class TabInterface
|
|||||||
|
|
||||||
final Iterator<String> dataIter = Text.fromCSV(dataString).iterator();
|
final Iterator<String> dataIter = Text.fromCSV(dataString).iterator();
|
||||||
String name = dataIter.next();
|
String name = dataIter.next();
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (char c : name.toCharArray())
|
for (char c : name.toCharArray())
|
||||||
{
|
{
|
||||||
if (FILTERED_CHARS.test(c))
|
if (FILTERED_CHARS.test(c))
|
||||||
@@ -324,7 +324,7 @@ public class TabInterface
|
|||||||
|
|
||||||
while (dataIter.hasNext())
|
while (dataIter.hasNext())
|
||||||
{
|
{
|
||||||
final int itemId = Integer.valueOf(dataIter.next());
|
final int itemId = Integer.parseInt(dataIter.next());
|
||||||
tagManager.addTag(itemId, name, itemId < 0);
|
tagManager.addTag(itemId, name, itemId < 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,10 +600,10 @@ public class TabInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((event.getIdentifier() == WidgetInfo.BANK_ITEM_CONTAINER.getId()
|
if ((event.getIdentifier() == WidgetInfo.BANK_ITEM_CONTAINER.getId()
|
||||||
|| event.getIdentifier() == WidgetInfo.BANK_INVENTORY_ITEMS_CONTAINER.getId())
|
|| event.getIdentifier() == WidgetInfo.BANK_INVENTORY_ITEMS_CONTAINER.getId())
|
||||||
&& event.getMenuOpcode() == MenuOpcode.EXAMINE_ITEM_BANK_EQ
|
&& event.getMenuOpcode() == MenuOpcode.EXAMINE_ITEM_BANK_EQ
|
||||||
&& (event.getOption().equalsIgnoreCase("withdraw-x")
|
&& (event.getOption().equalsIgnoreCase("withdraw-x")
|
||||||
|| event.getOption().equalsIgnoreCase("deposit-x")))
|
|| event.getOption().equalsIgnoreCase("deposit-x")))
|
||||||
{
|
{
|
||||||
waitSearchTick = true;
|
waitSearchTick = true;
|
||||||
rememberedSearch = client.getVar(VarClientStr.INPUT_TEXT);
|
rememberedSearch = client.getVar(VarClientStr.INPUT_TEXT);
|
||||||
|
|||||||
@@ -33,12 +33,13 @@ import java.util.Optional;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
|
import net.runelite.api.util.Text;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import static net.runelite.client.plugins.banktags.BankTagsPlugin.CONFIG_GROUP;
|
import static net.runelite.client.plugins.banktags.BankTagsPlugin.CONFIG_GROUP;
|
||||||
import static net.runelite.client.plugins.banktags.BankTagsPlugin.ICON_SEARCH;
|
import static net.runelite.client.plugins.banktags.BankTagsPlugin.ICON_SEARCH;
|
||||||
import net.runelite.api.util.Text;
|
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
@@ -46,7 +47,7 @@ class TabManager
|
|||||||
{
|
{
|
||||||
private static final String TAG_TABS_CONFIG = "tagtabs";
|
private static final String TAG_TABS_CONFIG = "tagtabs";
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final List<TagTab> tabs = new ArrayList<>();
|
private final List<TagTab> tabs = new ArrayList<>();
|
||||||
private final ConfigManager configManager;
|
private final ConfigManager configManager;
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.banktags.tabs;
|
package net.runelite.client.plugins.banktags.tabs;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.runelite.client.game.SpriteOverride;
|
import net.runelite.client.game.SpriteOverride;
|
||||||
@@ -39,9 +40,9 @@ public enum TabSprites implements SpriteOverride
|
|||||||
DOWN_ARROW(-204, "down-arrow.png"),
|
DOWN_ARROW(-204, "down-arrow.png"),
|
||||||
NEW_TAB(-205, "new-tab.png");
|
NEW_TAB(-205, "new-tab.png");
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private final int spriteId;
|
private final int spriteId;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private final String fileName;
|
private final String fileName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class BanListPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ public class BanListPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
|
|
||||||
wdrScamSet.clear();
|
wdrScamSet.clear();
|
||||||
|
|||||||
@@ -55,10 +55,10 @@ class AboveSceneOverlay extends Overlay
|
|||||||
private static final int EGG_DIAMETER = Perspective.LOCAL_HALF_TILE_SIZE / 4;
|
private static final int EGG_DIAMETER = Perspective.LOCAL_HALF_TILE_SIZE / 4;
|
||||||
private static final Color HEALTH_BAR_COLOR = new Color(225, 35, 0, 125);
|
private static final Color HEALTH_BAR_COLOR = new Color(225, 35, 0, 125);
|
||||||
private static final ImmutableMap<WidgetInfo, Point> TEAMMATES = ImmutableMap.of(
|
private static final ImmutableMap<WidgetInfo, Point> TEAMMATES = ImmutableMap.of(
|
||||||
WidgetInfo.BA_HEAL_TEAMMATE1, new Point(28, 2),
|
WidgetInfo.BA_HEAL_TEAMMATE1, new Point(28, 2),
|
||||||
WidgetInfo.BA_HEAL_TEAMMATE2, new Point(26, 2),
|
WidgetInfo.BA_HEAL_TEAMMATE2, new Point(26, 2),
|
||||||
WidgetInfo.BA_HEAL_TEAMMATE3, new Point(26, 2),
|
WidgetInfo.BA_HEAL_TEAMMATE3, new Point(26, 2),
|
||||||
WidgetInfo.BA_HEAL_TEAMMATE4, new Point(25, 2));
|
WidgetInfo.BA_HEAL_TEAMMATE4, new Point(25, 2));
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final BarbarianAssaultPlugin game;
|
private final BarbarianAssaultPlugin game;
|
||||||
@@ -123,9 +123,9 @@ class AboveSceneOverlay extends Overlay
|
|||||||
|
|
||||||
graphics.setColor(HEALTH_BAR_COLOR);
|
graphics.setColor(HEALTH_BAR_COLOR);
|
||||||
graphics.fillRect((widget.getCanvasLocation().getX() - teammate.getValue().getX()),
|
graphics.fillRect((widget.getCanvasLocation().getX() - teammate.getValue().getX()),
|
||||||
(widget.getCanvasLocation().getY() - teammate.getValue().getY()),
|
(widget.getCanvasLocation().getY() - teammate.getValue().getY()),
|
||||||
getBarWidth(Integer.parseInt(teammateHealth[1]), Integer.parseInt(teammateHealth[0])),
|
getBarWidth(Integer.parseInt(teammateHealth[1]), Integer.parseInt(teammateHealth[0])),
|
||||||
HEALTH_BAR_HEIGHT);
|
HEALTH_BAR_HEIGHT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ public interface BarbarianAssaultConfig extends Config
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "showTimer",
|
keyName = "showTimer",
|
||||||
name = "Show call change timer",
|
name = "Show call change timer",
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class BarbarianAssaultMenu
|
|||||||
void clearHiddenMenus()
|
void clearHiddenMenus()
|
||||||
{
|
{
|
||||||
// Clears menus from MenuManager and tracker
|
// Clears menus from MenuManager and tracker
|
||||||
for (Iterator<AbstractComparableEntry> iterator = tracker.iterator(); iterator.hasNext();)
|
for (Iterator<AbstractComparableEntry> iterator = tracker.iterator(); iterator.hasNext(); )
|
||||||
{
|
{
|
||||||
menuManager.removeHiddenEntry(iterator.next());
|
menuManager.removeHiddenEntry(iterator.next());
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
@@ -118,7 +118,7 @@ class BarbarianAssaultMenu
|
|||||||
|
|
||||||
case BLOCK_PENANCE_CAVE:
|
case BLOCK_PENANCE_CAVE:
|
||||||
return ((role != Role.DEFENDER && role != null) && game.isRemoveUnusedMenus())
|
return ((role != Role.DEFENDER && role != null) && game.isRemoveUnusedMenus())
|
||||||
|| (role == Role.DEFENDER && game.isRemovePenanceCave());
|
|| (role == Role.DEFENDER && game.isRemovePenanceCave());
|
||||||
|
|
||||||
case DUNK_LAVA_CRATER:
|
case DUNK_LAVA_CRATER:
|
||||||
case FIX:
|
case FIX:
|
||||||
|
|||||||
@@ -122,6 +122,24 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener
|
|||||||
private static final ImmutableList<WidgetInfo> attackStyles = ImmutableList.of(WidgetInfo.COMBAT_STYLE_ONE,
|
private static final ImmutableList<WidgetInfo> attackStyles = ImmutableList.of(WidgetInfo.COMBAT_STYLE_ONE,
|
||||||
WidgetInfo.COMBAT_STYLE_TWO, WidgetInfo.COMBAT_STYLE_THREE, WidgetInfo.COMBAT_STYLE_FOUR);
|
WidgetInfo.COMBAT_STYLE_TWO, WidgetInfo.COMBAT_STYLE_THREE, WidgetInfo.COMBAT_STYLE_FOUR);
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private final Map<WorldPoint, Integer> redEggs = new HashMap<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private final Map<WorldPoint, Integer> greenEggs = new HashMap<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private final Map<WorldPoint, Integer> blueEggs = new HashMap<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private final Map<WorldPoint, Integer> yellowEggs = new HashMap<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private final Map<Integer, Healer> healers = new HashMap<>();
|
||||||
|
|
||||||
|
private final List<TimerBox> deathTimes = new ArrayList<>();
|
||||||
|
private final Map<Integer, Projectile> projectiles = new HashMap<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@@ -155,99 +173,50 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener
|
|||||||
@Inject
|
@Inject
|
||||||
private KeyManager keyManager;
|
private KeyManager keyManager;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean inGame = false;
|
private boolean inGame = false;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Wave wave = null;
|
private Wave wave = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Role role = null;
|
private Role role = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Scorecard scorecard = null;
|
private Scorecard scorecard = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Timer gameTimer = null;
|
private Timer gameTimer = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Timer callTimer = null;
|
private Timer callTimer = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private int stage = -1;
|
private int stage = -1;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private BufferedImage clockImage;
|
private BufferedImage clockImage;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Font font = null;
|
private Font font = null;
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<WorldPoint, Integer> redEggs = new HashMap<>();
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<WorldPoint, Integer> greenEggs = new HashMap<>();
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<WorldPoint, Integer> blueEggs = new HashMap<>();
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<WorldPoint, Integer> yellowEggs = new HashMap<>();
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<Integer, Healer> healers = new HashMap<>();
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private String lastCallText = null;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private String lastListenText = null;
|
|
||||||
|
|
||||||
// private String lastClickedTell = null;
|
// private String lastClickedTell = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private String lastCallText = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private String lastListenText = null;
|
||||||
private int lastCallColor = -1;
|
private int lastCallColor = -1;
|
||||||
|
|
||||||
private int lastInteracted = -1;
|
private int lastInteracted = -1;
|
||||||
|
|
||||||
private int lastHealerPoisoned = -1;
|
|
||||||
|
|
||||||
private int tickNum = 0;
|
|
||||||
|
|
||||||
// private int gameTick = -1;
|
// private int gameTick = -1;
|
||||||
|
private int lastHealerPoisoned = -1;
|
||||||
|
private int tickNum = 0;
|
||||||
private int inGameBit = 0;
|
private int inGameBit = 0;
|
||||||
|
|
||||||
private boolean syncd = true;
|
private boolean syncd = true;
|
||||||
|
|
||||||
private boolean tickReset = false;
|
private boolean tickReset = false;
|
||||||
|
|
||||||
private boolean hornCalled = false;
|
private boolean hornCalled = false;
|
||||||
|
|
||||||
private boolean hornListened = false;
|
private boolean hornListened = false;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private boolean usingGloryHorn = false;
|
private boolean usingGloryHorn = false;
|
||||||
|
|
||||||
private boolean shiftDown = false;
|
private boolean shiftDown = false;
|
||||||
|
|
||||||
private boolean controlDown = false;
|
private boolean controlDown = false;
|
||||||
|
|
||||||
private BufferedImage torsoImage, fighterImage, healerImage, rangerImage, runnerImage;
|
private BufferedImage torsoImage, fighterImage, healerImage, rangerImage, runnerImage;
|
||||||
|
|
||||||
private final List<TimerBox> deathTimes = new ArrayList<>();
|
|
||||||
|
|
||||||
private final Map<Integer, Projectile> projectiles = new HashMap<>();
|
|
||||||
|
|
||||||
private TimerBox tickCounter;
|
private TimerBox tickCounter;
|
||||||
|
|
||||||
private String poisonUsed = null;
|
private String poisonUsed = null;
|
||||||
|
|
||||||
@Provides
|
|
||||||
BarbarianAssaultConfig provideConfig(ConfigManager configManager)
|
|
||||||
{
|
|
||||||
return configManager.getConfig(BarbarianAssaultConfig.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
// save config values
|
// save config values
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean swapLadder;
|
private boolean swapLadder;
|
||||||
@@ -302,8 +271,14 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener
|
|||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean showEggCountOverlay;
|
private boolean showEggCountOverlay;
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
BarbarianAssaultConfig provideConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(BarbarianAssaultConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -321,7 +296,7 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(widgetsOverlay);
|
overlayManager.remove(widgetsOverlay);
|
||||||
overlayManager.remove(sceneOverlay);
|
overlayManager.remove(sceneOverlay);
|
||||||
@@ -343,7 +318,7 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener
|
|||||||
menu.clearHiddenMenus();
|
menu.clearHiddenMenus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void keyTyped(KeyEvent e)
|
public void keyTyped(KeyEvent e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -399,7 +374,7 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener
|
|||||||
case "swapLadder":
|
case "swapLadder":
|
||||||
case "swapCollectorBag":
|
case "swapCollectorBag":
|
||||||
case "swapDestroyEggs":
|
case "swapDestroyEggs":
|
||||||
if (Boolean.valueOf(configChanged.getNewValue()))
|
if (Boolean.parseBoolean(configChanged.getNewValue()))
|
||||||
{
|
{
|
||||||
menu.enableSwaps();
|
menu.enableSwaps();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,17 +40,17 @@ class Healer
|
|||||||
{
|
{
|
||||||
@Getter(AccessLevel.NONE)
|
@Getter(AccessLevel.NONE)
|
||||||
private static final List<List<int[]>> CODES = ImmutableList.of(
|
private static final List<List<int[]>> CODES = ImmutableList.of(
|
||||||
// ImmutableList.of(firstCallFood, secondCallFood, lastFoodTime),
|
// ImmutableList.of(firstCallFood, secondCallFood, lastFoodTime),
|
||||||
ImmutableList.of(new int[]{1, 1}, new int[]{0, 0}, new int[]{0, 0}),
|
ImmutableList.of(new int[]{1, 1}, new int[]{0, 0}, new int[]{0, 0}),
|
||||||
ImmutableList.of(new int[]{1, 1, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 21}),
|
ImmutableList.of(new int[]{1, 1, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 21}),
|
||||||
ImmutableList.of(new int[]{1, 6, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 0}),
|
ImmutableList.of(new int[]{1, 6, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 0}),
|
||||||
ImmutableList.of(new int[]{2, 5, 2, 0}, new int[]{0, 0, 7, 10}, new int[]{0, 0, 0, 0}),
|
ImmutableList.of(new int[]{2, 5, 2, 0}, new int[]{0, 0, 7, 10}, new int[]{0, 0, 0, 0}),
|
||||||
ImmutableList.of(new int[]{2, 5, 2, 3, 0}, new int[]{0, 0, 0, 0, 7}, new int[]{0, 0, 21, 30, 0}),
|
ImmutableList.of(new int[]{2, 5, 2, 3, 0}, new int[]{0, 0, 0, 0, 7}, new int[]{0, 0, 21, 30, 0}),
|
||||||
ImmutableList.of(new int[]{3, 5, 2, 2, 0, 0}, new int[]{0, 0, 0, 2, 9, 10}, new int[]{12, 18, 21, 0, 0, 0}),
|
ImmutableList.of(new int[]{3, 5, 2, 2, 0, 0}, new int[]{0, 0, 0, 2, 9, 10}, new int[]{12, 18, 21, 0, 0, 0}),
|
||||||
ImmutableList.of(new int[]{3, 7, 1, 1, 0, 0, 0}, new int[]{2, 0, 1, 1, 2, 4, 10}, new int[]{0, 21, 0, 0, 30, 45, 0}),
|
ImmutableList.of(new int[]{3, 7, 1, 1, 0, 0, 0}, new int[]{2, 0, 1, 1, 2, 4, 10}, new int[]{0, 21, 0, 0, 30, 45, 0}),
|
||||||
ImmutableList.of(new int[]{1, 9, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 2, 10}, new int[]{0, 0, 0, 0, 33, 42, 0}),
|
ImmutableList.of(new int[]{1, 9, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 2, 10}, new int[]{0, 0, 0, 0, 33, 42, 0}),
|
||||||
ImmutableList.of(new int[]{2, 8, 1, 1, 0, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 1, 1, 10}, new int[]{0, 21, 0, 0, 0, 0, 0, 0, 0}),
|
ImmutableList.of(new int[]{2, 8, 1, 1, 0, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 1, 1, 10}, new int[]{0, 21, 0, 0, 0, 0, 0, 0, 0}),
|
||||||
ImmutableList.of(new int[]{2, 5, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 4, 4, 8}, new int[]{21, 33, 0, 33, 30, 45, 0}));
|
ImmutableList.of(new int[]{2, 5, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 4, 4, 8}, new int[]{21, 33, 0, 33, 30, 45, 0}));
|
||||||
|
|
||||||
private final NPC npc;
|
private final NPC npc;
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ class Healer
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
long time = Duration.between(timeLastPoisoned, Instant.now()).getSeconds();
|
long time = Duration.between(timeLastPoisoned, Instant.now()).getSeconds();
|
||||||
return time > 20 ? 0 : (int)(20 - time);
|
return time > 20 ? 0 : (int) (20 - time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
package net.runelite.client.plugins.barbarianassault;
|
package net.runelite.client.plugins.barbarianassault;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.MenuOpcode;
|
import net.runelite.api.MenuOpcode;
|
||||||
@@ -86,10 +87,10 @@ public enum Menus
|
|||||||
MEDIC_HORN(null, newBaseComparableEntry("medic", "r horn", -1, -1, true, false)),
|
MEDIC_HORN(null, newBaseComparableEntry("medic", "r horn", -1, -1, true, false)),
|
||||||
USE_HORN(null, newBaseComparableEntry("use", "r horn", -1, -1, true, false));
|
USE_HORN(null, newBaseComparableEntry("use", "r horn", -1, -1, true, false));
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final Role role;
|
private final Role role;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final BaseComparableEntry entry;
|
private final BaseComparableEntry entry;
|
||||||
|
|
||||||
private static final ImmutableSet<Menus> ALL = ImmutableSet.copyOf(Menus.values());
|
private static final ImmutableSet<Menus> ALL = ImmutableSet.copyOf(Menus.values());
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
package net.runelite.client.plugins.barbarianassault;
|
package net.runelite.client.plugins.barbarianassault;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
@@ -39,90 +40,90 @@ import net.runelite.api.widgets.WidgetInfo;
|
|||||||
enum Role
|
enum Role
|
||||||
{
|
{
|
||||||
ATTACKER(WidgetInfo.BA_ATK_WAVE_TEXT, WidgetInfo.BA_ATK_LISTEN_TOP_TEXT, WidgetInfo.BA_ATK_HORN_LISTEN_TEXT,
|
ATTACKER(WidgetInfo.BA_ATK_WAVE_TEXT, WidgetInfo.BA_ATK_LISTEN_TOP_TEXT, WidgetInfo.BA_ATK_HORN_LISTEN_TEXT,
|
||||||
WidgetInfo.BA_ATK_CALL_TEXT, WidgetInfo.BA_COLL_HORN_LISTEN_TEXT, WidgetInfo.BA_ATK_ROLE_TEXT,
|
WidgetInfo.BA_ATK_CALL_TEXT, WidgetInfo.BA_COLL_HORN_LISTEN_TEXT, WidgetInfo.BA_ATK_ROLE_TEXT,
|
||||||
WidgetInfo.BA_ATK_ROLE_SPRITE),
|
WidgetInfo.BA_ATK_ROLE_SPRITE),
|
||||||
DEFENDER(WidgetInfo.BA_DEF_WAVE_TEXT, WidgetInfo.BA_DEF_LISTEN_TEXT, WidgetInfo.BA_DEF_HORN_LISTEN_TEXT,
|
DEFENDER(WidgetInfo.BA_DEF_WAVE_TEXT, WidgetInfo.BA_DEF_LISTEN_TEXT, WidgetInfo.BA_DEF_HORN_LISTEN_TEXT,
|
||||||
WidgetInfo.BA_DEF_CALL_TEXT, WidgetInfo.BA_HEAL_HORN_LISTEN_TEXT, WidgetInfo.BA_DEF_ROLE_TEXT,
|
WidgetInfo.BA_DEF_CALL_TEXT, WidgetInfo.BA_HEAL_HORN_LISTEN_TEXT, WidgetInfo.BA_DEF_ROLE_TEXT,
|
||||||
WidgetInfo.BA_DEF_ROLE_SPRITE),
|
WidgetInfo.BA_DEF_ROLE_SPRITE),
|
||||||
COLLECTOR(WidgetInfo.BA_COLL_WAVE_TEXT, WidgetInfo.BA_COLL_LISTEN_TEXT, WidgetInfo.BA_COLL_HORN_LISTEN_TEXT,
|
COLLECTOR(WidgetInfo.BA_COLL_WAVE_TEXT, WidgetInfo.BA_COLL_LISTEN_TEXT, WidgetInfo.BA_COLL_HORN_LISTEN_TEXT,
|
||||||
WidgetInfo.BA_COLL_CALL_TEXT, WidgetInfo.BA_ATK_HORN_LISTEN_TEXT, WidgetInfo.BA_COLL_ROLE_TEXT,
|
WidgetInfo.BA_COLL_CALL_TEXT, WidgetInfo.BA_ATK_HORN_LISTEN_TEXT, WidgetInfo.BA_COLL_ROLE_TEXT,
|
||||||
WidgetInfo.BA_COLL_ROLE_SPRITE),
|
WidgetInfo.BA_COLL_ROLE_SPRITE),
|
||||||
HEALER(WidgetInfo.BA_HEAL_WAVE_TEXT, WidgetInfo.BA_HEAL_LISTEN_TEXT, WidgetInfo.BA_DEF_HORN_LISTEN_TEXT,
|
HEALER(WidgetInfo.BA_HEAL_WAVE_TEXT, WidgetInfo.BA_HEAL_LISTEN_TEXT, WidgetInfo.BA_DEF_HORN_LISTEN_TEXT,
|
||||||
WidgetInfo.BA_HEAL_CALL_TEXT, WidgetInfo.BA_DEF_HORN_LISTEN_TEXT, WidgetInfo.BA_HEAL_ROLE_TEXT,
|
WidgetInfo.BA_HEAL_CALL_TEXT, WidgetInfo.BA_DEF_HORN_LISTEN_TEXT, WidgetInfo.BA_HEAL_ROLE_TEXT,
|
||||||
WidgetInfo.BA_HEAL_ROLE_SPRITE);
|
WidgetInfo.BA_HEAL_ROLE_SPRITE);
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo wave;
|
private final WidgetInfo wave;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo listen;
|
private final WidgetInfo listen;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo gloryListen;
|
private final WidgetInfo gloryListen;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo call;
|
private final WidgetInfo call;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo gloryCall;
|
private final WidgetInfo gloryCall;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo roleText;
|
private final WidgetInfo roleText;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo roleSprite;
|
private final WidgetInfo roleSprite;
|
||||||
|
|
||||||
// Duplicate* entries are to catch instances where the horn of glory has
|
// Duplicate* entries are to catch instances where the horn of glory has
|
||||||
// text different than the normal horn
|
// text different than the normal horn
|
||||||
private static final ImmutableMap<String, String> TELLS = ImmutableMap.<String, String>builder()
|
private static final ImmutableMap<String, String> TELLS = ImmutableMap.<String, String>builder()
|
||||||
.put("Red egg", "Tell-red")
|
.put("Red egg", "Tell-red")
|
||||||
.put("Green egg", "Tell-green")
|
.put("Green egg", "Tell-green")
|
||||||
.put("Blue egg", "Tell-blue")
|
.put("Blue egg", "Tell-blue")
|
||||||
.put("Controlled/Bullet/Wind", "Tell-controlled")
|
.put("Controlled/Bullet/Wind", "Tell-controlled")
|
||||||
.put("Accurate/Field/Water", "Tell-accurate")
|
.put("Accurate/Field/Water", "Tell-accurate")
|
||||||
.put("Aggressive/Blunt/Earth", "Tell-aggressive")
|
.put("Aggressive/Blunt/Earth", "Tell-aggressive")
|
||||||
.put("Defensive/Barbed/Fire", "Tell-defensive")
|
.put("Defensive/Barbed/Fire", "Tell-defensive")
|
||||||
.put("Tofu", "Tell-tofu")
|
.put("Tofu", "Tell-tofu")
|
||||||
.put("Crackers", "Tell-crackers")
|
.put("Crackers", "Tell-crackers")
|
||||||
.put("Worms", "Tell-worms")
|
.put("Worms", "Tell-worms")
|
||||||
.put("Poison Worms", "Tell-worms")
|
.put("Poison Worms", "Tell-worms")
|
||||||
.put("Pois. Worms", "Tell-worms")
|
.put("Pois. Worms", "Tell-worms")
|
||||||
.put("Poison Tofu", "Tell-tofu")
|
.put("Poison Tofu", "Tell-tofu")
|
||||||
.put("Pois. Tofu", "Tell-tofu")
|
.put("Pois. Tofu", "Tell-tofu")
|
||||||
.put("Poison Meat", "Tell-meat")
|
.put("Poison Meat", "Tell-meat")
|
||||||
.put("Pois. Meat", "Tell-meat")
|
.put("Pois. Meat", "Tell-meat")
|
||||||
.build();
|
.build();
|
||||||
private static final ImmutableMap<String, String> GLORY_CALLS = ImmutableMap.<String, String>builder()
|
private static final ImmutableMap<String, String> GLORY_CALLS = ImmutableMap.<String, String>builder()
|
||||||
.put("Controlled/Bullet/Wind", "Controlled/")
|
.put("Controlled/Bullet/Wind", "Controlled/")
|
||||||
.put("Accurate/Field/Water", "Accurate/")
|
.put("Accurate/Field/Water", "Accurate/")
|
||||||
.put("Aggressive/Blunt/Earth", "Aggressive/")
|
.put("Aggressive/Blunt/Earth", "Aggressive/")
|
||||||
.put("Defensive/Barbed/Fire", "Defensive/")
|
.put("Defensive/Barbed/Fire", "Defensive/")
|
||||||
.put("Tofu", "Tofu")
|
.put("Tofu", "Tofu")
|
||||||
.put("Crackers", "Crackers")
|
.put("Crackers", "Crackers")
|
||||||
.put("Worms", "Worms")
|
.put("Worms", "Worms")
|
||||||
.put("Poison worms", "Pois. Worms")
|
.put("Poison worms", "Pois. Worms")
|
||||||
.put("Poison tofu", "Pois. Tofu")
|
.put("Poison tofu", "Pois. Tofu")
|
||||||
.put("Poison meat", "Pois. Meat")
|
.put("Poison meat", "Pois. Meat")
|
||||||
.put("Red egg", "Red egg")
|
.put("Red egg", "Red egg")
|
||||||
.put("Green egg", "Green egg")
|
.put("Green egg", "Green egg")
|
||||||
.put("Blue egg", "Blue egg")
|
.put("Blue egg", "Blue egg")
|
||||||
.build();
|
.build();
|
||||||
private static final ImmutableMap<String, Integer> ITEMS = ImmutableMap.<String, Integer>builder()
|
private static final ImmutableMap<String, Integer> ITEMS = ImmutableMap.<String, Integer>builder()
|
||||||
.put("Tofu", ItemID.TOFU)
|
.put("Tofu", ItemID.TOFU)
|
||||||
.put("Crackers", ItemID.CRACKERS)
|
.put("Crackers", ItemID.CRACKERS)
|
||||||
.put("Worms", ItemID.WORMS)
|
.put("Worms", ItemID.WORMS)
|
||||||
.put("Pois. Worms", ItemID.POISONED_WORMS)
|
.put("Pois. Worms", ItemID.POISONED_WORMS)
|
||||||
.put("Pois. Tofu", ItemID.POISONED_TOFU)
|
.put("Pois. Tofu", ItemID.POISONED_TOFU)
|
||||||
.put("Pois. Meat", ItemID.POISONED_MEAT)
|
.put("Pois. Meat", ItemID.POISONED_MEAT)
|
||||||
.put("Defensive/", ItemID.BARBED_ARROW)
|
.put("Defensive/", ItemID.BARBED_ARROW)
|
||||||
.put("Aggressive/", ItemID.BLUNT_ARROW)
|
.put("Aggressive/", ItemID.BLUNT_ARROW)
|
||||||
.put("Accurate/", ItemID.FIELD_ARROW)
|
.put("Accurate/", ItemID.FIELD_ARROW)
|
||||||
.put("Controlled/", ItemID.BULLET_ARROW)
|
.put("Controlled/", ItemID.BULLET_ARROW)
|
||||||
.build();
|
.build();
|
||||||
private static final ImmutableMap<String, String> SPLIT_LISTENS = ImmutableMap.<String, String>builder()
|
private static final ImmutableMap<String, String> SPLIT_LISTENS = ImmutableMap.<String, String>builder()
|
||||||
.put("Controlled/", "Bullet/Wind")
|
.put("Controlled/", "Bullet/Wind")
|
||||||
.put("Bullet/Wind", "Controlled/")
|
.put("Bullet/Wind", "Controlled/")
|
||||||
.put("Accurate/", "Field/Water")
|
.put("Accurate/", "Field/Water")
|
||||||
.put("Field/Water", "Accurate/")
|
.put("Field/Water", "Accurate/")
|
||||||
.put("Aggressive/", "Blunt/Earth")
|
.put("Aggressive/", "Blunt/Earth")
|
||||||
.put("Blunt/Earth", "Aggressive/")
|
.put("Blunt/Earth", "Aggressive/")
|
||||||
.put("Defensive/", "Barbed/Fire")
|
.put("Defensive/", "Barbed/Fire")
|
||||||
.put("Barbed/Fire", "Defensive/")
|
.put("Barbed/Fire", "Defensive/")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
||||||
int getListenItem(String listen)
|
int getListenItem(String listen)
|
||||||
|
|||||||
@@ -41,31 +41,31 @@ public class Wave
|
|||||||
{
|
{
|
||||||
@Getter(AccessLevel.NONE)
|
@Getter(AccessLevel.NONE)
|
||||||
private static final ImmutableList<WidgetInfo> WIDGETS = ImmutableList.of(
|
private static final ImmutableList<WidgetInfo> WIDGETS = ImmutableList.of(
|
||||||
WidgetInfo.BA_FAILED_ATTACKER_ATTACKS,
|
WidgetInfo.BA_FAILED_ATTACKER_ATTACKS,
|
||||||
WidgetInfo.BA_RUNNERS_PASSED,
|
WidgetInfo.BA_RUNNERS_PASSED,
|
||||||
WidgetInfo.BA_EGGS_COLLECTED,
|
WidgetInfo.BA_EGGS_COLLECTED,
|
||||||
WidgetInfo.BA_HITPOINTS_REPLENISHED,
|
WidgetInfo.BA_HITPOINTS_REPLENISHED,
|
||||||
WidgetInfo.BA_WRONG_POISON_PACKS,
|
WidgetInfo.BA_WRONG_POISON_PACKS,
|
||||||
WidgetInfo.BA_HONOUR_POINTS_REWARD
|
WidgetInfo.BA_HONOUR_POINTS_REWARD
|
||||||
);
|
);
|
||||||
|
|
||||||
@Getter(AccessLevel.NONE)
|
@Getter(AccessLevel.NONE)
|
||||||
private static final ImmutableList<WidgetInfo> POINTSWIDGETS = ImmutableList.of(
|
private static final ImmutableList<WidgetInfo> POINTSWIDGETS = ImmutableList.of(
|
||||||
//Base
|
//Base
|
||||||
WidgetInfo.BA_BASE_POINTS,
|
WidgetInfo.BA_BASE_POINTS,
|
||||||
//Attacker
|
//Attacker
|
||||||
WidgetInfo.BA_FAILED_ATTACKER_ATTACKS_POINTS,
|
WidgetInfo.BA_FAILED_ATTACKER_ATTACKS_POINTS,
|
||||||
WidgetInfo.BA_RANGERS_KILLED,
|
WidgetInfo.BA_RANGERS_KILLED,
|
||||||
WidgetInfo.BA_FIGHTERS_KILLED,
|
WidgetInfo.BA_FIGHTERS_KILLED,
|
||||||
//Defender
|
//Defender
|
||||||
WidgetInfo.BA_RUNNERS_PASSED_POINTS,
|
WidgetInfo.BA_RUNNERS_PASSED_POINTS,
|
||||||
WidgetInfo.BA_RUNNERS_KILLED,
|
WidgetInfo.BA_RUNNERS_KILLED,
|
||||||
//Collector
|
//Collector
|
||||||
WidgetInfo.BA_EGGS_COLLECTED_POINTS,
|
WidgetInfo.BA_EGGS_COLLECTED_POINTS,
|
||||||
//Healer
|
//Healer
|
||||||
WidgetInfo.BA_HEALERS_KILLED,
|
WidgetInfo.BA_HEALERS_KILLED,
|
||||||
WidgetInfo.BA_HITPOINTS_REPLENISHED_POINTS,
|
WidgetInfo.BA_HITPOINTS_REPLENISHED_POINTS,
|
||||||
WidgetInfo.BA_WRONG_POISON_PACKS_POINTS
|
WidgetInfo.BA_WRONG_POISON_PACKS_POINTS
|
||||||
);
|
);
|
||||||
|
|
||||||
@Getter(AccessLevel.NONE)
|
@Getter(AccessLevel.NONE)
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class BarrowsPlugin extends Plugin
|
|||||||
private LoopTimer barrowsPrayerDrainTimer;
|
private LoopTimer barrowsPrayerDrainTimer;
|
||||||
private boolean wasInCrypt = false;
|
private boolean wasInCrypt = false;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private Widget puzzleAnswer;
|
private Widget puzzleAnswer;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -125,12 +125,6 @@ public class BarrowsPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private BarrowsConfig config;
|
private BarrowsConfig config;
|
||||||
|
|
||||||
@Provides
|
|
||||||
BarrowsConfig provideConfig(ConfigManager configManager)
|
|
||||||
{
|
|
||||||
return configManager.getConfig(BarrowsConfig.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean showMinimap;
|
private boolean showMinimap;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@@ -143,8 +137,14 @@ public class BarrowsPlugin extends Plugin
|
|||||||
private boolean showPuzzleAnswer;
|
private boolean showPuzzleAnswer;
|
||||||
private boolean showPrayerDrainTimer;
|
private boolean showPrayerDrainTimer;
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
BarrowsConfig provideConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(BarrowsConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
|
|||||||
@@ -81,12 +81,16 @@ public class BlackjackPlugin extends Plugin
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private BlackjackConfig config;
|
private BlackjackConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private MenuManager menuManager;
|
private MenuManager menuManager;
|
||||||
|
|
||||||
private boolean pickpocketOnAggro;
|
private boolean pickpocketOnAggro;
|
||||||
private boolean random;
|
private boolean random;
|
||||||
private long nextKnockOutTick = 0;
|
private long nextKnockOutTick = 0;
|
||||||
@@ -98,7 +102,7 @@ public class BlackjackPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
menuManager.addPriorityEntry(KNOCKOUT_BANDIT);
|
menuManager.addPriorityEntry(KNOCKOUT_BANDIT);
|
||||||
menuManager.addPriorityEntry(KNOCKOUT_MENAPHITE);
|
menuManager.addPriorityEntry(KNOCKOUT_MENAPHITE);
|
||||||
@@ -106,7 +110,7 @@ public class BlackjackPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
menuManager.removePriorityEntry(PICKPOCKET_BANDIT);
|
menuManager.removePriorityEntry(PICKPOCKET_BANDIT);
|
||||||
menuManager.removePriorityEntry(PICKPOCKET_MENAPHITE);
|
menuManager.removePriorityEntry(PICKPOCKET_MENAPHITE);
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ package net.runelite.client.plugins.blastfurnace;
|
|||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import net.runelite.api.Varbits;
|
import net.runelite.api.Varbits;
|
||||||
@@ -64,9 +65,9 @@ public enum BarsOres
|
|||||||
VARBIT = builder.build();
|
VARBIT = builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final Varbits varbit;
|
private final Varbits varbit;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final int itemID;
|
private final int itemID;
|
||||||
|
|
||||||
BarsOres(Varbits varbit, int itemID)
|
BarsOres(Varbits varbit, int itemID)
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
|||||||
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
|
||||||
import net.runelite.client.ui.overlay.components.table.TableAlignment;
|
import net.runelite.client.ui.overlay.components.table.TableAlignment;
|
||||||
|
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
||||||
import net.runelite.client.util.QuantityFormatter;
|
import net.runelite.client.util.QuantityFormatter;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class BlastFurnacePlugin extends Plugin
|
|||||||
private boolean showBarDispenser;
|
private boolean showBarDispenser;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ public class BlastFurnacePlugin extends Plugin
|
|||||||
foremanTimer = null;
|
foremanTimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
BlastFurnaceConfig provideConfig(ConfigManager configManager)
|
BlastFurnaceConfig provideConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
return configManager.getConfig(BlastFurnaceConfig.class);
|
return configManager.getConfig(BlastFurnaceConfig.class);
|
||||||
|
|||||||
@@ -73,12 +73,6 @@ public class BlastMinePlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private BlastMinePluginConfig config;
|
private BlastMinePluginConfig config;
|
||||||
|
|
||||||
@Provides
|
|
||||||
BlastMinePluginConfig getConfig(ConfigManager configManager)
|
|
||||||
{
|
|
||||||
return configManager.getConfig(BlastMinePluginConfig.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean showOreOverlay;
|
private boolean showOreOverlay;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@@ -92,8 +86,14 @@ public class BlastMinePlugin extends Plugin
|
|||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private Color warningColor;
|
private Color warningColor;
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
BlastMinePluginConfig getConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(BlastMinePluginConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ public class BlastMinePlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(blastMineRockOverlay);
|
overlayManager.remove(blastMineRockOverlay);
|
||||||
overlayManager.remove(blastMineOreCountOverlay);
|
overlayManager.remove(blastMineOreCountOverlay);
|
||||||
|
|||||||
@@ -73,6 +73,11 @@ public class BoostsPlugin extends Plugin
|
|||||||
Skill.COOKING, Skill.CRAFTING, Skill.FIREMAKING, Skill.FLETCHING, Skill.WOODCUTTING, Skill.RUNECRAFT,
|
Skill.COOKING, Skill.CRAFTING, Skill.FIREMAKING, Skill.FLETCHING, Skill.WOODCUTTING, Skill.RUNECRAFT,
|
||||||
Skill.SLAYER, Skill.FARMING, Skill.CONSTRUCTION, Skill.HUNTER);
|
Skill.SLAYER, Skill.FARMING, Skill.CONSTRUCTION, Skill.HUNTER);
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private final Set<Skill> shownSkills = new LinkedHashSet<>();
|
||||||
|
private final int[] lastSkillLevels = new int[Skill.values().length - 1];
|
||||||
|
private final List<String> boostedSkillsChanged = new ArrayList<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Notifier notifier;
|
private Notifier notifier;
|
||||||
|
|
||||||
@@ -88,26 +93,21 @@ public class BoostsPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private BoostsOverlay boostsOverlay;
|
private BoostsOverlay boostsOverlay;
|
||||||
|
|
||||||
//made this a LinkedHashSet so the order stays consistent for my OCD
|
|
||||||
@Getter
|
|
||||||
private final Set<Skill> shownSkills = new LinkedHashSet<>();
|
|
||||||
@Inject
|
@Inject
|
||||||
private BoostsConfig config;
|
private BoostsConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SkillIconManager skillIconManager;
|
private SkillIconManager skillIconManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CombatIconsOverlay combatIconsOverlay;
|
private CombatIconsOverlay combatIconsOverlay;
|
||||||
|
|
||||||
private boolean isChangedDown = false;
|
private boolean isChangedDown = false;
|
||||||
private boolean isChangedUp = false;
|
private boolean isChangedUp = false;
|
||||||
private final int[] lastSkillLevels = new int[Skill.values().length - 1];
|
|
||||||
private int lastChangeDown = -1;
|
private int lastChangeDown = -1;
|
||||||
private int lastChangeUp = -1;
|
private int lastChangeUp = -1;
|
||||||
private boolean preserveBeenActive = false;
|
private boolean preserveBeenActive = false;
|
||||||
private long lastTickMillis;
|
private long lastTickMillis;
|
||||||
private final List<String> boostedSkillsChanged = new ArrayList<>();
|
|
||||||
|
|
||||||
private BoostsConfig.DisplayBoosts displayBoosts;
|
private BoostsConfig.DisplayBoosts displayBoosts;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean useRelativeBoost;
|
private boolean useRelativeBoost;
|
||||||
@@ -130,7 +130,7 @@ public class BoostsPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ public class BoostsPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(boostsOverlay);
|
overlayManager.remove(boostsOverlay);
|
||||||
overlayManager.remove(combatIconsOverlay);
|
overlayManager.remove(combatIconsOverlay);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import net.runelite.api.Client;
|
|||||||
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG;
|
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG;
|
||||||
import net.runelite.api.Skill;
|
import net.runelite.api.Skill;
|
||||||
import net.runelite.client.game.SkillIconManager;
|
import net.runelite.client.game.SkillIconManager;
|
||||||
|
import net.runelite.client.ui.FontManager;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
||||||
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||||
@@ -20,7 +21,6 @@ import net.runelite.client.ui.overlay.components.ComponentOrientation;
|
|||||||
import net.runelite.client.ui.overlay.components.ImageComponent;
|
import net.runelite.client.ui.overlay.components.ImageComponent;
|
||||||
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;
|
||||||
import net.runelite.client.ui.FontManager;
|
|
||||||
import net.runelite.client.util.ColorUtil;
|
import net.runelite.client.util.ColorUtil;
|
||||||
import net.runelite.client.util.ImageUtil;
|
import net.runelite.client.util.ImageUtil;
|
||||||
|
|
||||||
|
|||||||
@@ -52,12 +52,7 @@ public class BossTimersPlugin extends Plugin
|
|||||||
private ItemManager itemManager;
|
private ItemManager itemManager;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void shutDown()
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void shutDown() throws Exception
|
|
||||||
{
|
{
|
||||||
infoBoxManager.removeIf(t -> t instanceof RespawnTimer);
|
infoBoxManager.removeIf(t -> t instanceof RespawnTimer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class BossTimeTracker extends InfoBox
|
|||||||
{
|
{
|
||||||
private final Instant startTime;
|
private final Instant startTime;
|
||||||
private LocalTime time;
|
private LocalTime time;
|
||||||
private Instant lastTime;
|
private final Instant lastTime;
|
||||||
|
|
||||||
public BossTimeTracker(BufferedImage image, BossTimeTrackerPlugin plugin, Instant startTime, Instant lastTime)
|
public BossTimeTracker(BufferedImage image, BossTimeTrackerPlugin plugin, Instant startTime, Instant lastTime)
|
||||||
{
|
{
|
||||||
@@ -80,10 +80,7 @@ public class BossTimeTracker extends InfoBox
|
|||||||
@Override
|
@Override
|
||||||
public String getTooltip()
|
public String getTooltip()
|
||||||
{
|
{
|
||||||
StringBuilder builder = new StringBuilder();
|
return "Elapsed time: " +
|
||||||
builder.append("Elapsed time: ");
|
time.format(DateTimeFormatter.ofPattern("HH:mm:ss"));
|
||||||
builder.append(time.format(DateTimeFormatter.ofPattern("HH:mm:ss")));
|
|
||||||
|
|
||||||
return builder.toString();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import java.util.Arrays;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.ChatMessageType;
|
import net.runelite.api.ChatMessageType;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
@@ -76,7 +77,7 @@ public class BossTimeTrackerPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private ConfigManager configManager;
|
private ConfigManager configManager;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private BossTimeTracker timer;
|
private BossTimeTracker timer;
|
||||||
|
|
||||||
private Instant startTime;
|
private Instant startTime;
|
||||||
@@ -84,11 +85,6 @@ public class BossTimeTrackerPlugin extends Plugin
|
|||||||
private Boolean started = false;
|
private Boolean started = false;
|
||||||
private boolean loggingIn;
|
private boolean loggingIn;
|
||||||
|
|
||||||
@Override
|
|
||||||
public void startUp()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onGameStateChanged(GameStateChanged event)
|
public void onGameStateChanged(GameStateChanged event)
|
||||||
{
|
{
|
||||||
@@ -238,14 +234,14 @@ public class BossTimeTrackerPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
removeTimer();
|
removeTimer();
|
||||||
resetConfig();
|
resetConfig();
|
||||||
resetVars();
|
resetVars();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadConfig()
|
private void loadConfig()
|
||||||
{
|
{
|
||||||
startTime = configManager.getConfiguration(CONFIG_GROUP, CONFIG_TIME, Instant.class);
|
startTime = configManager.getConfiguration(CONFIG_GROUP, CONFIG_TIME, Instant.class);
|
||||||
started = configManager.getConfiguration(CONFIG_GROUP, CONFIG_STARTED, Boolean.class);
|
started = configManager.getConfiguration(CONFIG_GROUP, CONFIG_STARTED, Boolean.class);
|
||||||
|
|||||||
@@ -2,15 +2,15 @@ package net.runelite.client.plugins.bronzeman;
|
|||||||
|
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import javax.inject.Inject;
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
@@ -60,7 +61,7 @@ public class BronzemanPlugin extends Plugin
|
|||||||
|
|
||||||
private List<Integer> unlockedItems;
|
private List<Integer> unlockedItems;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private BufferedImage unlockImage = null;
|
private BufferedImage unlockImage = null;
|
||||||
/**
|
/**
|
||||||
* Loads GrandExchange widgets for further manipulation of the interface
|
* Loads GrandExchange widgets for further manipulation of the interface
|
||||||
@@ -69,7 +70,7 @@ public class BronzemanPlugin extends Plugin
|
|||||||
private Widget grandExchangeChatBox;
|
private Widget grandExchangeChatBox;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
loadUnlockImage();
|
loadUnlockImage();
|
||||||
unlockedItems = new ArrayList<>();
|
unlockedItems = new ArrayList<>();
|
||||||
@@ -77,13 +78,13 @@ public class BronzemanPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
unlockedItems = null;
|
unlockedItems = null;
|
||||||
overlayManager.remove(bronzemanOverlay);
|
overlayManager.remove(bronzemanOverlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads players unlocks on login
|
* Loads players unlocks on login
|
||||||
**/
|
**/
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -178,7 +179,7 @@ public class BronzemanPlugin extends Plugin
|
|||||||
/**
|
/**
|
||||||
* Queues a new unlock to be properly displayed
|
* Queues a new unlock to be properly displayed
|
||||||
**/
|
**/
|
||||||
public void queueItemUnlock(int itemId)
|
private void queueItemUnlock(int itemId)
|
||||||
{
|
{
|
||||||
unlockedItems.add(itemId);
|
unlockedItems.add(itemId);
|
||||||
bronzemanOverlay.addItemUnlock(itemId);
|
bronzemanOverlay.addItemUnlock(itemId);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package net.runelite.client.plugins.bronzeman;
|
package net.runelite.client.plugins.bronzeman;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@@ -11,14 +12,14 @@ import lombok.Setter;
|
|||||||
public class ItemUnlock
|
public class ItemUnlock
|
||||||
{
|
{
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final int itemId;
|
private final int itemId;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private long initTime;
|
private long initTime;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Setter
|
@Setter(AccessLevel.PACKAGE)
|
||||||
private int locationY;
|
private int locationY;
|
||||||
|
|
||||||
ItemUnlock(int itemId)
|
ItemUnlock(int itemId)
|
||||||
|
|||||||
@@ -79,34 +79,49 @@ public class CannonPlugin extends Plugin
|
|||||||
);
|
);
|
||||||
private CannonCounter counter;
|
private CannonCounter counter;
|
||||||
private boolean skipProjectileCheckThisTick;
|
private boolean skipProjectileCheckThisTick;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private int cballsLeft;
|
private int cballsLeft;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean cannonPlaced;
|
private boolean cannonPlaced;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private WorldPoint cannonPosition;
|
private WorldPoint cannonPosition;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private GameObject cannon;
|
private GameObject cannon;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private List<WorldPoint> spotPoints = new ArrayList<>();
|
private List<WorldPoint> spotPoints = new ArrayList<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ItemManager itemManager;
|
private ItemManager itemManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private InfoBoxManager infoBoxManager;
|
private InfoBoxManager infoBoxManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Notifier notifier;
|
private Notifier notifier;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private OverlayManager overlayManager;
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CannonOverlay cannonOverlay;
|
private CannonOverlay cannonOverlay;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CannonSpotOverlay cannonSpotOverlay;
|
private CannonSpotOverlay cannonSpotOverlay;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CannonConfig config;
|
private CannonConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ClientThread clientThread;
|
private ClientThread clientThread;
|
||||||
|
|
||||||
private boolean lock;
|
private boolean lock;
|
||||||
private boolean showEmptyCannonNotification;
|
private boolean showEmptyCannonNotification;
|
||||||
private boolean showInfobox;
|
private boolean showInfobox;
|
||||||
@@ -126,7 +141,7 @@ public class CannonPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -136,7 +151,7 @@ public class CannonPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
cannonSpotOverlay.setHidden(true);
|
cannonSpotOverlay.setHidden(true);
|
||||||
overlayManager.remove(cannonOverlay);
|
overlayManager.remove(cannonOverlay);
|
||||||
@@ -271,7 +286,7 @@ public class CannonPlugin extends Plugin
|
|||||||
// counter doesn't decrease if the player has been too far away
|
// counter doesn't decrease if the player has been too far away
|
||||||
// from the cannon due to the projectiels not being in memory,
|
// from the cannon due to the projectiels not being in memory,
|
||||||
// so our counter can be higher than it is supposed to be.
|
// so our counter can be higher than it is supposed to be.
|
||||||
int amt = Integer.valueOf(m.group());
|
int amt = Integer.parseInt(m.group());
|
||||||
if (cballsLeft + amt >= MAX_CBALLS)
|
if (cballsLeft + amt >= MAX_CBALLS)
|
||||||
{
|
{
|
||||||
skipProjectileCheckThisTick = true;
|
skipProjectileCheckThisTick = true;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ package net.runelite.client.plugins.cannon;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
|
|
||||||
@@ -67,7 +68,7 @@ public enum CannonSpots
|
|||||||
ICE_WARRIOR(new WorldPoint(2955, 3876, 0)),
|
ICE_WARRIOR(new WorldPoint(2955, 3876, 0)),
|
||||||
BANDIT(new WorldPoint(3037, 3700, 0));
|
BANDIT(new WorldPoint(3037, 3700, 0));
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private static final List<WorldPoint> cannonSpots = new ArrayList<>();
|
private static final List<WorldPoint> cannonSpots = new ArrayList<>();
|
||||||
|
|
||||||
static
|
static
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
@@ -50,7 +51,7 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class CerberusPlugin extends Plugin
|
public class CerberusPlugin extends Plugin
|
||||||
{
|
{
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final List<NPC> ghosts = new ArrayList<>();
|
private final List<NPC> ghosts = new ArrayList<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -60,13 +61,13 @@ public class CerberusPlugin extends Plugin
|
|||||||
private CerberusOverlay overlay;
|
private CerberusOverlay overlay;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
overlayManager.add(overlay);
|
overlayManager.add(overlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(overlay);
|
overlayManager.remove(overlay);
|
||||||
ghosts.clear();
|
ghosts.clear();
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ import net.runelite.client.config.ConfigItem;
|
|||||||
public interface ChatboxPerformanceConfig extends Config
|
public interface ChatboxPerformanceConfig extends Config
|
||||||
{
|
{
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 1,
|
position = 1,
|
||||||
keyName = "Chatbox",
|
keyName = "Chatbox",
|
||||||
name = "Toggle gradient",
|
name = "Toggle gradient",
|
||||||
description = "Toggles the gradient inside the chatbox."
|
description = "Toggles the gradient inside the chatbox."
|
||||||
)
|
)
|
||||||
default boolean transparentChatBox()
|
default boolean transparentChatBox()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public class ChatboxPerformancePlugin extends Plugin
|
|||||||
{
|
{
|
||||||
clientThread.invokeLater(() -> client.runScript(ScriptID.MESSAGE_LAYER_CLOSE, 0, 0));
|
clientThread.invokeLater(() -> client.runScript(ScriptID.MESSAGE_LAYER_CLOSE, 0, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
private void onScriptCallbackEvent(ScriptCallbackEvent ev)
|
private void onScriptCallbackEvent(ScriptCallbackEvent ev)
|
||||||
|
|||||||
@@ -148,6 +148,192 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private ChatKeyboardListener chatKeyboardListener;
|
private ChatKeyboardListener chatKeyboardListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the ironman status based on the symbol in the name of the player.
|
||||||
|
*
|
||||||
|
* @param name player name
|
||||||
|
* @return hiscore endpoint
|
||||||
|
*/
|
||||||
|
private static HiscoreEndpoint getHiscoreEndpointByName(final String name)
|
||||||
|
{
|
||||||
|
if (name.contains(IconID.IRONMAN.toString()))
|
||||||
|
{
|
||||||
|
return toEndPoint(AccountType.IRONMAN);
|
||||||
|
}
|
||||||
|
else if (name.contains(IconID.ULTIMATE_IRONMAN.toString()))
|
||||||
|
{
|
||||||
|
return toEndPoint(AccountType.ULTIMATE_IRONMAN);
|
||||||
|
}
|
||||||
|
else if (name.contains(IconID.HARDCORE_IRONMAN.toString()))
|
||||||
|
{
|
||||||
|
return toEndPoint(AccountType.HARDCORE_IRONMAN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return toEndPoint(AccountType.NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts account type to hiscore endpoint
|
||||||
|
*
|
||||||
|
* @param accountType account type
|
||||||
|
* @return hiscore endpoint
|
||||||
|
*/
|
||||||
|
private static HiscoreEndpoint toEndPoint(final AccountType accountType)
|
||||||
|
{
|
||||||
|
switch (accountType)
|
||||||
|
{
|
||||||
|
case IRONMAN:
|
||||||
|
return HiscoreEndpoint.IRONMAN;
|
||||||
|
case ULTIMATE_IRONMAN:
|
||||||
|
return HiscoreEndpoint.ULTIMATE_IRONMAN;
|
||||||
|
case HARDCORE_IRONMAN:
|
||||||
|
return HiscoreEndpoint.HARDCORE_IRONMAN;
|
||||||
|
default:
|
||||||
|
return HiscoreEndpoint.NORMAL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String longBossName(String boss)
|
||||||
|
{
|
||||||
|
switch (boss.toLowerCase())
|
||||||
|
{
|
||||||
|
case "corp":
|
||||||
|
return "Corporeal Beast";
|
||||||
|
|
||||||
|
case "jad":
|
||||||
|
return "TzTok-Jad";
|
||||||
|
|
||||||
|
case "kq":
|
||||||
|
return "Kalphite Queen";
|
||||||
|
|
||||||
|
case "chaos ele":
|
||||||
|
return "Chaos Elemental";
|
||||||
|
|
||||||
|
case "dusk":
|
||||||
|
case "dawn":
|
||||||
|
case "gargs":
|
||||||
|
return "Grotesque Guardians";
|
||||||
|
|
||||||
|
case "crazy arch":
|
||||||
|
return "Crazy Archaeologist";
|
||||||
|
|
||||||
|
case "deranged arch":
|
||||||
|
return "Deranged Archaeologist";
|
||||||
|
|
||||||
|
case "mole":
|
||||||
|
return "Giant Mole";
|
||||||
|
|
||||||
|
case "vetion":
|
||||||
|
return "Vet'ion";
|
||||||
|
|
||||||
|
case "vene":
|
||||||
|
return "Venenatis";
|
||||||
|
|
||||||
|
case "kbd":
|
||||||
|
return "King Black Dragon";
|
||||||
|
|
||||||
|
case "vork":
|
||||||
|
return "Vorkath";
|
||||||
|
|
||||||
|
case "sire":
|
||||||
|
return "Abyssal Sire";
|
||||||
|
|
||||||
|
case "smoke devil":
|
||||||
|
case "thermy":
|
||||||
|
return "Thermonuclear Smoke Devil";
|
||||||
|
|
||||||
|
case "cerb":
|
||||||
|
return "Cerberus";
|
||||||
|
|
||||||
|
case "zuk":
|
||||||
|
case "inferno":
|
||||||
|
return "TzKal-Zuk";
|
||||||
|
|
||||||
|
case "hydra":
|
||||||
|
return "Alchemical Hydra";
|
||||||
|
|
||||||
|
// gwd
|
||||||
|
case "sara":
|
||||||
|
case "saradomin":
|
||||||
|
case "zilyana":
|
||||||
|
case "zily":
|
||||||
|
return "Commander Zilyana";
|
||||||
|
case "zammy":
|
||||||
|
case "zamorak":
|
||||||
|
case "kril":
|
||||||
|
case "kril trutsaroth":
|
||||||
|
return "K'ril Tsutsaroth";
|
||||||
|
case "arma":
|
||||||
|
case "kree":
|
||||||
|
case "kreearra":
|
||||||
|
case "armadyl":
|
||||||
|
return "Kree'arra";
|
||||||
|
case "bando":
|
||||||
|
case "bandos":
|
||||||
|
case "graardor":
|
||||||
|
return "General Graardor";
|
||||||
|
|
||||||
|
// dks
|
||||||
|
case "supreme":
|
||||||
|
return "Dagannoth Supreme";
|
||||||
|
case "rex":
|
||||||
|
return "Dagannoth Rex";
|
||||||
|
case "prime":
|
||||||
|
return "Dagannoth Prime";
|
||||||
|
|
||||||
|
case "wt":
|
||||||
|
return "Wintertodt";
|
||||||
|
case "barrows":
|
||||||
|
return "Barrows Chests";
|
||||||
|
case "herbi":
|
||||||
|
return "Herbiboar";
|
||||||
|
|
||||||
|
// cox
|
||||||
|
case "cox":
|
||||||
|
case "xeric":
|
||||||
|
case "chambers":
|
||||||
|
case "olm":
|
||||||
|
case "raids":
|
||||||
|
return "Chambers of Xeric";
|
||||||
|
|
||||||
|
// cox cm
|
||||||
|
case "cox cm":
|
||||||
|
case "xeric cm":
|
||||||
|
case "chambers cm":
|
||||||
|
case "olm cm":
|
||||||
|
case "raids cm":
|
||||||
|
return "Chambers of Xeric Challenge Mode";
|
||||||
|
|
||||||
|
// tob
|
||||||
|
case "tob":
|
||||||
|
case "theatre":
|
||||||
|
case "verzik":
|
||||||
|
case "verzik vitur":
|
||||||
|
case "raids 2":
|
||||||
|
return "Theatre of Blood";
|
||||||
|
|
||||||
|
// agility course
|
||||||
|
case "prif":
|
||||||
|
case "prifddinas":
|
||||||
|
return "Prifddinas Agility Course";
|
||||||
|
|
||||||
|
// The Gauntlet
|
||||||
|
case "gaunt":
|
||||||
|
case "gauntlet":
|
||||||
|
return "Gauntlet";
|
||||||
|
|
||||||
|
// Corrupted Gauntlet
|
||||||
|
case "cgaunt":
|
||||||
|
case "cgauntlet":
|
||||||
|
return "Corrupted Gauntlet";
|
||||||
|
|
||||||
|
default:
|
||||||
|
return WordUtils.capitalize(boss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startUp()
|
public void startUp()
|
||||||
{
|
{
|
||||||
@@ -185,7 +371,7 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
chatCommandManager.unregisterCommand(DUEL_ARENA_COMMAND);
|
chatCommandManager.unregisterCommand(DUEL_ARENA_COMMAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
ChatCommandsConfig provideConfig(ConfigManager configManager)
|
ChatCommandsConfig provideConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
return configManager.getConfig(ChatCommandsConfig.class);
|
return configManager.getConfig(ChatCommandsConfig.class);
|
||||||
@@ -721,7 +907,6 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void personalBestLookup(ChatMessage chatMessage, String message)
|
private void personalBestLookup(ChatMessage chatMessage, String message)
|
||||||
{
|
{
|
||||||
if (!config.pb())
|
if (!config.pb())
|
||||||
@@ -1219,196 +1404,10 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
return toEndPoint(client.getAccountType());
|
return toEndPoint(client.getAccountType());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the ironman status based on the symbol in the name of the player.
|
|
||||||
*
|
|
||||||
* @param name player name
|
|
||||||
* @return hiscore endpoint
|
|
||||||
*/
|
|
||||||
private static HiscoreEndpoint getHiscoreEndpointByName(final String name)
|
|
||||||
{
|
|
||||||
if (name.contains(IconID.IRONMAN.toString()))
|
|
||||||
{
|
|
||||||
return toEndPoint(AccountType.IRONMAN);
|
|
||||||
}
|
|
||||||
else if (name.contains(IconID.ULTIMATE_IRONMAN.toString()))
|
|
||||||
{
|
|
||||||
return toEndPoint(AccountType.ULTIMATE_IRONMAN);
|
|
||||||
}
|
|
||||||
else if (name.contains(IconID.HARDCORE_IRONMAN.toString()))
|
|
||||||
{
|
|
||||||
return toEndPoint(AccountType.HARDCORE_IRONMAN);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return toEndPoint(AccountType.NORMAL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts account type to hiscore endpoint
|
|
||||||
*
|
|
||||||
* @param accountType account type
|
|
||||||
* @return hiscore endpoint
|
|
||||||
*/
|
|
||||||
private static HiscoreEndpoint toEndPoint(final AccountType accountType)
|
|
||||||
{
|
|
||||||
switch (accountType)
|
|
||||||
{
|
|
||||||
case IRONMAN:
|
|
||||||
return HiscoreEndpoint.IRONMAN;
|
|
||||||
case ULTIMATE_IRONMAN:
|
|
||||||
return HiscoreEndpoint.ULTIMATE_IRONMAN;
|
|
||||||
case HARDCORE_IRONMAN:
|
|
||||||
return HiscoreEndpoint.HARDCORE_IRONMAN;
|
|
||||||
default:
|
|
||||||
return HiscoreEndpoint.NORMAL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Value
|
@Value
|
||||||
private static class HiscoreLookup
|
private static class HiscoreLookup
|
||||||
{
|
{
|
||||||
private final String name;
|
private final String name;
|
||||||
private final HiscoreEndpoint endpoint;
|
private final HiscoreEndpoint endpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String longBossName(String boss)
|
|
||||||
{
|
|
||||||
switch (boss.toLowerCase())
|
|
||||||
{
|
|
||||||
case "corp":
|
|
||||||
return "Corporeal Beast";
|
|
||||||
|
|
||||||
case "jad":
|
|
||||||
return "TzTok-Jad";
|
|
||||||
|
|
||||||
case "kq":
|
|
||||||
return "Kalphite Queen";
|
|
||||||
|
|
||||||
case "chaos ele":
|
|
||||||
return "Chaos Elemental";
|
|
||||||
|
|
||||||
case "dusk":
|
|
||||||
case "dawn":
|
|
||||||
case "gargs":
|
|
||||||
return "Grotesque Guardians";
|
|
||||||
|
|
||||||
case "crazy arch":
|
|
||||||
return "Crazy Archaeologist";
|
|
||||||
|
|
||||||
case "deranged arch":
|
|
||||||
return "Deranged Archaeologist";
|
|
||||||
|
|
||||||
case "mole":
|
|
||||||
return "Giant Mole";
|
|
||||||
|
|
||||||
case "vetion":
|
|
||||||
return "Vet'ion";
|
|
||||||
|
|
||||||
case "vene":
|
|
||||||
return "Venenatis";
|
|
||||||
|
|
||||||
case "kbd":
|
|
||||||
return "King Black Dragon";
|
|
||||||
|
|
||||||
case "vork":
|
|
||||||
return "Vorkath";
|
|
||||||
|
|
||||||
case "sire":
|
|
||||||
return "Abyssal Sire";
|
|
||||||
|
|
||||||
case "smoke devil":
|
|
||||||
case "thermy":
|
|
||||||
return "Thermonuclear Smoke Devil";
|
|
||||||
|
|
||||||
case "cerb":
|
|
||||||
return "Cerberus";
|
|
||||||
|
|
||||||
case "zuk":
|
|
||||||
case "inferno":
|
|
||||||
return "TzKal-Zuk";
|
|
||||||
|
|
||||||
case "hydra":
|
|
||||||
return "Alchemical Hydra";
|
|
||||||
|
|
||||||
// gwd
|
|
||||||
case "sara":
|
|
||||||
case "saradomin":
|
|
||||||
case "zilyana":
|
|
||||||
case "zily":
|
|
||||||
return "Commander Zilyana";
|
|
||||||
case "zammy":
|
|
||||||
case "zamorak":
|
|
||||||
case "kril":
|
|
||||||
case "kril trutsaroth":
|
|
||||||
return "K'ril Tsutsaroth";
|
|
||||||
case "arma":
|
|
||||||
case "kree":
|
|
||||||
case "kreearra":
|
|
||||||
case "armadyl":
|
|
||||||
return "Kree'arra";
|
|
||||||
case "bando":
|
|
||||||
case "bandos":
|
|
||||||
case "graardor":
|
|
||||||
return "General Graardor";
|
|
||||||
|
|
||||||
// dks
|
|
||||||
case "supreme":
|
|
||||||
return "Dagannoth Supreme";
|
|
||||||
case "rex":
|
|
||||||
return "Dagannoth Rex";
|
|
||||||
case "prime":
|
|
||||||
return "Dagannoth Prime";
|
|
||||||
|
|
||||||
case "wt":
|
|
||||||
return "Wintertodt";
|
|
||||||
case "barrows":
|
|
||||||
return "Barrows Chests";
|
|
||||||
case "herbi":
|
|
||||||
return "Herbiboar";
|
|
||||||
|
|
||||||
// cox
|
|
||||||
case "cox":
|
|
||||||
case "xeric":
|
|
||||||
case "chambers":
|
|
||||||
case "olm":
|
|
||||||
case "raids":
|
|
||||||
return "Chambers of Xeric";
|
|
||||||
|
|
||||||
// cox cm
|
|
||||||
case "cox cm":
|
|
||||||
case "xeric cm":
|
|
||||||
case "chambers cm":
|
|
||||||
case "olm cm":
|
|
||||||
case "raids cm":
|
|
||||||
return "Chambers of Xeric Challenge Mode";
|
|
||||||
|
|
||||||
// tob
|
|
||||||
case "tob":
|
|
||||||
case "theatre":
|
|
||||||
case "verzik":
|
|
||||||
case "verzik vitur":
|
|
||||||
case "raids 2":
|
|
||||||
return "Theatre of Blood";
|
|
||||||
|
|
||||||
// agility course
|
|
||||||
case "prif":
|
|
||||||
case "prifddinas":
|
|
||||||
return "Prifddinas Agility Course";
|
|
||||||
|
|
||||||
// The Gauntlet
|
|
||||||
case "gaunt":
|
|
||||||
case "gauntlet":
|
|
||||||
return "Gauntlet";
|
|
||||||
|
|
||||||
// Corrupted Gauntlet
|
|
||||||
case "cgaunt":
|
|
||||||
case "cgauntlet":
|
|
||||||
return "Corrupted Gauntlet";
|
|
||||||
|
|
||||||
default:
|
|
||||||
return WordUtils.capitalize(boss);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -28,8 +28,8 @@ import java.awt.event.KeyEvent;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.ScriptID;
|
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
|
import net.runelite.api.ScriptID;
|
||||||
import net.runelite.api.VarClientStr;
|
import net.runelite.api.VarClientStr;
|
||||||
import net.runelite.client.callback.ClientThread;
|
import net.runelite.client.callback.ClientThread;
|
||||||
import net.runelite.client.input.KeyListener;
|
import net.runelite.client.input.KeyListener;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class ChatFilterPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ public class ChatFilterPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
filteredPatterns.clear();
|
filteredPatterns.clear();
|
||||||
client.refreshChat();
|
client.refreshChat();
|
||||||
|
|||||||
@@ -88,6 +88,24 @@ public class ChatHistoryPlugin extends Plugin implements KeyListener
|
|||||||
private boolean retainChatHistory;
|
private boolean retainChatHistory;
|
||||||
private boolean pmTargetCycling;
|
private boolean pmTargetCycling;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Small hack to prevent plugins checking for specific messages to match. This works because the "—" character
|
||||||
|
* cannot be seen in-game. This replacement preserves wrapping on chat history messages.
|
||||||
|
*
|
||||||
|
* @param message message
|
||||||
|
* @return message with invisible character before every space
|
||||||
|
*/
|
||||||
|
private static String tweakSpaces(final String message)
|
||||||
|
{
|
||||||
|
if (message != null)
|
||||||
|
{
|
||||||
|
// First replacement cleans up prior applications of this so as not to keep extending the message
|
||||||
|
return message.replace("— ", " ").replace(" ", "— ");
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
ChatHistoryConfig getConfig(ConfigManager configManager)
|
ChatHistoryConfig getConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
@@ -191,22 +209,9 @@ public class ChatHistoryPlugin extends Plugin implements KeyListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Small hack to prevent plugins checking for specific messages to match. This works because the "—" character
|
public void keyTyped(KeyEvent e)
|
||||||
* cannot be seen in-game. This replacement preserves wrapping on chat history messages.
|
|
||||||
*
|
|
||||||
* @param message message
|
|
||||||
* @return message with invisible character before every space
|
|
||||||
*/
|
|
||||||
private static String tweakSpaces(final String message)
|
|
||||||
{
|
{
|
||||||
if (message != null)
|
|
||||||
{
|
|
||||||
// First replacement cleans up prior applications of this so as not to keep extending the message
|
|
||||||
return message.replace("— ", " ").replace(" ", "— ");
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -239,11 +244,6 @@ public class ChatHistoryPlugin extends Plugin implements KeyListener
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void keyTyped(KeyEvent e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void keyReleased(KeyEvent e)
|
public void keyReleased(KeyEvent e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -99,10 +99,10 @@ public interface ChatNotificationsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 6,
|
position = 6,
|
||||||
keyName = "notifyOnPm",
|
keyName = "notifyOnPm",
|
||||||
name = "Notify on private messsage",
|
name = "Notify on private messsage",
|
||||||
description = "Notifies you whenever a private message was received"
|
description = "Notifies you whenever a private message was received"
|
||||||
)
|
)
|
||||||
default boolean notifyOnPm()
|
default boolean notifyOnPm()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ import net.runelite.client.plugins.PluginDescriptor;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class ChatNotificationsPlugin extends Plugin
|
public class ChatNotificationsPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
// Private message cache used to avoid duplicate notifications from ChatHistory.
|
||||||
|
private final Set<Integer> privateMessageHashes = new HashSet<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@@ -77,10 +80,6 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
private Pattern usernameMatcher = null;
|
private Pattern usernameMatcher = null;
|
||||||
private String usernameReplacer = "";
|
private String usernameReplacer = "";
|
||||||
private Pattern highlightMatcher = null;
|
private Pattern highlightMatcher = null;
|
||||||
|
|
||||||
// Private message cache used to avoid duplicate notifications from ChatHistory.
|
|
||||||
private final Set<Integer> privateMessageHashes = new HashSet<>();
|
|
||||||
|
|
||||||
private boolean highlightOwnName;
|
private boolean highlightOwnName;
|
||||||
private String highlightWordsString;
|
private String highlightWordsString;
|
||||||
private boolean notifyOnOwnName;
|
private boolean notifyOnOwnName;
|
||||||
@@ -89,6 +88,49 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
private boolean notifyOnDuel;
|
private boolean notifyOnDuel;
|
||||||
private boolean notifyOnPm;
|
private boolean notifyOnPm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the last color tag from a string, or null if there was none
|
||||||
|
*
|
||||||
|
* @param str
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private static String getLastColor(String str)
|
||||||
|
{
|
||||||
|
int colIdx = str.lastIndexOf("<col=");
|
||||||
|
int colEndIdx = str.lastIndexOf("</col>");
|
||||||
|
|
||||||
|
if (colEndIdx > colIdx)
|
||||||
|
{
|
||||||
|
// ends in a </col> which resets the color to normal
|
||||||
|
return "<col" + ChatColorType.NORMAL + ">";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (colIdx == -1)
|
||||||
|
{
|
||||||
|
return null; // no color
|
||||||
|
}
|
||||||
|
|
||||||
|
int closeIdx = str.indexOf('>', colIdx);
|
||||||
|
if (closeIdx == -1)
|
||||||
|
{
|
||||||
|
return null; // unclosed col tag
|
||||||
|
}
|
||||||
|
|
||||||
|
return str.substring(colIdx, closeIdx + 1); // include the >
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strip color tags from a string.
|
||||||
|
*
|
||||||
|
* @param str
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@VisibleForTesting
|
||||||
|
static String stripColor(String str)
|
||||||
|
{
|
||||||
|
return str.replaceAll("(<col=[0-9a-f]+>|</col>)", "");
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
ChatNotificationsConfig provideConfig(ConfigManager configManager)
|
ChatNotificationsConfig provideConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
@@ -315,47 +357,4 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
|
|
||||||
return stringBuilder.toString();
|
return stringBuilder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the last color tag from a string, or null if there was none
|
|
||||||
*
|
|
||||||
* @param str
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private static String getLastColor(String str)
|
|
||||||
{
|
|
||||||
int colIdx = str.lastIndexOf("<col=");
|
|
||||||
int colEndIdx = str.lastIndexOf("</col>");
|
|
||||||
|
|
||||||
if (colEndIdx > colIdx)
|
|
||||||
{
|
|
||||||
// ends in a </col> which resets the color to normal
|
|
||||||
return "<col" + ChatColorType.NORMAL + ">";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (colIdx == -1)
|
|
||||||
{
|
|
||||||
return null; // no color
|
|
||||||
}
|
|
||||||
|
|
||||||
int closeIdx = str.indexOf('>', colIdx);
|
|
||||||
if (closeIdx == -1)
|
|
||||||
{
|
|
||||||
return null; // unclosed col tag
|
|
||||||
}
|
|
||||||
|
|
||||||
return str.substring(colIdx, closeIdx + 1); // include the >
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Strip color tags from a string.
|
|
||||||
*
|
|
||||||
* @param str
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@VisibleForTesting
|
|
||||||
static String stripColor(String str)
|
|
||||||
{
|
|
||||||
return str.replaceAll("(<col=[0-9a-f]+>|</col>)", "");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class ChatTranslationPlugin extends Plugin implements KeyListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
translator.setInLang(config.publicTargetLanguage());
|
translator.setInLang(config.publicTargetLanguage());
|
||||||
translator.setOutLang(config.playerTargetLanguage());
|
translator.setOutLang(config.playerTargetLanguage());
|
||||||
@@ -112,7 +112,7 @@ public class ChatTranslationPlugin extends Plugin implements KeyListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
eventBus.unregister(OPTION);
|
eventBus.unregister(OPTION);
|
||||||
eventBus.unregister(PUBLIC);
|
eventBus.unregister(PUBLIC);
|
||||||
@@ -265,6 +265,12 @@ public class ChatTranslationPlugin extends Plugin implements KeyListener
|
|||||||
client.refreshChat();
|
client.refreshChat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyTyped(KeyEvent e)
|
||||||
|
{
|
||||||
|
// Nothing.
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void keyPressed(KeyEvent event)
|
public void keyPressed(KeyEvent event)
|
||||||
{
|
{
|
||||||
@@ -313,10 +319,4 @@ public class ChatTranslationPlugin extends Plugin implements KeyListener
|
|||||||
{
|
{
|
||||||
// Nothing.
|
// Nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void keyTyped(KeyEvent e)
|
|
||||||
{
|
|
||||||
// Nothing.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package net.runelite.client.plugins.chattranslation;
|
package net.runelite.client.plugins.chattranslation;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
// TODO: Doesn't Locale pretty much do this as well?
|
// TODO: Doesn't Locale pretty much do this as well?
|
||||||
@@ -12,7 +13,7 @@ public enum Languages
|
|||||||
FRENCH("French", "fr"),
|
FRENCH("French", "fr"),
|
||||||
GERMAN("German", "de");
|
GERMAN("German", "de");
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final String name;
|
private final String name;
|
||||||
private final String shortName;
|
private final String shortName;
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class Translator
|
|||||||
{
|
{
|
||||||
incomingUrlBase = BASE_URL + SOURCE + CENT_URL + lang.toShortString() + LAST_URL;
|
incomingUrlBase = BASE_URL + SOURCE + CENT_URL + lang.toShortString() + LAST_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setOutLang(Languages lang)
|
void setOutLang(Languages lang)
|
||||||
{
|
{
|
||||||
outgoingUrlBase = BASE_URL + SOURCE + CENT_URL + lang.toShortString() + LAST_URL;
|
outgoingUrlBase = BASE_URL + SOURCE + CENT_URL + lang.toShortString() + LAST_URL;
|
||||||
@@ -40,7 +41,7 @@ class Translator
|
|||||||
return translate(new URL(url));
|
return translate(new URL(url));
|
||||||
}
|
}
|
||||||
|
|
||||||
public String translate(URL url) throws IOException
|
private String translate(URL url) throws IOException
|
||||||
{
|
{
|
||||||
HttpURLConnection con = (HttpURLConnection) url.openConnection();
|
HttpURLConnection con = (HttpURLConnection) url.openConnection();
|
||||||
con.setRequestProperty("User-Agent", "Mozilla/5.0");
|
con.setRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
@@ -57,10 +58,6 @@ class Translator
|
|||||||
|
|
||||||
return parseResult(response.toString());
|
return parseResult(response.toString());
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String parseResult(String inputJson)
|
private String parseResult(String inputJson)
|
||||||
|
|||||||
@@ -95,6 +95,12 @@ public class ClanChatPlugin extends Plugin
|
|||||||
private static final String RECENT_TITLE = "Recent CCs";
|
private static final String RECENT_TITLE = "Recent CCs";
|
||||||
private static final int JOIN_LEAVE_DURATION = 20;
|
private static final int JOIN_LEAVE_DURATION = 20;
|
||||||
private static final int MESSAGE_DELAY = 10;
|
private static final int MESSAGE_DELAY = 10;
|
||||||
|
private static final CopyOnWriteArrayList<Player> clanMembers = new CopyOnWriteArrayList<>();
|
||||||
|
/**
|
||||||
|
* queue of temporary messages added to the client
|
||||||
|
*/
|
||||||
|
private final Deque<ClanJoinMessage> clanJoinMessages = new ArrayDeque<>();
|
||||||
|
private final Map<String, ClanMemberActivity> activityBuffer = new HashMap<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
@@ -115,22 +121,8 @@ public class ClanChatPlugin extends Plugin
|
|||||||
private ClientThread clientThread;
|
private ClientThread clientThread;
|
||||||
|
|
||||||
private List<String> chats = new ArrayList<>();
|
private List<String> chats = new ArrayList<>();
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public static CopyOnWriteArrayList<Player> getClanMembers()
|
|
||||||
{
|
|
||||||
return (CopyOnWriteArrayList<Player>) clanMembers.clone();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final CopyOnWriteArrayList<Player> clanMembers = new CopyOnWriteArrayList<>();
|
|
||||||
private ClanChatIndicator clanMemberCounter;
|
private ClanChatIndicator clanMemberCounter;
|
||||||
/**
|
|
||||||
* queue of temporary messages added to the client
|
|
||||||
*/
|
|
||||||
private final Deque<ClanJoinMessage> clanJoinMessages = new ArrayDeque<>();
|
|
||||||
private final Map<String, ClanMemberActivity> activityBuffer = new HashMap<>();
|
|
||||||
private int clanJoinedTick;
|
private int clanJoinedTick;
|
||||||
|
|
||||||
private boolean clanChatIcons;
|
private boolean clanChatIcons;
|
||||||
private boolean recentChats;
|
private boolean recentChats;
|
||||||
private boolean showClanCounter;
|
private boolean showClanCounter;
|
||||||
@@ -142,6 +134,12 @@ public class ClanChatPlugin extends Plugin
|
|||||||
private boolean clanTabChat;
|
private boolean clanTabChat;
|
||||||
private String clanname;
|
private String clanname;
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public static CopyOnWriteArrayList<Player> getClanMembers()
|
||||||
|
{
|
||||||
|
return (CopyOnWriteArrayList<Player>) clanMembers.clone();
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
ClanChatConfig getConfig(ConfigManager configManager)
|
ClanChatConfig getConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,6 +34,13 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class ClanManModePlugin extends Plugin
|
public class ClanManModePlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
final Map<String, Integer> clan = new HashMap<>();
|
||||||
|
int wildernessLevel;
|
||||||
|
int clanmin;
|
||||||
|
int clanmax;
|
||||||
|
int inwildy;
|
||||||
|
int ticks;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private OverlayManager overlayManager;
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
@@ -89,15 +96,8 @@ public class ClanManModePlugin extends Plugin
|
|||||||
return configManager.getConfig(ClanManModeConfig.class);
|
return configManager.getConfig(ClanManModeConfig.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wildernessLevel;
|
|
||||||
int clanmin;
|
|
||||||
int clanmax;
|
|
||||||
int inwildy;
|
|
||||||
int ticks;
|
|
||||||
final Map<String, Integer> clan = new HashMap<>();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ public class ClanManModePlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(ClanManModeOverlay);
|
overlayManager.remove(ClanManModeOverlay);
|
||||||
overlayManager.remove(ClanManModeTileOverlay);
|
overlayManager.remove(ClanManModeTileOverlay);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class ClanManModeService
|
|||||||
consumer.accept(player, plugin.getGetClanMemberColor());
|
consumer.accept(player, plugin.getGetClanMemberColor());
|
||||||
}
|
}
|
||||||
if (plugin.isHighlightAttacked() && interactors.containsKey(player.getName()))
|
if (plugin.isHighlightAttacked() && interactors.containsKey(player.getName()))
|
||||||
{
|
{
|
||||||
String attackername = interactors.get(player.getName());
|
String attackername = interactors.get(player.getName());
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (Player attacker : client.getPlayers())
|
for (Player attacker : client.getPlayers())
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.ChatMessageType;
|
import net.runelite.api.ChatMessageType;
|
||||||
@@ -122,24 +123,24 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
13150, 9011,
|
13150, 9011,
|
||||||
13151, 9012
|
13151, 9012
|
||||||
};
|
};
|
||||||
|
@Getter(AccessLevel.PUBLIC)
|
||||||
@Getter
|
|
||||||
private ClueScroll clue;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final List<NPC> npcsToMark = new ArrayList<>();
|
private final List<NPC> npcsToMark = new ArrayList<>();
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private final List<TileObject> objectsToMark = new ArrayList<>();
|
private final List<TileObject> objectsToMark = new ArrayList<>();
|
||||||
|
private final TextComponent textComponent = new TextComponent();
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private ClueScroll clue;
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private Item[] equippedItems;
|
private Item[] equippedItems;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private Item[] inventoryItems;
|
private Item[] inventoryItems;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -170,11 +171,33 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
private BufferedImage mapArrow;
|
private BufferedImage mapArrow;
|
||||||
private Integer clueItemId;
|
private Integer clueItemId;
|
||||||
private boolean worldMapPointsSet = false;
|
private boolean worldMapPointsSet = false;
|
||||||
|
|
||||||
private final TextComponent textComponent = new TextComponent();
|
|
||||||
|
|
||||||
private boolean displayHintArrows;
|
private boolean displayHintArrows;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translate a coordinate either between overworld and real, or real and overworld
|
||||||
|
*
|
||||||
|
* @param worldPoint
|
||||||
|
* @param toOverworld whether to convert to overworld coordinates, or to real coordinates
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static WorldPoint getMirrorPoint(WorldPoint worldPoint, boolean toOverworld)
|
||||||
|
{
|
||||||
|
int region = worldPoint.getRegionID();
|
||||||
|
for (int i = 0; i < REGION_MIRRORS.length; i += 2)
|
||||||
|
{
|
||||||
|
int real = REGION_MIRRORS[i];
|
||||||
|
int overworld = REGION_MIRRORS[i + 1];
|
||||||
|
|
||||||
|
// Test against what we are converting from
|
||||||
|
if (region == (toOverworld ? real : overworld))
|
||||||
|
{
|
||||||
|
return WorldPoint.fromRegion(toOverworld ? overworld : real,
|
||||||
|
worldPoint.getRegionX(), worldPoint.getRegionY(), worldPoint.getPlane());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return worldPoint;
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
ClueScrollConfig getConfig(ConfigManager configManager)
|
ClueScrollConfig getConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
@@ -188,7 +211,7 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
|
|
||||||
this.displayHintArrows = config.displayHintArrows();
|
this.displayHintArrows = config.displayHintArrows();
|
||||||
@@ -199,7 +222,7 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(clueScrollOverlay);
|
overlayManager.remove(clueScrollOverlay);
|
||||||
overlayManager.remove(clueScrollEmoteOverlay);
|
overlayManager.remove(clueScrollEmoteOverlay);
|
||||||
@@ -834,29 +857,4 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
newScroll
|
newScroll
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Translate a coordinate either between overworld and real, or real and overworld
|
|
||||||
*
|
|
||||||
* @param worldPoint
|
|
||||||
* @param toOverworld whether to convert to overworld coordinates, or to real coordinates
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static WorldPoint getMirrorPoint(WorldPoint worldPoint, boolean toOverworld)
|
|
||||||
{
|
|
||||||
int region = worldPoint.getRegionID();
|
|
||||||
for (int i = 0; i < REGION_MIRRORS.length; i += 2)
|
|
||||||
{
|
|
||||||
int real = REGION_MIRRORS[i];
|
|
||||||
int overworld = REGION_MIRRORS[i + 1];
|
|
||||||
|
|
||||||
// Test against what we are converting from
|
|
||||||
if (region == (toOverworld ? real : overworld))
|
|
||||||
{
|
|
||||||
return WorldPoint.fromRegion(toOverworld ? overworld : real,
|
|
||||||
worldPoint.getRegionX(), worldPoint.getRegionY(), worldPoint.getPlane());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return worldPoint;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.ObjectID;
|
import net.runelite.api.ObjectID;
|
||||||
@@ -44,7 +45,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueScroll, ObjectClueScroll
|
public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueScroll, ObjectClueScroll
|
||||||
{
|
{
|
||||||
private static final String ANAGRAM_TEXT = "This anagram reveals who to speak to next: ";
|
private static final String ANAGRAM_TEXT = "This anagram reveals who to speak to next: ";
|
||||||
@@ -273,12 +274,12 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
@Override
|
@Override
|
||||||
public String[] getNpcs()
|
public String[] getNpcs()
|
||||||
{
|
{
|
||||||
return new String[] {npc};
|
return new String[]{npc};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getObjectIds()
|
public int[] getObjectIds()
|
||||||
{
|
{
|
||||||
return new int[] {objectId};
|
return new int[]{objectId};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,11 +25,12 @@
|
|||||||
package net.runelite.client.plugins.cluescrolls.clues;
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.api.widgets.WidgetID;
|
import net.runelite.api.widgets.WidgetID;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class BeginnerMapClue extends MapClue implements LocationClueScroll
|
public class BeginnerMapClue extends MapClue implements LocationClueScroll
|
||||||
{
|
{
|
||||||
private static final ImmutableList<BeginnerMapClue> CLUES = ImmutableList.of(
|
private static final ImmutableList<BeginnerMapClue> CLUES = ImmutableList.of(
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
@@ -39,7 +40,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class CipherClue extends ClueScroll implements TextClueScroll, NpcClueScroll, LocationClueScroll
|
public class CipherClue extends ClueScroll implements TextClueScroll, NpcClueScroll, LocationClueScroll
|
||||||
{
|
{
|
||||||
private static final Set<CipherClue> CLUES = ImmutableSet.of(
|
private static final Set<CipherClue> CLUES = ImmutableSet.of(
|
||||||
@@ -140,6 +141,6 @@ public class CipherClue extends ClueScroll implements TextClueScroll, NpcClueScr
|
|||||||
|
|
||||||
public String[] getNpcs()
|
public String[] getNpcs()
|
||||||
{
|
{
|
||||||
return new String[] {npc};
|
return new String[]{npc};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableMap;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
@@ -37,7 +38,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class CoordinateClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
public class CoordinateClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
||||||
{
|
{
|
||||||
private static final ImmutableMap<WorldPoint, String> CLUES = new ImmutableMap.Builder<WorldPoint, String>()
|
private static final ImmutableMap<WorldPoint, String> CLUES = new ImmutableMap.Builder<WorldPoint, String>()
|
||||||
@@ -206,7 +207,7 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati
|
|||||||
@Nullable
|
@Nullable
|
||||||
private final WorldPoint mirrorLocation;
|
private final WorldPoint mirrorLocation;
|
||||||
|
|
||||||
public CoordinateClue(String text, WorldPoint location, WorldPoint mirrorLocation)
|
public CoordinateClue(String text, WorldPoint location, @Nullable WorldPoint mirrorLocation)
|
||||||
{
|
{
|
||||||
this.text = text;
|
this.text = text;
|
||||||
this.location = location;
|
this.location = location;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import static net.runelite.api.NullObjectID.NULL_1293;
|
import static net.runelite.api.NullObjectID.NULL_1293;
|
||||||
@@ -47,7 +48,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueScroll, ObjectClueScroll
|
public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueScroll, ObjectClueScroll
|
||||||
{
|
{
|
||||||
public static final Set<CrypticClue> CLUES = ImmutableSet.of(
|
public static final Set<CrypticClue> CLUES = ImmutableSet.of(
|
||||||
@@ -116,7 +117,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
new CrypticClue("Probably filled with wizards socks.", "Wizard", DRAWERS_350, new WorldPoint(3116, 9562, 0), "Search the drawers in the basement of the Wizard's Tower south of Draynor Village. Kill one of the Wizards for the key. Fairy ring DIS"),
|
new CrypticClue("Probably filled with wizards socks.", "Wizard", DRAWERS_350, new WorldPoint(3116, 9562, 0), "Search the drawers in the basement of the Wizard's Tower south of Draynor Village. Kill one of the Wizards for the key. Fairy ring DIS"),
|
||||||
new CrypticClue("Even the seers say this clue goes right over their heads.", CRATE_14934, new WorldPoint(2707, 3488, 2), "Search the crate on the Seers Agility Course in Seers Village"),
|
new CrypticClue("Even the seers say this clue goes right over their heads.", CRATE_14934, new WorldPoint(2707, 3488, 2), "Search the crate on the Seers Agility Course in Seers Village"),
|
||||||
new CrypticClue("Speak to a Wyse man.", "Wyson the gardener", new WorldPoint(3026, 3378, 0), "Talk to Wyson the gardener at Falador Park."),
|
new CrypticClue("Speak to a Wyse man.", "Wyson the gardener", new WorldPoint(3026, 3378, 0), "Talk to Wyson the gardener at Falador Park."),
|
||||||
new CrypticClue("You'll need to look for a town with a central fountain. Look for a locked chest in the town's chapel.", "Monk" , CLOSED_CHEST_5108, new WorldPoint(3256, 3487, 0), "Search the chest by the stairs in the Varrock church. Kill a Monk in Ardougne Monastery to obtain the key."),
|
new CrypticClue("You'll need to look for a town with a central fountain. Look for a locked chest in the town's chapel.", "Monk", CLOSED_CHEST_5108, new WorldPoint(3256, 3487, 0), "Search the chest by the stairs in the Varrock church. Kill a Monk in Ardougne Monastery to obtain the key."),
|
||||||
new CrypticClue("Talk to Ambassador Spanfipple in the White Knights Castle.", "Ambassador Spanfipple", new WorldPoint(2979, 3340, 0), "Ambassador Spanfipple can be found roaming on the first floor of the White Knights Castle."),
|
new CrypticClue("Talk to Ambassador Spanfipple in the White Knights Castle.", "Ambassador Spanfipple", new WorldPoint(2979, 3340, 0), "Ambassador Spanfipple can be found roaming on the first floor of the White Knights Castle."),
|
||||||
new CrypticClue("Mine was the strangest birth under the sun. I left the crimson sack, yet life had not begun. Entered the world, and yet was seen by none.", new WorldPoint(2832, 9586, 0), "Inside Karamja Volcano, dig directly underneath the Red spiders' eggs respawn."),
|
new CrypticClue("Mine was the strangest birth under the sun. I left the crimson sack, yet life had not begun. Entered the world, and yet was seen by none.", new WorldPoint(2832, 9586, 0), "Inside Karamja Volcano, dig directly underneath the Red spiders' eggs respawn."),
|
||||||
new CrypticClue("Search for a crate in Varrock Castle.", CRATE_5113, new WorldPoint(3224, 3492, 0), "Search the crate in the corner of the kitchen in Varrock Castle."),
|
new CrypticClue("Search for a crate in Varrock Castle.", CRATE_5113, new WorldPoint(3224, 3492, 0), "Search the crate in the corner of the kitchen in Varrock Castle."),
|
||||||
@@ -202,7 +203,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
new CrypticClue("Search the drawers on the first floor of a building overlooking Ardougne's Market.", DRAWERS_352, new WorldPoint(2657, 3322, 1), "Climb the ladder in the house north of the market."),
|
new CrypticClue("Search the drawers on the first floor of a building overlooking Ardougne's Market.", DRAWERS_352, new WorldPoint(2657, 3322, 1), "Climb the ladder in the house north of the market."),
|
||||||
new CrypticClue("'A bag belt only?', he asked his balding brothers.", "Abbot Langley", new WorldPoint(3058, 3487, 0), "Talk-to Abbot Langley in Monastery west of Edgeville"),
|
new CrypticClue("'A bag belt only?', he asked his balding brothers.", "Abbot Langley", new WorldPoint(3058, 3487, 0), "Talk-to Abbot Langley in Monastery west of Edgeville"),
|
||||||
new CrypticClue("Search the drawers upstairs in Falador's shield shop.", DRAWERS, new WorldPoint(2971, 3386, 1), "Cassie's Shield Shop at the northern Falador entrance."),
|
new CrypticClue("Search the drawers upstairs in Falador's shield shop.", DRAWERS, new WorldPoint(2971, 3386, 1), "Cassie's Shield Shop at the northern Falador entrance."),
|
||||||
new CrypticClue("Go to this building to be illuminated, and check the drawers while you are there.", "Market Guard", DRAWERS_350 , new WorldPoint(2512, 3641, 1), "Search the drawers in the first floor of the Lighthouse. Kill a Rellekka marketplace guard to obtain the key."),
|
new CrypticClue("Go to this building to be illuminated, and check the drawers while you are there.", "Market Guard", DRAWERS_350, new WorldPoint(2512, 3641, 1), "Search the drawers in the first floor of the Lighthouse. Kill a Rellekka marketplace guard to obtain the key."),
|
||||||
new CrypticClue("Dig near some giant mushrooms, behind the Grand Tree.", new WorldPoint(2458, 3504, 0), "Dig near the red mushrooms northwest of the Grand Tree."),
|
new CrypticClue("Dig near some giant mushrooms, behind the Grand Tree.", new WorldPoint(2458, 3504, 0), "Dig near the red mushrooms northwest of the Grand Tree."),
|
||||||
new CrypticClue("Pentagrams and demons, burnt bones and remains, I wonder what the blood contains.", new WorldPoint(3297, 3890, 0), "Dig under the blood rune spawn next to the Demonic Ruins."),
|
new CrypticClue("Pentagrams and demons, burnt bones and remains, I wonder what the blood contains.", new WorldPoint(3297, 3890, 0), "Dig under the blood rune spawn next to the Demonic Ruins."),
|
||||||
new CrypticClue("Search the drawers above Varrock's shops.", DRAWERS_7194, new WorldPoint(3206, 3419, 1), "Located upstairs in Thessalia's Fine Clothes shop in Varrock."),
|
new CrypticClue("Search the drawers above Varrock's shops.", DRAWERS_7194, new WorldPoint(3206, 3419, 1), "Located upstairs in Thessalia's Fine Clothes shop in Varrock."),
|
||||||
@@ -447,7 +448,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
for (TileObject gameObject : plugin.getObjectsToMark())
|
for (TileObject gameObject : plugin.getObjectsToMark())
|
||||||
{
|
{
|
||||||
OverlayUtil.renderHoverableArea(graphics, gameObject.getClickbox(), mousePosition,
|
OverlayUtil.renderHoverableArea(graphics, gameObject.getClickbox(), mousePosition,
|
||||||
CLICKBOX_FILL_COLOR, CLICKBOX_BORDER_COLOR, CLICKBOX_HOVER_BORDER_COLOR);
|
CLICKBOX_FILL_COLOR, CLICKBOX_BORDER_COLOR, CLICKBOX_HOVER_BORDER_COLOR);
|
||||||
|
|
||||||
OverlayUtil.renderImageLocation(plugin.getClient(), graphics, gameObject.getLocalLocation(), plugin.getClueScrollImage(), IMAGE_Z_OFFSET);
|
OverlayUtil.renderImageLocation(plugin.getClient(), graphics, gameObject.getLocalLocation(), plugin.getClueScrollImage(), IMAGE_Z_OFFSET);
|
||||||
}
|
}
|
||||||
@@ -471,12 +472,12 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
@Override
|
@Override
|
||||||
public int[] getObjectIds()
|
public int[] getObjectIds()
|
||||||
{
|
{
|
||||||
return new int[] {objectId};
|
return new int[]{objectId};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getNpcs()
|
public String[] getNpcs()
|
||||||
{
|
{
|
||||||
return new String[] {npc};
|
return new String[]{npc};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,10 +31,11 @@ import java.awt.Polygon;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import static net.runelite.api.EquipmentInventorySlot.*;
|
|
||||||
import static net.runelite.api.EquipmentInventorySlot.LEGS;
|
import static net.runelite.api.EquipmentInventorySlot.LEGS;
|
||||||
|
import static net.runelite.api.EquipmentInventorySlot.*;
|
||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import static net.runelite.api.ItemID.*;
|
import static net.runelite.api.ItemID.*;
|
||||||
@@ -45,19 +46,23 @@ import net.runelite.api.coords.WorldPoint;
|
|||||||
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
|
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
|
||||||
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.emote.Emote;
|
import net.runelite.client.plugins.cluescrolls.clues.emote.Emote;
|
||||||
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.*;
|
|
||||||
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.BULL_ROARER;
|
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.BULL_ROARER;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.*;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit;
|
import net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit;
|
||||||
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.*;
|
|
||||||
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SHANTAY_PASS;
|
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SHANTAY_PASS;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.*;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
|
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
|
||||||
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.*;
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.all;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.any;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.emptySlot;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.item;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.range;
|
||||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
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;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
||||||
{
|
{
|
||||||
private static final Set<EmoteClue> CLUES = ImmutableSet.of(
|
private static final Set<EmoteClue> CLUES = ImmutableSet.of(
|
||||||
@@ -195,7 +200,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
|
|||||||
this(text, locationName, stashUnit, location, firstEmote, null, itemRequirements);
|
this(text, locationName, stashUnit, location, firstEmote, null, itemRequirements);
|
||||||
}
|
}
|
||||||
|
|
||||||
private EmoteClue(String text, String locationName, STASHUnit stashUnit, WorldPoint location, Emote firstEmote, Emote secondEmote, @Nonnull ItemRequirement... itemRequirements)
|
private EmoteClue(String text, String locationName, @Nullable STASHUnit stashUnit, WorldPoint location, Emote firstEmote, Emote secondEmote, @Nonnull ItemRequirement... itemRequirements)
|
||||||
{
|
{
|
||||||
this.text = text;
|
this.text = text;
|
||||||
this.locationName = locationName;
|
this.locationName = locationName;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
@@ -38,7 +39,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class FairyRingClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
public class FairyRingClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
||||||
{
|
{
|
||||||
private static final Set<FairyRingClue> CLUES = ImmutableSet.of(
|
private static final Set<FairyRingClue> CLUES = ImmutableSet.of(
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user