Merge remote-tracking branch 'runelite/master'
This commit is contained in:
@@ -54,7 +54,7 @@ dependencies {
|
||||
|
||||
implementation(project(":http-api"))
|
||||
implementation(project(":runelite-jshell"))
|
||||
implementation(group = "ch.qos.logback", name = "logback-classic", version = "1.2.3")
|
||||
implementation(group = "ch.qos.logback", name = "logback-classic", version = "1.2.9")
|
||||
implementation(group = "com.google.code.gson", name = "gson", version = "2.8.5")
|
||||
implementation(group = "com.google.guava", name = "guava", version = "30.1.1-jre") {
|
||||
exclude(group = "com.google.code.findbugs", module = "jsr305")
|
||||
|
||||
@@ -121,6 +121,7 @@ public class ChatMessageManager
|
||||
final MessageNode messageNode = client.getMessages().get(uid);
|
||||
assert messageNode != null : "chat message build for unknown message";
|
||||
|
||||
String message = stringStack[size - 2];
|
||||
final String username = stringStack[size - 3];
|
||||
final String channel = stringStack[size - 4];
|
||||
final ChatMessageType chatMessageType = messageNode.getType();
|
||||
@@ -191,10 +192,17 @@ public class ChatMessageManager
|
||||
continue;
|
||||
}
|
||||
|
||||
String prefix = "";
|
||||
if (chatMessageType == ChatMessageType.CLAN_GIM_CHAT || chatMessageType == ChatMessageType.CLAN_GIM_MESSAGE)
|
||||
{
|
||||
message = message.substring(1); // remove |
|
||||
prefix = "|";
|
||||
}
|
||||
|
||||
// Replace </col> tags in the message with the new color so embedded </col> won't reset the color
|
||||
final Color color = chatColor.getColor();
|
||||
stringStack[size - 2] = ColorUtil.wrapWithColorTag(
|
||||
stringStack[size - 2].replace(ColorUtil.CLOSING_COLOR_TAG, ColorUtil.colorTag(color)),
|
||||
stringStack[size - 2] = prefix + ColorUtil.wrapWithColorTag(
|
||||
message.replace(ColorUtil.CLOSING_COLOR_TAG, ColorUtil.colorTag(color)),
|
||||
color);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -185,11 +185,24 @@ public interface RuneLiteConfig extends Config
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "trayIcon",
|
||||
name = "Enable tray icon",
|
||||
description = "Enables icon in system tray",
|
||||
warning = "Disabling this may limit your ability to receive tray notifications.\nPlease restart your client after changing this setting.",
|
||||
position = 20,
|
||||
section = notificationSettings
|
||||
)
|
||||
default boolean enableTrayIcon()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "notificationTray",
|
||||
name = "Enable tray notifications",
|
||||
description = "Enables tray notifications",
|
||||
position = 20,
|
||||
position = 21,
|
||||
section = notificationSettings
|
||||
)
|
||||
default boolean enableTrayNotifications()
|
||||
@@ -201,7 +214,7 @@ public interface RuneLiteConfig extends Config
|
||||
keyName = "notificationRequestFocus",
|
||||
name = "Request focus",
|
||||
description = "Configures the window focus request type on notification",
|
||||
position = 21,
|
||||
position = 22,
|
||||
section = notificationSettings
|
||||
)
|
||||
default RequestFocusType notificationRequestFocus()
|
||||
@@ -213,7 +226,7 @@ public interface RuneLiteConfig extends Config
|
||||
keyName = "notificationSound",
|
||||
name = "Notification sound",
|
||||
description = "Enables the playing of a beep sound when notifications are displayed",
|
||||
position = 22,
|
||||
position = 23,
|
||||
section = notificationSettings
|
||||
)
|
||||
default Notifier.NativeCustomOff notificationSound()
|
||||
@@ -225,7 +238,7 @@ public interface RuneLiteConfig extends Config
|
||||
keyName = "notificationTimeout",
|
||||
name = "Notification timeout",
|
||||
description = "How long notification will be shown in milliseconds. A value of 0 will make it use the system configuration. (Linux only)",
|
||||
position = 23,
|
||||
position = 24,
|
||||
section = notificationSettings
|
||||
)
|
||||
@Units(Units.MILLISECONDS)
|
||||
@@ -238,7 +251,7 @@ public interface RuneLiteConfig extends Config
|
||||
keyName = "notificationGameMessage",
|
||||
name = "Game message notifications",
|
||||
description = "Adds a notification message to the chatbox",
|
||||
position = 24,
|
||||
position = 25,
|
||||
section = notificationSettings
|
||||
)
|
||||
default boolean enableGameMessageNotification()
|
||||
@@ -250,7 +263,7 @@ public interface RuneLiteConfig extends Config
|
||||
keyName = "flashNotification",
|
||||
name = "Flash",
|
||||
description = "Flashes the game frame as a notification",
|
||||
position = 25,
|
||||
position = 26,
|
||||
section = notificationSettings
|
||||
)
|
||||
default FlashNotification flashNotification()
|
||||
@@ -262,7 +275,7 @@ public interface RuneLiteConfig extends Config
|
||||
keyName = "notificationFocused",
|
||||
name = "Send notifications when focused",
|
||||
description = "Toggles all notifications for when the client is focused",
|
||||
position = 26,
|
||||
position = 27,
|
||||
section = notificationSettings
|
||||
)
|
||||
default boolean sendNotificationsWhenFocused()
|
||||
@@ -275,7 +288,7 @@ public interface RuneLiteConfig extends Config
|
||||
keyName = "notificationFlashColor",
|
||||
name = "Notification Flash",
|
||||
description = "Sets the color of the notification flashes.",
|
||||
position = 27,
|
||||
position = 28,
|
||||
section = notificationSettings
|
||||
)
|
||||
default Color notificationFlashColor()
|
||||
|
||||
@@ -59,7 +59,7 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
||||
new AnagramClue("AHA JAR", "Jaraah", new WorldPoint(3359, 3276, 0), "Duel Arena hospital"),
|
||||
new AnagramClue("ARC O LINE", "Caroline", new WorldPoint(2715, 3302, 0), "North Witchaven next to the row boat", "How many fishermen are there on the fishing platform?", "11"),
|
||||
new AnagramClue("ARE COL", "Oracle", new WorldPoint(3013, 3501, 0), "Ice Mountain West of Edgeville", "If x is 15 and y is 3 what is 3x + y?", "48"),
|
||||
new AnagramClue("ARMCHAIR THE PELT", "Charlie the Tramp", new WorldPoint(3209, 3392, 0), "South entrance of Varrock", "How many coins would I have if I had 0 coins and attempted to buy 3 loaves of bread?", "0"),
|
||||
new AnagramClue("ARMCHAIR THE PELT", "Charlie the Tramp", new WorldPoint(3209, 3392, 0), "South entrance of Varrock", "How many coins would I have if I have 0 coins and attempt to buy 10 loaves of bread for 3 coins each?", "0"),
|
||||
new AnagramClue("AT HERG", "Regath", new WorldPoint(1719, 3723, 0), "General Store, Arceuus, Zeah", "What is -5 to the power of 2?", "25"),
|
||||
new AnagramClue("A BAS", "Saba", new WorldPoint(2858, 3577, 0), "Death Plateau"),
|
||||
new AnagramClue("AREA CHEF TREK", "Father Aereck", new WorldPoint(3243, 3208, 0), "Lumbridge Church", "How many gravestones are in the church graveyard?", "19 or 20"),
|
||||
@@ -73,7 +73,7 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
||||
new AnagramClue("CLASH ION", "Nicholas", new WorldPoint(1841, 3803, 0), "North of Port Piscarilius fishing shop", "How many windows are in Tynan's shop?", "4"),
|
||||
new AnagramClue("C ON GAME HOC", "Gnome Coach", new WorldPoint(2395, 3486, 0), "Gnome Ball course", "How many gnomes on the Gnome ball field have red patches on their uniforms?", "6"),
|
||||
new AnagramClue("COOL NERD", "Old crone", new WorldPoint(3462, 3557, 0), "East of the Slayer Tower", "What is the combined combat level of each species that live in Slayer tower?", "619"),
|
||||
new AnagramClue("COPPER ORE CRYPTS", "Prospector Percy", new WorldPoint(3061, 3377, 0), "Motherlode Mine", "During a party, everyone shook hands with everyone else. There were 66 handshakes. How many people were at the party?", "12"),
|
||||
new AnagramClue("COPPER ORE CRYPTS", "Prospector Percy", new WorldPoint(3061, 3377, 0), "Motherlode Mine", "During a party, everyone shook hands with everybody else. There were 66 handshakes. How many people were at the party?", "12"),
|
||||
new AnagramClue("DARN DRAKE", "Daer Krand", new WorldPoint(3728, 3302, 0), "Sisterhood Sanctuary (Slepe Dungeon, northeast of Nightmare Arena)"),
|
||||
new AnagramClue("DED WAR", "Edward", new WorldPoint(3284, 3943, 0), "Inside Rogue's Castle"),
|
||||
new AnagramClue("DEKAGRAM", "Dark mage", new WorldPoint(3039, 4835, 0), "Centre of the Abyss", "How many rifts are found here in the abyss?", "13"),
|
||||
@@ -81,14 +81,14 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
||||
new AnagramClue("DIM THARN", "Mandrith", new WorldPoint(3182, 3946, 0), "Wilderness Resource Area"),
|
||||
new AnagramClue("DR HITMAN", "Mandrith", new WorldPoint(3182, 3946, 0), "Wilderness Resource Area", "How many scorpions live under the pit?", "28"),
|
||||
new AnagramClue("DR WARDEN FUNK", "Drunken Dwarf", new WorldPoint(2913, 10221, 0), "East Side of Keldagrim"),
|
||||
new AnagramClue("DRAGONS LAMENT", "Strange Old Man", new WorldPoint(3564, 3288, 0), "Barrows", "One pipe fills a barrel in 1 hour while another pipe can fill the same barrel in 2 hours. How many minutes will it take to fill the take if both pipes are used?", "40"),
|
||||
new AnagramClue("DRAGONS LAMENT", "Strange Old Man", new WorldPoint(3564, 3288, 0), "Barrows", "One pipe fills a barrel in 1 hour while another pipe can fill the same barrel in 2 hours. How many minutes will it take to fill the tank if both pipes are used?", "40"),
|
||||
new AnagramClue("DT RUN B", "Brundt the Chieftain", new WorldPoint(2658, 3670, 0), "Rellekka, main hall", "How many people are waiting for the next bard to perform?", "4"),
|
||||
new AnagramClue("DUO PLUG", "Dugopul", new WorldPoint(2803, 2744, 0), "Graveyard on Ape Atoll"),
|
||||
new AnagramClue("EEK ZERO OP", "Zoo keeper", new WorldPoint(2613, 3269, 0), "Ardougne Zoo", "How many animals are in the Ardougne Zoo?", "40"),
|
||||
new AnagramClue("EEK ZERO OP", "Zoo keeper", new WorldPoint(2613, 3269, 0), "Ardougne Zoo", "How many animals in total are there in the zoo?", "40"),
|
||||
new AnagramClue("EL OW", "Lowe", new WorldPoint(3233, 3423, 0), "Varrock archery store"),
|
||||
new AnagramClue("FORLUN", "Runolf", new WorldPoint(2512, 10256, 0), "Miscellania & Etceteria Dungeon"),
|
||||
new AnagramClue("GOBLIN KERN", "King Bolren", new WorldPoint(2541, 3170, 0), "Tree Gnome Village"),
|
||||
new AnagramClue("GOT A BOY", "Gabooty", new WorldPoint(2790, 3066, 0), "Centre of Tai Bwo Wannai", "How many buildings in the village?", "11"),
|
||||
new AnagramClue("GOT A BOY", "Gabooty", new WorldPoint(2790, 3066, 0), "Centre of Tai Bwo Wannai", "How many buildings are in the village?", "11"),
|
||||
new AnagramClue("GOBLETS ODD TOES", "Otto Godblessed", new WorldPoint(2501, 3487, 0), "Otto's Grotto", "How many types of dragon are there beneath the whirlpool's cavern?", "2"),
|
||||
new AnagramClue("HALT US", "Luthas", new WorldPoint(2938, 3152, 0), "Banana plantation, Karamja"),
|
||||
new AnagramClue("HEORIC", "Eohric", new WorldPoint(2900, 3565, 0), "Top floor of Burthorpe Castle", "King Arthur and Merlin sit down at the Round Table with 8 knights. How many degrees does each get?", "36"),
|
||||
@@ -98,9 +98,9 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
||||
new AnagramClue("I DOOM ICON INN", "Dominic Onion", new WorldPoint(2609, 3116, 0), "Nightmare Zone", "How many reward points does a herb box cost?", "9,500"),
|
||||
new AnagramClue("I EVEN", "Nieve", new WorldPoint(2432, 3422, 0), "The slayer master in Gnome Stronghold", "How many farming patches are there in Gnome stronghold?", "2"),
|
||||
new AnagramClue("IM N ZEZIM", "Immenizz", new WorldPoint(2592, 4324, 0), "The Imp inside Puro-Puro"),
|
||||
new AnagramClue("KAY SIR", "Sir Kay", new WorldPoint(2760, 3496, 0), "The courtyard in Camelot Castle", "How many fountains are there within the grounds of Camelot castle.", "6"),
|
||||
new AnagramClue("KAY SIR", "Sir Kay", new WorldPoint(2760, 3496, 0), "The courtyard in Camelot Castle", "How many fountains are there within the grounds of Camelot castle?", "6"),
|
||||
new AnagramClue("LEAKEY", "Kaylee", new WorldPoint(2957, 3370, 0), "Rising Sun Inn in Falador", "How many chairs are there in the Rising Sun?", "18"),
|
||||
new AnagramClue("LARK IN DOG", "King Roald", new WorldPoint(3220, 3476, 0), "Ground floor of Varrock castle", "How many bookcases are there in the Varrock palace library?", "24"),
|
||||
new AnagramClue("LARK IN DOG", "King Roald", new WorldPoint(3220, 3476, 0), "Ground floor of Varrock castle", "How many bookcases are there in the palace library?", "24"),
|
||||
new AnagramClue("LOW LAG", "Gallow", new WorldPoint(1805, 3566, 0), "Vinery in the Great Kourend", "How many vine patches can you find in this vinery?", "12"),
|
||||
new AnagramClue("LADDER MEMO GUV", "Guard Vemmeldo", new WorldPoint(2447, 3418, 1), "Gnome Stronghold Bank", "How many magic trees can you find inside the Gnome Stronghold?", "3"),
|
||||
new AnagramClue("MAL IN TAU", "Luminata", new WorldPoint(3508, 3237, 0), "Near Burgh de Rott entrance"),
|
||||
@@ -120,7 +120,7 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
||||
new AnagramClue("PEATY PERT", "Party Pete", new WorldPoint(3047, 3376, 0), "Falador Party Room"),
|
||||
new AnagramClue("QUIT HORRIBLE TYRANT", "Brother Tranquility", new WorldPoint(3681, 2963, 0), "Mos Le'Harmless or Harmony Island", "If I have 49 bottles of rum to share between 7 pirates, how many would each pirate get?", "7"),
|
||||
new AnagramClue("QUE SIR", "Squire", new WorldPoint(2975, 3343, 0), "Falador Castle Courtyard", "White knights are superior to black knights. 2 white knights can handle 3 black knights. How many knights do we need for an army of 981 black knights?", "654"),
|
||||
new AnagramClue("R AK MI", "Karim", new WorldPoint(3273, 3181, 0), "Al Kharid Kebab shop", "I have 16 kebabs, I eat one myself and share the rest equally between 3 friends. How many do they have each?", "5"),
|
||||
new AnagramClue("R AK MI", "Karim", new WorldPoint(3273, 3181, 0), "Al Kharid Kebab shop", "I have 16 kebabs, I eat one myself and then share the rest equally between 3 friends. How many do they have each?", "5"),
|
||||
new AnagramClue("RAT MAT WITHIN", "Martin Thwait", new WorldPoint(2906, 3537, 0), "Rogues' Den", "How many natural fires burn in Rogue's Den?", "2"),
|
||||
new AnagramClue("RATAI", "Taria", new WorldPoint(2940, 3223, 0), "Rimmington bush patch", "How many buildings are there in Rimmington?", "7"),
|
||||
new AnagramClue("R SLICER", "Clerris", new WorldPoint(1761, 3850, 0), "Arceuus mine, Zeah", "If I have 1,000 blood runes, and cast 131 ice barrage spells, how many blood runes do I have left?", "738"),
|
||||
|
||||
@@ -29,7 +29,6 @@ package net.runelite.client.plugins.menuentryswapper;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import static com.google.common.base.Predicates.alwaysTrue;
|
||||
import static com.google.common.base.Predicates.equalTo;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.LinkedHashMultimap;
|
||||
@@ -54,7 +53,6 @@ import net.runelite.api.NPC;
|
||||
import net.runelite.api.events.ClientTick;
|
||||
import net.runelite.api.events.MenuEntryAdded;
|
||||
import net.runelite.api.events.MenuOpened;
|
||||
import net.runelite.api.events.MenuOptionClicked;
|
||||
import net.runelite.api.events.PostItemComposition;
|
||||
import net.runelite.api.widgets.WidgetID;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
@@ -540,7 +538,7 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
MenuAction activeAction = MenuAction.ITEM_USE;
|
||||
MenuAction activeAction = null;
|
||||
final ItemComposition itemComposition = itemManager.getItemComposition(itemId);
|
||||
|
||||
if (configuringShiftClick)
|
||||
@@ -553,20 +551,18 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
{
|
||||
activeAction = MenuAction.of(MenuAction.ITEM_FIRST_OPTION.getId() + shiftClickActionIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise it is possible that we have Use swap configured
|
||||
Integer config = getSwapConfig(true, itemId);
|
||||
if (config != null && config == -1)
|
||||
{
|
||||
activeAction = MenuAction.ITEM_USE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// The default left click on items is the highest priority action 0-2, and otherwise is use.
|
||||
final String[] actions = itemComposition.getInventoryActions();
|
||||
for (int i = 0; i <= 2; ++i)
|
||||
{
|
||||
if (!Strings.isNullOrEmpty(actions[i]))
|
||||
{
|
||||
activeAction = MenuAction.of(MenuAction.ITEM_FIRST_OPTION.getId() + i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Apply left click action from configuration
|
||||
Integer config = getSwapConfig(false, itemId);
|
||||
if (config != null)
|
||||
@@ -586,6 +582,13 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
if (ITEM_MENU_TYPES.contains(menuAction) && entry.getIdentifier() == itemId)
|
||||
{
|
||||
entry.setType(MenuAction.RUNELITE);
|
||||
entry.onClick(e ->
|
||||
{
|
||||
int index = menuAction == MenuAction.ITEM_USE
|
||||
? -1
|
||||
: menuAction.getId() - MenuAction.ITEM_FIRST_OPTION.getId();
|
||||
setSwapConfig(configuringShiftClick, itemId, index);
|
||||
});
|
||||
|
||||
if (activeAction == menuAction)
|
||||
{
|
||||
@@ -673,49 +676,6 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onMenuOptionClicked(MenuOptionClicked event)
|
||||
{
|
||||
if (event.getMenuAction() != MenuAction.RUNELITE || event.getParam1() != WidgetInfo.INVENTORY.getId())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int itemId = event.getId();
|
||||
|
||||
if (itemId == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String option = event.getMenuOption();
|
||||
String target = event.getMenuTarget();
|
||||
ItemComposition itemComposition = itemManager.getItemComposition(itemId);
|
||||
|
||||
if (!itemComposition.getName().equals(Text.removeTags(target)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (option.equals("Use")) //because "Use" is not in inventoryActions
|
||||
{
|
||||
setSwapConfig(configuringShiftClick, itemId, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
String[] inventoryActions = itemComposition.getInventoryActions();
|
||||
|
||||
for (int index = 0; index < inventoryActions.length; index++)
|
||||
{
|
||||
if (option.equals(inventoryActions[index]))
|
||||
{
|
||||
setSwapConfig(configuringShiftClick, itemId, index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void swapMenuEntry(MenuEntry[] menuEntries, int index, MenuEntry menuEntry)
|
||||
{
|
||||
final int eventId = menuEntry.getIdentifier();
|
||||
@@ -761,7 +721,7 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
if (itemOp)
|
||||
{
|
||||
Integer swapIndex = getSwapConfig(false, eventId);
|
||||
if (swapIndex != null && index < menuEntries.length - 1)
|
||||
if (swapIndex != null)
|
||||
{
|
||||
MenuAction swapAction = swapIndex >= 0
|
||||
? MenuAction.of(MenuAction.ITEM_FIRST_OPTION.getId() + swapIndex)
|
||||
@@ -770,8 +730,8 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
if (menuAction == swapAction)
|
||||
{
|
||||
swap(optionIndexes, menuEntries, index, menuEntries.length - 1);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -525,7 +525,10 @@ public class ClientUI
|
||||
frame.revalidateMinimumSize();
|
||||
|
||||
// Create tray icon (needs to be created after frame is packed)
|
||||
trayIcon = SwingUtil.createTrayIcon(ICON, title, frame);
|
||||
if (config.enableTrayIcon())
|
||||
{
|
||||
trayIcon = SwingUtil.createTrayIcon(ICON, title, frame);
|
||||
}
|
||||
|
||||
// Move frame around (needs to be done after frame is packed)
|
||||
if (config.rememberScreenBounds() && !safeMode)
|
||||
|
||||
Reference in New Issue
Block a user