Merge branch 'upstream-master' into runelite

This commit is contained in:
zeruth
2021-02-03 21:13:36 -05:00
7 changed files with 23 additions and 6 deletions

View File

@@ -220,7 +220,7 @@ public class FlatStorage implements Storage
br.printf("revision=%d\n", idx.getRevision()); br.printf("revision=%d\n", idx.getRevision());
br.printf("compression=%d\n", idx.getCompression()); br.printf("compression=%d\n", idx.getCompression());
br.printf("crc=%d\n", idx.getCrc()); br.printf("crc=%d\n", idx.getCrc());
br.printf("named=%b\n", idx.getCompression()); br.printf("named=%b\n", idx.isNamed());
idx.getArchives().sort(Comparator.comparing(Archive::getArchiveId)); idx.getArchives().sort(Comparator.comparing(Archive::getArchiveId));
for (Archive archive : idx.getArchives()) for (Archive archive : idx.getArchives())

View File

@@ -56,6 +56,10 @@ public class MenuOptionClicked extends MenuEntry implements Event
this.mouseButton = mouseButton; this.mouseButton = mouseButton;
} }
/**
* The selected item index at the time of the option click.
*/
private int selectedItemIndex;
/** /**
* Whether or not the event has been consumed by a subscriber. * Whether or not the event has been consumed by a subscriber.
*/ */

View File

