diff --git a/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java b/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java index ee8486811b..f394c17f40 100644 --- a/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java +++ b/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java @@ -32,7 +32,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import javax.annotation.Nullable; import javax.inject.Singleton; -import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; import net.runelite.api.hooks.Callbacks; import net.runelite.client.account.SessionManager; @@ -56,7 +55,6 @@ import okhttp3.OkHttpClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -@Slf4j public class RuneLiteModule extends AbstractModule { private final ClientUpdateCheckMode updateCheckMode; diff --git a/runelite-client/src/main/java/net/runelite/client/chat/ChatCommandManager.java b/runelite-client/src/main/java/net/runelite/client/chat/ChatCommandManager.java index b1aa9b3ac2..f930992d08 100644 --- a/runelite-client/src/main/java/net/runelite/client/chat/ChatCommandManager.java +++ b/runelite-client/src/main/java/net/runelite/client/chat/ChatCommandManager.java @@ -31,7 +31,6 @@ import java.util.function.BiConsumer; import java.util.function.BiPredicate; import javax.inject.Inject; import javax.inject.Singleton; -import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; import net.runelite.api.GameState; import net.runelite.api.events.ChatMessage; @@ -42,7 +41,6 @@ import net.runelite.client.events.ChatboxInput; import net.runelite.client.events.PrivateMessageInput; @Singleton -@Slf4j public class ChatCommandManager implements ChatboxInputListener { private final Map commands = new HashMap<>(); diff --git a/runelite-client/src/main/java/net/runelite/client/game/SpriteManager.java b/runelite-client/src/main/java/net/runelite/client/game/SpriteManager.java index df81112d27..aca3a9ea14 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/SpriteManager.java +++ b/runelite-client/src/main/java/net/runelite/client/game/SpriteManager.java @@ -37,14 +37,12 @@ import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.SwingUtilities; -import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; import net.runelite.api.GameState; import net.runelite.api.Sprite; import net.runelite.client.callback.ClientThread; import net.runelite.client.util.ImageUtil; -@Slf4j @Singleton public class SpriteManager { diff --git a/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxTextMenuInput.java b/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxTextMenuInput.java index d1c7d8fd44..cb4cc632e5 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxTextMenuInput.java +++ b/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxTextMenuInput.java @@ -31,7 +31,6 @@ import java.util.List; import lombok.AllArgsConstructor; import lombok.Data; import lombok.Getter; -import lombok.extern.slf4j.Slf4j; import net.runelite.api.FontID; import net.runelite.api.widgets.JavaScriptCallback; import net.runelite.api.widgets.Widget; @@ -41,7 +40,6 @@ import net.runelite.api.widgets.WidgetTextAlignment; import net.runelite.api.widgets.WidgetType; import net.runelite.client.input.KeyListener; -@Slf4j public class ChatboxTextMenuInput extends ChatboxInput implements KeyListener { @Data diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java index 1e26d51f87..66f25035c3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java @@ -565,7 +565,15 @@ public class TabInterface return; } - if (event.getActionParam1() == WidgetInfo.BANK_ITEM_CONTAINER.getId() + if (chatboxPanelManager.getCurrentInput() != null + && event.getMenuAction() != MenuAction.CANCEL + && !event.getMenuEntry().equals(SCROLL_UP) + && !event.getMenuEntry().equals(SCROLL_DOWN)) + { + chatboxPanelManager.close(); + } + + if (event.getIdentifier() == WidgetInfo.BANK_ITEM_CONTAINER.getId() && event.getMenuAction() == MenuAction.EXAMINE_ITEM_BANK_EQ && event.getOption().equalsIgnoreCase("withdraw-x")) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CoordinateClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CoordinateClue.java index ec7334ca2b..2fb7891866 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CoordinateClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CoordinateClue.java @@ -96,7 +96,7 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati .put(new WorldPoint(2542, 3031, 0), "Gu'Tanoth.") .put(new WorldPoint(2581, 3030, 0), "Gu'Tanoth island, enter cave north-west of Feldip Hills (AKS).") .put(new WorldPoint(2961, 3024, 0), "Ship yard (DKP).") - .put(new WorldPoint(2339, 3311, 0), "East of Tirannwn on Arandar mountain pass.") + .put(new WorldPoint(2339, 3311, 0), "East of Prifddinas on Arandar mountain pass.") .put(new WorldPoint(3440, 3341, 0), "Nature Spirit's grotto.") .put(new WorldPoint(2763, 2974, 0), "Cairn Isle, west of Shilo Village.") .put(new WorldPoint(3138, 2969, 0), "West of Bandit Camp.") diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/HotColdClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/HotColdClue.java index ae18259fb4..1cfb81246a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/HotColdClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/HotColdClue.java @@ -62,14 +62,17 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat private static final int HOT_COLD_PANEL_WIDTH = 200; private static final HotColdClue BEGINNER_CLUE = new HotColdClue("Buried beneath the ground, who knows where it's found. Lucky for you, A man called Reldo may have a clue.", "Reldo", - "Speak to Reldo to receive a strange device."); + "Speak to Reldo to receive a strange device.", + new WorldPoint(3211, 3494, 0)); private static final HotColdClue MASTER_CLUE = new HotColdClue("Buried beneath the ground, who knows where it's found. Lucky for you, A man called Jorral may have a clue.", "Jorral", - "Speak to Jorral to receive a strange device."); + "Speak to Jorral to receive a strange device.", + new WorldPoint(2436, 3347, 0)); private final String text; private final String npc; private final String solution; + private final WorldPoint npcLocation; @Nullable private HotColdSolver hotColdSolver; private WorldPoint location; @@ -90,11 +93,12 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat return null; } - private HotColdClue(String text, String npc, String solution) + private HotColdClue(String text, String npc, String solution, WorldPoint npcLocation) { this.text = text; this.npc = npc; this.solution = solution; + this.npcLocation = npcLocation; setRequiresSpade(true); initializeSolver(); } @@ -107,7 +111,14 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat return new WorldPoint[0]; } - return hotColdSolver.getPossibleLocations().stream().map(HotColdLocation::getWorldPoint).toArray(WorldPoint[]::new); + if (hotColdSolver.getLastWorldPoint() == null) + { + return new WorldPoint[] {npcLocation}; + } + else + { + return hotColdSolver.getPossibleLocations().stream().map(HotColdLocation::getWorldPoint).toArray(WorldPoint[]::new); + } } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/STASHUnit.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/STASHUnit.java index 8e196c421c..bf66bcefb1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/STASHUnit.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/STASHUnit.java @@ -103,7 +103,7 @@ public enum STASHUnit ENTRANCE_OF_THE_CAVE_OF_DAMIS(NullObjectID.NULL_29027, new WorldPoint(2629, 5070, 0)), WARRIORS_GUILD_BANK(NullObjectID.NULL_29028, new WorldPoint(2844, 3537, 0)), SOUTHEAST_CORNER_OF_THE_MONASTERY(NullObjectID.NULL_29029, new WorldPoint(3056, 3482, 0)), - SOUTHEAST_CORNER_OF_THE_FISHING_PLATFORM(NullObjectID.NULL_29030, new WorldPoint(2787, 3277, 1)), + SOUTHEAST_CORNER_OF_THE_FISHING_PLATFORM(NullObjectID.NULL_29030, new WorldPoint(2787, 3277, 0)), OUTSIDE_THE_SLAYER_TOWER_GARGOYLE_ROOM(NullObjectID.NULL_29031, new WorldPoint(3423, 3534, 2)), ON_TOP_OF_TROLLHEIM_MOUNTAIN(NullObjectID.NULL_29032, new WorldPoint(2886, 3676, 0)), FOUNTAIN_OF_HEROES(NullObjectID.NULL_29033, new WorldPoint(2916, 9891, 0)), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksPlugin.java index 764b93a308..ed81cc7177 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/dailytaskindicators/DailyTasksPlugin.java @@ -174,7 +174,7 @@ public class DailyTasksPlugin extends Plugin { checkArrows(dailyReset); } - + if (this.showDynamite) { checkDynamite(dailyReset); @@ -245,8 +245,9 @@ public class DailyTasksPlugin extends Plugin private void checkArrows(boolean dailyReset) { - if ((client.getVar(Varbits.DIARY_WESTERN_EASY) == 1) - && (dailyReset || client.getVar(Varbits.DAILY_ARROWS_STATE) == 0)) + if (client.getVar(Varbits.DIARY_WESTERN_EASY) == 1 + && (client.getVar(Varbits.DAILY_ARROWS_STATE) == 0 + || dailyReset)) { sendChatMessage(ARROWS_MESSAGE); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GLUtil.java b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GLUtil.java index 8c4bf270fc..48b597c2c0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GLUtil.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GLUtil.java @@ -27,9 +27,7 @@ package net.runelite.client.plugins.gpu; import com.jogamp.opengl.GL4; import java.io.InputStream; import java.util.Scanner; -import lombok.extern.slf4j.Slf4j; -@Slf4j class GLUtil { private static final int ERR_LEN = 1024; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/WidgetOffset.java b/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/WidgetOffset.java index 920aa0a818..0d5b7ea54e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/WidgetOffset.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/WidgetOffset.java @@ -111,7 +111,7 @@ enum WidgetOffset RESIZABLE_2005_EQUIPMENT_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_EQUIPMENT_ICON, null, 2, null, null), RESIZABLE_2005_MUSIC_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_MUSIC_ICON, null, 3, null, null), - RESIZABLE_BOTTOM_2005_INVENTORY_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_ICON, null, -2, null, null), + RESIZABLE_BOTTOM_2005_INVENTORY_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_ICON, 98, 2, null, null), RESIZABLE_BOTTOM_2005_QUESTS_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_QUESTS_ICON, 67, 0, null, null), RESIZABLE_BOTTOM_2005_EQUIPMENT_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_EQUIPMENT_ICON, 132, 2, null, null), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java index c1ccaada8e..d71bcc0074 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java @@ -85,7 +85,41 @@ enum ItemIdentification TEAK_SAPLING(Type.SAPLING, "Teak", "TEAK", ItemID.TEAK_SAPLING, ItemID.TEAK_SEEDLING, ItemID.TEAK_SEEDLING_W), MAHOGANY_SAPLING(Type.SAPLING, "Mahog", "MAHOG", ItemID.MAHOGANY_SAPLING, ItemID.MAHOGANY_SEEDLING, ItemID.MAHOGANY_SEEDLING_W), CALQUAT_SAPLING(Type.SAPLING, "Calquat", "CALQ", ItemID.CALQUAT_SAPLING, ItemID.CALQUAT_SEEDLING, ItemID.CALQUAT_SEEDLING_W), - CELASTRUS_SAPLING(Type.SAPLING, "Celas", "CEL", ItemID.CELASTRUS_SAPLING, ItemID.CELASTRUS_SEEDLING, ItemID.CELASTRUS_SEEDLING_W); + CELASTRUS_SAPLING(Type.SAPLING, "Celas", "CEL", ItemID.CELASTRUS_SAPLING, ItemID.CELASTRUS_SEEDLING, ItemID.CELASTRUS_SEEDLING_W), + + //Ores + COPPER_ORE(Type.ORE, "Copper", "COP", ItemID.COPPER_ORE), + TIN_ORE(Type.ORE, "Tin", "TIN", ItemID.TIN_ORE), + IRON_ORE(Type.ORE, "Iron", "IRO", ItemID.IRON_ORE), + SILVER_ORE(Type.ORE, "Silver", "SIL", ItemID.SILVER_ORE), + COAL_ORE(Type.ORE, "Coal", "COA", ItemID.COAL), + GOLD_ORE(Type.ORE, "Gold", "GOL", ItemID.GOLD_ORE), + MITHRIL_ORE(Type.ORE, "Mithril", "MIT", ItemID.MITHRIL_ORE), + ADAMANTITE_ORE(Type.ORE, "Adaman", "ADA", ItemID.ADAMANTITE_ORE), + RUNITE_ORE(Type.ORE, "Runite", "RUN", ItemID.RUNITE_ORE), + + RUNE_ESSENCE(Type.ORE, "R.Ess", "R.E.", ItemID.RUNE_ESSENCE), + PURE_ESSENCE(Type.ORE, "P.Ess", "P.E.", ItemID.PURE_ESSENCE), + + PAYDIRT(Type.ORE, "Paydirt", "PAY", ItemID.PAYDIRT), + AMETHYST(Type.ORE, "Amethy", "AME", ItemID.AMETHYST), + LOVAKITE_ORE(Type.ORE, "Lovakit", "LOV", ItemID.LOVAKITE_ORE), + BLURITE_ORE(Type.ORE, "Blurite", "BLU", ItemID.BLURITE_ORE), + ELEMENTAL_ORE(Type.ORE, "Element", "ELE", ItemID.ELEMENTAL_ORE), + DAEYALT_ORE(Type.ORE, "Daeyalt", "DAE", ItemID.DAEYALT_ORE), + LUNAR_ORE(Type.ORE, "Lunar", "LUN", ItemID.LUNAR_ORE), + + //Gems + SAPPHIRE(Type.GEM, "Sapphir", "S", ItemID.UNCUT_SAPPHIRE, ItemID.SAPPHIRE), + EMERALD(Type.GEM, "Emerald", "E", ItemID.UNCUT_EMERALD, ItemID.EMERALD), + RUBY(Type.GEM, "Ruby", "R", ItemID.UNCUT_RUBY, ItemID.RUBY), + DIAMOND(Type.GEM, "Diamon", "DI", ItemID.UNCUT_DIAMOND, ItemID.DIAMOND), + OPAL(Type.GEM, "Opal", "OP", ItemID.UNCUT_OPAL, ItemID.OPAL), + JADE(Type.GEM, "Jade", "J", ItemID.UNCUT_JADE, ItemID.JADE), + RED_TOPAZ(Type.GEM, "Topaz", "T", ItemID.UNCUT_RED_TOPAZ, ItemID.RED_TOPAZ), + DRAGONSTONE(Type.GEM, "Dragon", "DR", ItemID.UNCUT_DRAGONSTONE, ItemID.DRAGONSTONE), + ONYX(Type.GEM, "Onyx", "ON", ItemID.UNCUT_ONYX, ItemID.ONYX), + ZENYTE(Type.GEM, "Zenyte", "Z", ItemID.UNCUT_ZENYTE, ItemID.ZENYTE); final Type type; final String medName; @@ -126,6 +160,8 @@ enum ItemIdentification { SEED, HERB, - SAPLING + SAPLING, + ORE, + GEM } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationConfig.java index 12009a284f..f8e524b35a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationConfig.java @@ -83,4 +83,24 @@ public interface ItemIdentificationConfig extends Config { return true; } + + @ConfigItem( + keyName = "showOres", + name = "Ores", + description = "Show identification on Ores" + ) + default boolean showOres() + { + return false; + } + + @ConfigItem( + keyName = "showGems", + name = "Gems", + description = "Show identification on Gems" + ) + default boolean showGems() + { + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationOverlay.java index 416073704f..edfc850851 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationOverlay.java @@ -82,6 +82,18 @@ class ItemIdentificationOverlay extends WidgetItemOverlay return; } break; + case ORE: + if (!plugin.isShowOres()) + { + return; + } + break; + case GEM: + if (!plugin.isShowGems()) + { + return; + } + break; } graphics.setFont(FontManager.getRunescapeSmallFont()); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationPlugin.java index 1a8e9fa293..2bc032f0f9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentificationPlugin.java @@ -64,6 +64,10 @@ public class ItemIdentificationPlugin extends Plugin private boolean showHerbs; @Getter(AccessLevel.PACKAGE) private boolean showSaplings; + @Getter(AccessLevel.PACKAGE) + private boolean showOres; + @Getter(AccessLevel.PACKAGE) + private boolean showGems; @Provides ItemIdentificationConfig getConfig(ConfigManager configManager) @@ -102,5 +106,7 @@ public class ItemIdentificationPlugin extends Plugin this.showSeeds = config.showSeeds(); this.showHerbs = config.showHerbs(); this.showSaplings = config.showSaplings(); + this.showOres = config.showOres(); + this.showGems = config.showGems(); } } \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPanel.java index cb4ce03bf2..f504ccea15 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPanel.java @@ -393,7 +393,7 @@ class LootTrackerPanel extends PluginPanel layoutPanel.add(logsContainer); // Add error pane - errorPanel.setContent("Loot trackers", "You have not received any loot yet."); + errorPanel.setContent("Loot tracker", "You have not received any loot yet."); add(errorPanel); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java index c1bb032c55..fee4f7049c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java @@ -63,6 +63,7 @@ import lombok.Getter; import lombok.extern.slf4j.Slf4j; import net.runelite.api.ChatMessageType; import net.runelite.api.Client; +import net.runelite.api.GameState; import net.runelite.api.InventoryID; import net.runelite.api.Item; import net.runelite.api.ItemContainer; @@ -75,6 +76,7 @@ import net.runelite.api.WorldType; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.ConfigChanged; +import net.runelite.api.events.GameStateChanged; import net.runelite.api.events.ItemContainerChanged; import net.runelite.api.events.LocalPlayerDeath; import net.runelite.api.events.PlayerSpawned; @@ -168,6 +170,8 @@ public class LootTrackerPlugin extends Plugin private LootTrackerPanel panel; private NavigationButton navButton; private String eventType; + private boolean chestLooted; + private List ignoredItems = new ArrayList<>(); private List ignoredNPCs = new ArrayList<>(); private Multiset inventorySnapshot; @@ -376,6 +380,16 @@ public class LootTrackerPlugin extends Plugin clientToolbar.removeNavigation(navButton); lootTrackerClient = null; lootRecords = new ArrayList<>(); + chestLooted = false; + } + + @Subscribe + public void onGameStateChanged(final GameStateChanged event) + { + if (event.getGameState() == GameState.LOADING) + { + chestLooted = false; + } } @Subscribe @@ -476,10 +490,19 @@ public class LootTrackerPlugin extends Plugin container = client.getItemContainer(InventoryID.BARROWS_REWARD); break; case (WidgetID.CHAMBERS_OF_XERIC_REWARD_GROUP_ID): + if (chestLooted) + { + return; + } eventType = "Chambers of Xeric"; container = client.getItemContainer(InventoryID.CHAMBERS_OF_XERIC_CHEST); + chestLooted = true; break; - case (WidgetID.THEATRE_OF_BLOOD_REWARD_GROUP_ID): + case (WidgetID.THEATRE_OF_BLOOD_GROUP_ID): + if (chestLooted) + { + return; + } int region = WorldPoint.fromLocalInstance(client, client.getLocalPlayer().getLocalLocation()).getRegionID(); if (region != THEATRE_OF_BLOOD_REGION) { @@ -487,6 +510,7 @@ public class LootTrackerPlugin extends Plugin } eventType = "Theatre of Blood"; container = client.getItemContainer(InventoryID.THEATRE_OF_BLOOD_CHEST); + chestLooted = true; break; case (WidgetID.CLUE_SCROLL_REWARD_GROUP_ID): // event type should be set via ChatMessage for clue scrolls. diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java index 06dee1c828..a57d514bef 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java @@ -1299,6 +1299,10 @@ public class MenuEntrySwapperPlugin extends Plugin swap(client, "empty", option, target, true); } + else if (this.swapQuick && option.equals("enter")) + { + swap(client, "quick-enter", option, target, true); + } else if (this.swapQuick && option.equals("ring")) { swap(client, "quick-start", option, target, true); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java index c77ff5ce24..0c4c220d3d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java @@ -37,7 +37,6 @@ import javax.inject.Inject; import javax.inject.Singleton; import lombok.AccessLevel; import lombok.Getter; -import lombok.extern.slf4j.Slf4j; import net.runelite.api.ChatMessageType; import net.runelite.api.Client; import net.runelite.api.GameObject; @@ -72,7 +71,6 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.ui.overlay.OverlayManager; -@Slf4j @PluginDescriptor( name = "Mining", description = "Show ore respawn timers and coal bag overlay", diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/motherlode/MotherlodePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/motherlode/MotherlodePlugin.java index 68c1dce8ca..e330124512 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/motherlode/MotherlodePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/motherlode/MotherlodePlugin.java @@ -615,9 +615,7 @@ public class MotherlodePlugin extends Plugin // on region changes the tiles get set to null veins.clear(); rocks.clear(); - } - else if (event.getGameState() == GameState.LOGGED_IN) - { + inMlm = checkInMlm(); } else if (event.getGameState() == GameState.LOGIN_SCREEN) @@ -700,7 +698,9 @@ public class MotherlodePlugin extends Plugin private boolean checkInMlm() { - if (client.getGameState() != GameState.LOGGED_IN) + GameState gameState = client.getGameState(); + if (gameState != GameState.LOGGED_IN + && gameState != GameState.LOADING) { return false; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/mta/telekinetic/TelekineticRoom.java b/runelite-client/src/main/java/net/runelite/client/plugins/mta/telekinetic/TelekineticRoom.java index 2023ff3166..40a1cb47b6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/mta/telekinetic/TelekineticRoom.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/mta/telekinetic/TelekineticRoom.java @@ -46,15 +46,12 @@ import net.runelite.api.NPC; import net.runelite.api.NpcID; import net.runelite.api.NullObjectID; import net.runelite.api.Perspective; -import net.runelite.api.Projectile; -import net.runelite.api.ProjectileID; import net.runelite.api.WallObject; import net.runelite.api.coords.Angle; import net.runelite.api.coords.Direction; import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.WorldArea; import net.runelite.api.coords.WorldPoint; -import net.runelite.api.events.ConfigChanged; import net.runelite.api.events.GameStateChanged; import net.runelite.api.events.GameTick; import net.runelite.api.events.GroundObjectSpawned; @@ -85,15 +82,11 @@ public class TelekineticRoom extends MTARoom private NPC guardian; private Maze maze; - private boolean telekinetic; - @Inject - private TelekineticRoom(final MTAConfig config, final Client client) + private TelekineticRoom(MTAConfig config, Client client) { super(config); this.client = client; - - this.telekinetic = config.telekinetic(); } public void resetRoom() @@ -138,9 +131,9 @@ public class TelekineticRoom extends MTARoom @Subscribe public void onGameTick(GameTick event) { - if (!this.telekinetic - || !inside() - || client.getGameState() != GameState.LOGGED_IN) + if (!config.telekinetic() + || !inside() + || client.getGameState() != GameState.LOGGED_IN) { maze = null; moves.clear(); @@ -183,14 +176,6 @@ public class TelekineticRoom extends MTARoom } else { - for (Projectile projectile : client.getProjectiles()) - { - if (projectile.getId() == ProjectileID.TELEKINETIC_SPELL) - { - return; - } - } - log.debug("Rebuilding moves due to guardian move"); this.moves = build(); } @@ -219,23 +204,12 @@ public class TelekineticRoom extends MTARoom { NPC npc = event.getNpc(); - if (npc.equals(guardian)) + if (npc == guardian) { guardian = null; } } - @Subscribe - public void onConfigChanged(ConfigChanged event) - { - if (!event.getGroup().equals("mta") || !event.getKey().equals("telekinetic")) - { - return; - } - - this.telekinetic = config.telekinetic(); - } - @Override public boolean inside() { @@ -286,11 +260,7 @@ public class TelekineticRoom extends MTARoom Direction next = moves.pop(); WorldArea areaNext = getIndicatorLine(next); - WorldPoint nearestNext = null; - if (areaNext != null) - { - nearestNext = nearest(areaNext, current); - } + WorldPoint nearestNext = nearest(areaNext, current); if (moves.isEmpty()) { @@ -302,20 +272,9 @@ public class TelekineticRoom extends MTARoom Direction after = moves.peek(); moves.push(next); WorldArea areaAfter = getIndicatorLine(after); - WorldPoint nearestAfter = null; - if (areaAfter != null) - { - nearestAfter = nearest(areaAfter, nearestNext); - } + WorldPoint nearestAfter = nearest(areaAfter, nearestNext); - if (areaNext != null) - { - return nearest(areaNext, nearestAfter); - } - else - { - return nearestAfter; - } + return nearest(areaNext, nearestAfter); } private static int manhattan(WorldPoint point1, WorldPoint point2) @@ -405,7 +364,7 @@ public class TelekineticRoom extends MTARoom WorldPoint nghbWorld = WorldPoint.fromLocal(client, neighbour); if (!nghbWorld.equals(next) - && !closed.contains(nghbWorld)) + && !closed.contains(nghbWorld)) { int score = scores.get(next) + 1; @@ -457,10 +416,10 @@ public class TelekineticRoom extends MTARoom private LocalPoint[] neighbours(LocalPoint point) { return new LocalPoint[] - { - neighbour(point, Direction.NORTH), neighbour(point, Direction.SOUTH), - neighbour(point, Direction.EAST), neighbour(point, Direction.WEST) - }; + { + neighbour(point, Direction.NORTH), neighbour(point, Direction.SOUTH), + neighbour(point, Direction.EAST), neighbour(point, Direction.WEST) + }; } private LocalPoint neighbour(LocalPoint point, Direction direction) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java index 75335426cb..8e3cccd803 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java @@ -41,7 +41,6 @@ import javax.inject.Inject; import javax.inject.Singleton; import lombok.AccessLevel; import lombok.Getter; -import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; import net.runelite.api.Constants; import net.runelite.api.ItemID; @@ -67,7 +66,6 @@ import net.runelite.client.ui.overlay.OverlayManager; import net.runelite.client.ui.overlay.infobox.InfoBoxManager; import net.runelite.client.util.WildcardMatcher; -@Slf4j @PluginDescriptor( name = "NPC Aggression Timer", description = "Highlights the unaggressive area of NPCs nearby and timer until it becomes active", diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java index 0f20e4c8df..56db18f616 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java @@ -42,7 +42,6 @@ import javax.inject.Inject; import javax.inject.Singleton; import lombok.AccessLevel; import lombok.Getter; -import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; import static net.runelite.api.Constants.REGION_SIZE; import net.runelite.api.DecorativeObject; @@ -72,7 +71,6 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.ui.overlay.OverlayManager; -@Slf4j @PluginDescriptor( name = "Object Markers", description = "Enable marking of objects using the Shift key", diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java index 453c7f4597..df1ece5714 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java @@ -775,6 +775,14 @@ public class ScreenshotPlugin extends Plugin { File screenshotFile = new File(playerFolder, fileName + ".png"); + // To make sure that screenshots don't get overwritten, check if file exists, + // and if it does create file with same name and suffix. + int i = 1; + while (screenshotFile.exists()) + { + screenshotFile = new File(playerFolder, fileName + String.format("(%d)", i++) + ".png"); + } + ImageIO.write(screenshot, "PNG", screenshotFile); if (this.uploadScreenshot) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingTabPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingTabPanel.java index e4dcf97508..b99212963b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingTabPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingTabPanel.java @@ -34,7 +34,6 @@ import java.util.List; import java.util.Set; import javax.swing.JLabel; import javax.swing.border.EmptyBorder; -import lombok.extern.slf4j.Slf4j; import net.runelite.client.game.ItemManager; import net.runelite.client.plugins.timetracking.TabContentPanel; import net.runelite.client.plugins.timetracking.TimeTrackingConfig; @@ -42,7 +41,6 @@ import net.runelite.client.plugins.timetracking.TimeablePanel; import net.runelite.client.ui.ColorScheme; import net.runelite.client.ui.FontManager; -@Slf4j public class FarmingTabPanel extends TabContentPanel { private final FarmingTracker farmingTracker; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java index 67552394c9..f29ebabefb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java @@ -39,14 +39,12 @@ import javax.swing.JPanel; import javax.swing.SwingUtilities; import lombok.AccessLevel; import lombok.Setter; -import lombok.extern.slf4j.Slf4j; import net.runelite.client.ui.ColorScheme; import net.runelite.client.ui.DynamicGridLayout; import net.runelite.client.ui.PluginPanel; import net.runelite.http.api.worlds.World; import net.runelite.http.api.worlds.WorldType; -@Slf4j class WorldSwitcherPanel extends PluginPanel { private static final Color ODD_ROW = new Color(44, 44, 44); @@ -413,4 +411,4 @@ class WorldSwitcherPanel extends PluginPanel ACTIVITY, PING } -} \ No newline at end of file +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpPanel.java index f456958292..8a05ccc932 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpPanel.java @@ -37,7 +37,6 @@ import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.SwingUtilities; import javax.swing.border.EmptyBorder; -import lombok.extern.slf4j.Slf4j; import net.runelite.api.Actor; import net.runelite.api.Client; import net.runelite.api.Skill; @@ -49,7 +48,6 @@ import net.runelite.client.ui.components.PluginErrorPanel; import net.runelite.client.util.LinkBrowser; import okhttp3.HttpUrl; -@Slf4j class XpPanel extends PluginPanel { private final Map infoBoxes = new HashMap<>(); diff --git a/runelite-client/src/main/java/net/runelite/client/util/ExecutorServiceExceptionLogger.java b/runelite-client/src/main/java/net/runelite/client/util/ExecutorServiceExceptionLogger.java index af5f13c89f..fe8902d663 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/ExecutorServiceExceptionLogger.java +++ b/runelite-client/src/main/java/net/runelite/client/util/ExecutorServiceExceptionLogger.java @@ -34,12 +34,10 @@ import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; /** * Wrapper for ${@link ScheduledExecutorService} that will log all uncaught exceptions as warning to console */ -@Slf4j @RequiredArgsConstructor public class ExecutorServiceExceptionLogger implements ScheduledExecutorService { diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/motherlode/MotherlodePluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/motherlode/MotherlodePluginTest.java index d14e3ae301..a3183e83f2 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/motherlode/MotherlodePluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/motherlode/MotherlodePluginTest.java @@ -116,7 +116,7 @@ public class MotherlodePluginTest { // set inMlm GameStateChanged gameStateChanged = new GameStateChanged(); - gameStateChanged.setGameState(GameState.LOGGED_IN); + gameStateChanged.setGameState(GameState.LOADING); motherlodePlugin.onGameStateChanged(gameStateChanged); // Initial sack count @@ -178,4 +178,4 @@ public class MotherlodePluginTest when(item.getQuantity()).thenReturn(quantity); return item; } -} \ No newline at end of file +}