@@ -394,7 +394,7 @@ public class ConfigManager
parent.mkdirs(); parent.mkdirs();
File tempFile = new File(parent, RuneLite.DEFAULT_CONFIG_FILE.getName() + ".tmp"); File tempFile = File.createTempFile("runelite", null, parent);
try (FileOutputStream out = new FileOutputStream(tempFile)) try (FileOutputStream out = new FileOutputStream(tempFile))
{ {

View File

@@ -145,7 +145,8 @@ public class LootTrackerPlugin extends Plugin
// Chest loot handling // Chest loot handling
private static final String CHEST_LOOTED_MESSAGE = "You find some treasure in the chest!"; private static final String CHEST_LOOTED_MESSAGE = "You find some treasure in the chest!";
private static final Pattern LARRAN_LOOTED_PATTERN = Pattern.compile("You have opened Larran's (big|small) chest .*"); private static final Pattern LARRAN_LOOTED_PATTERN = Pattern.compile("You have opened Larran's (big|small) chest .*");
private static final String STONE_CHEST_LOOTED_MESSAGE = "You steal some loot from the chest."; // Used by Stone Chest, Isle of Souls chest, Dark Chest
private static final String OTHER_CHEST_LOOTED_MESSAGE = "You steal some loot from the chest.";
private static final String DORGESH_KAAN_CHEST_LOOTED_MESSAGE = "You find treasure inside!"; private static final String DORGESH_KAAN_CHEST_LOOTED_MESSAGE = "You find treasure inside!";
private static final String GRUBBY_CHEST_LOOTED_MESSAGE = "You have opened the Grubby Chest"; private static final String GRUBBY_CHEST_LOOTED_MESSAGE = "You have opened the Grubby Chest";
private static final Pattern HAM_CHEST_LOOTED_PATTERN = Pattern.compile("Your (?<key>[a-z]+) key breaks in the lock.*"); private static final Pattern HAM_CHEST_LOOTED_PATTERN = Pattern.compile("Your (?<key>[a-z]+) key breaks in the lock.*");
@@ -161,6 +162,8 @@ public class LootTrackerPlugin extends Plugin
put(10835, "Dorgesh-Kaan Chest"). put(10835, "Dorgesh-Kaan Chest").
put(10834, "Dorgesh-Kaan Chest"). put(10834, "Dorgesh-Kaan Chest").
put(7323, "Grubby Chest"). put(7323, "Grubby Chest").
put(8593, "Isle of Souls Chest").
put(7827, "Dark Chest").
build(); build();
// Shade chest loot handling // Shade chest loot handling
@@ -186,6 +189,11 @@ public class LootTrackerPlugin extends Plugin
put(ObjectID.SILVER_CHEST_4128, "Silver key crimson"). put(ObjectID.SILVER_CHEST_4128, "Silver key crimson").
put(ObjectID.SILVER_CHEST_4129, "Silver key black"). put(ObjectID.SILVER_CHEST_4129, "Silver key black").
put(ObjectID.SILVER_CHEST_4130, "Silver key purple"). put(ObjectID.SILVER_CHEST_4130, "Silver key purple").
put(ObjectID.GOLD_CHEST, "Gold key red").
put(ObjectID.GOLD_CHEST_41213, "Gold key brown").
put(ObjectID.GOLD_CHEST_41214, "Gold key crimson").
put(ObjectID.GOLD_CHEST_41215, "Gold key black").
put(ObjectID.GOLD_CHEST_41216, "Gold key purple").
build(); build();
// Hallow Sepulchre Coffin handling // Hallow Sepulchre Coffin handling
@@ -625,7 +633,7 @@ public class LootTrackerPlugin extends Plugin
final String message = event.getMessage(); final String message = event.getMessage();
if (message.equals(CHEST_LOOTED_MESSAGE) || message.equals(STONE_CHEST_LOOTED_MESSAGE) if (message.equals(CHEST_LOOTED_MESSAGE) || message.equals(OTHER_CHEST_LOOTED_MESSAGE)
|| message.equals(DORGESH_KAAN_CHEST_LOOTED_MESSAGE) || message.startsWith(GRUBBY_CHEST_LOOTED_MESSAGE) || message.equals(DORGESH_KAAN_CHEST_LOOTED_MESSAGE) || message.startsWith(GRUBBY_CHEST_LOOTED_MESSAGE)
|| LARRAN_LOOTED_PATTERN.matcher(message).matches()) || LARRAN_LOOTED_PATTERN.matcher(message).matches())
{ {

View File

@@ -466,6 +466,7 @@ public class MusicPlugin extends Plugin
public void update() public void update()
{ {
handle.setNoClickThrough(false);
handle.setOnDragListener((JavaScriptCallback) this::drag); handle.setOnDragListener((JavaScriptCallback) this::drag);
handle.setOnDragCompleteListener((JavaScriptCallback) this::drag); handle.setOnDragCompleteListener((JavaScriptCallback) this::drag);
handle.setHasListener(true); handle.setHasListener(true);
@@ -511,6 +512,9 @@ public class MusicPlugin extends Plugin
int level = (x * channel.max) / getWidth(); int level = (x * channel.max) / getWidth();
level = Ints.constrainToRange(level, 0, channel.max); level = Ints.constrainToRange(level, 0, channel.max);
channel.setLevel(level); channel.setLevel(level);
int percent = (int) Math.round((level * 100.0 / channel.getMax()));
sliderTooltip = new Tooltip(channel.getName() + ": " + percent + "%");
} }
protected int getWidth() protected int getWidth()

View File

@@ -55,6 +55,7 @@ enum MinigameLocation
PYRAMID_PLUNDER("Pyramid Plunder", new WorldPoint(3288, 2787, 0)), PYRAMID_PLUNDER("Pyramid Plunder", new WorldPoint(3288, 2787, 0)),
RANGING_GUILD("Ranging Guild", new WorldPoint(2671, 3419, 0)), RANGING_GUILD("Ranging Guild", new WorldPoint(2671, 3419, 0)),
ROGUES_DEN("Rogues' Den", new WorldPoint(2905, 3537, 0)), ROGUES_DEN("Rogues' Den", new WorldPoint(2905, 3537, 0)),
SHADES_OF_MORTTON("Shades of Mort'ton", new WorldPoint(3505, 3315, 0)),
SORCERESSS_GARDEN("Sorceress's Garden", new WorldPoint(3285, 3180, 0)), SORCERESSS_GARDEN("Sorceress's Garden", new WorldPoint(3285, 3180, 0)),
TROUBLE_BREWING("Trouble Brewing", new WorldPoint(3811, 3021, 0)), TROUBLE_BREWING("Trouble Brewing", new WorldPoint(3811, 3021, 0)),
VOLCANIC_MINE("Volcanic Mine", new WorldPoint(3812, 3810, 0)), VOLCANIC_MINE("Volcanic Mine", new WorldPoint(3812, 3810, 0)),

View File

@@ -186,7 +186,7 @@ public class WorldMapPlugin extends Plugin
{ {
case AGILITY: case AGILITY:
{ {
int newAgilityLevel = statChanged.getLevel(); int newAgilityLevel = statChanged.getBoostedLevel();
if (newAgilityLevel != agilityLevel) if (newAgilityLevel != agilityLevel)
{ {
agilityLevel = newAgilityLevel; agilityLevel = newAgilityLevel;
@@ -196,7 +196,7 @@ public class WorldMapPlugin extends Plugin
} }
case WOODCUTTING: case WOODCUTTING:
{ {
int newWoodcutLevel = statChanged.getLevel(); int newWoodcutLevel = statChanged.getBoostedLevel();
if (newWoodcutLevel != woodcuttingLevel) if (newWoodcutLevel != woodcuttingLevel)
{ {
woodcuttingLevel = newWoodcutLevel; woodcuttingLevel = newWoodcutLevel;