diff --git a/runelite-api/src/main/java/net/runelite/api/SpriteID.java b/runelite-api/src/main/java/net/runelite/api/SpriteID.java index ff9e653c63..e08787dd00 100644 --- a/runelite-api/src/main/java/net/runelite/api/SpriteID.java +++ b/runelite-api/src/main/java/net/runelite/api/SpriteID.java @@ -1548,7 +1548,9 @@ public final class SpriteID public static final int BIG_ASS_WHITE_ENTANGLE = 1789; public static final int BIG_SUPERHEAT = 1800; public static final int BIG_SPEC_TRANSFER = 1959; - /* Unmapped: 1712~2175 */ + /* Unmapped: 1712 */ + public static final int TAB_QUESTS_ORANGE_ADVENTURE_PATHS = 1713; + /* Unmapped: 1714~2175 */ public static final int HEALTHBAR_DEFAULT_FRONT_30PX = 2176; public static final int HEALTHBAR_DEFAULT_BACK_30PX = 2177; public static final int HEALTHBAR_DEFAULT_FRONT_50PX = 2178; @@ -1565,8 +1567,14 @@ public final class SpriteID public static final int HEALTHBAR_DEFAULT_BACK_140PX = 2189; public static final int HEALTHBAR_DEFAULT_FRONT_160PX = 2190; public static final int HEALTHBAR_DEFAULT_BACK_160PX = 2191; - /* Unmapped: 2192~2306 */ + /* Unmapped: 2192~2218 */ + public static final int QUESTS_PAGE_ICON_ORANGE_ADVENTURE_PATHS = 2219; + /* Unmapped: 2220~2275 */ + public static final int QUESTS_PAGE_ICON_BROWN_CHARACTER_SUMMARY = 2276; + /* Unmapped: 2277~2306 */ public static final int TAB_CLAN_CHAT = 2307; + /* Unmapped: 2308 */ + public static final int TAB_QUESTS_BROWN_CHARACTER_SUMMARY = 2309; /* Unmapped: 2308~2419 */ public static final int WIKI_DESELECTED = 2420; public static final int WIKI_SELECTED = 2421; diff --git a/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java b/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java index f69ebce272..0f39d284ae 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java @@ -464,4 +464,15 @@ public interface RuneLiteConfig extends Config { return true; } + + @ConfigItem( + keyName = "dragHotkey", + name = "Drag Hotkey", + description = "Configures the hotkey used to drag UI elements around", + position = 52 + ) + default Keybind dragHotkey() + { + return Keybind.ALT; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatKeyboardListener.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatKeyboardListener.java index 69456fd861..bad417e02d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatKeyboardListener.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatKeyboardListener.java @@ -65,6 +65,9 @@ public class ChatKeyboardListener implements KeyListener if (input != null) { + // prevent the keypress from also modifying the chatbox as we alter the text + e.consume(); + // remove trailing space while (input.endsWith(" ")) { @@ -80,6 +83,7 @@ public class ChatKeyboardListener implements KeyListener } else if (chatCommandsConfig.clearChatBox().matches(e)) { + e.consume(); int inputTye = client.getVar(VarClientInt.INPUT_TYPE); clientThread.invoke(() -> applyText(inputTye, "")); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/SpriteOverride.java b/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/SpriteOverride.java index 4f0153ee2c..3dc7406371 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/SpriteOverride.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/SpriteOverride.java @@ -41,6 +41,8 @@ enum SpriteOverride TAB_QUESTS_PURPLE_KOUREND_1299(SpriteID.TAB_QUESTS_PURPLE_KOUREND, AROUND_2005), TAB_QUESTS_RED_MINIGAMES(SpriteID.TAB_QUESTS_RED_MINIGAMES, AROUND_2005), TAB_QUESTS_GREEN_ACHIEVEMENT_DIARIES(SpriteID.TAB_QUESTS_GREEN_ACHIEVEMENT_DIARIES, AROUND_2005), + TAB_QUESTS_BROWN_CHARACTER_SUMMARY(SpriteID.TAB_QUESTS_BROWN_CHARACTER_SUMMARY, AROUND_2005), + TAB_QUESTS_ORANGE_ADVENTURE_PATHS(SpriteID.TAB_QUESTS_ORANGE_ADVENTURE_PATHS, AROUND_2005), TAB_INVENTORY(SpriteID.TAB_INVENTORY, AROUND_2005, AROUND_2010), TAB_EQUIPMENT(SpriteID.TAB_EQUIPMENT, AROUND_2005, AROUND_2010), TAB_PRAYER(SpriteID.TAB_PRAYER, AROUND_2005, AROUND_2010), @@ -57,6 +59,12 @@ enum SpriteOverride TAB_MUSIC(SpriteID.TAB_MUSIC, AROUND_2005, AROUND_2010), TAB_CHATBOX(SpriteID.CHATBOX, AROUND_2005), + QUESTS_PAGE_ICON_CHARACTER_SUMMARY(SpriteID.QUESTS_PAGE_ICON_BROWN_CHARACTER_SUMMARY, AROUND_2005), + QUESTS_PAGE_ICON_QUESTS(SpriteID.QUESTS_PAGE_ICON_BLUE_QUESTS, AROUND_2005), + QUESTS_PAGE_ICON_ACHIEVEMENT_DIARIES(SpriteID.QUESTS_PAGE_ICON_GREEN_ACHIEVEMENT_DIARIES, AROUND_2005), + QUESTS_PAGE_ICON_KOUREND_FAVOUR(SpriteID.QUESTS_PAGE_ICON_PURPLE_KOUREND, AROUND_2005), + QUESTS_PAGE_ICON_ADVENTURE_PATHS(SpriteID.QUESTS_PAGE_ICON_ORANGE_ADVENTURE_PATHS, AROUND_2005), + BUTTON_FRIENDS(SpriteID.BUTTON_FRIENDS, AROUND_2005), BUTTON_IGNORES(SpriteID.BUTTON_IGNORES, AROUND_2005), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java index c07fbee562..65c7bbf64e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java @@ -92,6 +92,7 @@ public class ItemStatChanges add(food(perc(.1, 1)), COOKED_SWEETCORN, SWEETCORN_7088 /* Bowl of cooked sweetcorn */); add(combo(food(1), boost(DEFENCE, perc(.02, 1))), CABBAGE_1967 /* Draynor Manor */); add(combo(2, food(8), heal(RUN_ENERGY, 5)), PAPAYA_FRUIT); + add(combo(2, food(3), boost(ATTACK, 3)), CUP_OF_TEA); add(range(food(5), food(7)), THIN_SNAIL_MEAT); add(range(food(7), food(9)), FAT_SNAIL_MEAT); add(range(food(7), food(10)), SPIDER_ON_STICK_6297, SPIDER_ON_SHAFT_6299); @@ -106,13 +107,35 @@ public class ItemStatChanges add(food(10), EEL_SUSHI); // Alcoholic Beverages + // Many of these retrieved from https://oldschool.runescape.wiki/w/Temporary_skill_drain add(combo(food(11), dec(ATTACK, 2)), JUG_OF_WINE); add(combo(food(14), dec(ATTACK, 3)), BOTTLE_OF_WINE); - add(combo(2, food(5), boost(STRENGTH, 6), heal(ATTACK, -4)), PREMADE_WIZ_BLZD, WIZARD_BLIZZARD); - add(combo(2, food(5), boost(STRENGTH, 4), heal(ATTACK, -3)), PREMADE_SGG, SHORT_GREEN_GUY); - add(combo(2, food(5), boost(STRENGTH, 7), heal(ATTACK, -4)), PREMADE_DR_DRAGON, DRUNK_DRAGON); - add(combo(2, food(5), boost(STRENGTH, 7), heal(ATTACK, -4)), PREMADE_CHOC_SDY, CHOC_SATURDAY); + add(combo(3, food(5), new SimpleStatBoost(STRENGTH, true, perc(.05, 1)), new BoostedStatBoost(ATTACK, false, perc(.02, -3))), PREMADE_SGG, SHORT_GREEN_GUY, BRANDY, GIN, VODKA, WHISKY); + add(combo(3, food(7), new SimpleStatBoost(STRENGTH, true, perc(.05, 2)), new BoostedStatBoost(ATTACK, false, perc(.02, -3))), PREMADE_BLURB_SP, BLURBERRY_SPECIAL); + add(combo(3, food(5), new SimpleStatBoost(STRENGTH, true, perc(.05, 2)), new BoostedStatBoost(ATTACK, false, perc(.02, -3))), PREMADE_DR_DRAGON, DRUNK_DRAGON, PREMADE_CHOC_SDY, CHOC_SATURDAY); + add(combo(3, food(5), new SimpleStatBoost(STRENGTH, true, perc(.06, 1)), new BoostedStatBoost(ATTACK, false, perc(.02, -3))), PREMADE_WIZ_BLZD, WIZARD_BLIZZARD); + add(combo(3, food(3), new SimpleStatBoost(STRENGTH, true, perc(.04, 1)), new BoostedStatBoost(ATTACK, false, perc(.05, -3))), GROG); + add(combo(3, food(1), boost(STRENGTH, perc(.02, 1)), new BoostedStatBoost(ATTACK, false, perc(.06, -1))), BEER, BEER_7740); add(combo(4, boost(ATTACK, 5), boost(STRENGTH, 5), heal(MAGIC, -5), heal(PRAYER, -5)), BLOOD_PINT); + add(combo(3, food(1), boost(STRENGTH, 2), new BoostedStatBoost(ATTACK, false, perc(.05, -2))), ASGARNIAN_ALE, ASGARNIAN_ALE1, ASGARNIAN_ALE2, ASGARNIAN_ALE3, ASGARNIAN_ALE4, ASGARNIAN_ALE_7744); + add(combo(3, food(1), boost(STRENGTH, 3), new BoostedStatBoost(ATTACK, false, perc(.05, -3))), ASGARNIAN_ALEM, ASGARNIAN_ALEM1, ASGARNIAN_ALEM2, ASGARNIAN_ALEM3, ASGARNIAN_ALEM4); + add(combo(4, food(1), boost(WOODCUTTING, 1), new BoostedStatBoost(ATTACK, false, perc(.02, -2)), new BoostedStatBoost(STRENGTH, false, perc(.02, -2))), AXEMANS_FOLLY, AXEMANS_FOLLY1, AXEMANS_FOLLY2, AXEMANS_FOLLY3, AXEMANS_FOLLY4); + add(combo(4, food(2), boost(WOODCUTTING, 2), new BoostedStatBoost(ATTACK, false, perc(.02, -3)), new BoostedStatBoost(STRENGTH, false, perc(.02, -3))), AXEMANS_FOLLYM, AXEMANS_FOLLYM1, AXEMANS_FOLLYM2, AXEMANS_FOLLYM3, AXEMANS_FOLLYM4); + add(combo(5, food(1), boost(THIEVING, 1), boost(ATTACK, 1), new BoostedStatBoost(DEFENCE, false, perc(.06, -3)), new BoostedStatBoost(STRENGTH, false, perc(.06, -3))), BANDITS_BREW); + add(combo(4, food(1), new SimpleStatBoost(COOKING, true, perc(.05, 1)), new BoostedStatBoost(ATTACK, false, perc(.05, -2)), new BoostedStatBoost(STRENGTH, false, perc(.05, -2))), CHEFS_DELIGHT, CHEFS_DELIGHT1, CHEFS_DELIGHT2, CHEFS_DELIGHT3, CHEFS_DELIGHT4, CHEFS_DELIGHT_7754); + add(combo(4, food(2), new SimpleStatBoost(COOKING, true, perc(.05, 2)), new BoostedStatBoost(ATTACK, false, perc(.05, -3)), new BoostedStatBoost(STRENGTH, false, perc(.05, -3))), CHEFS_DELIGHTM, CHEFS_DELIGHTM1, CHEFS_DELIGHTM2, CHEFS_DELIGHTM3, CHEFS_DELIGHTM4); + add(combo(4, food(1), boost(FARMING, 1), new BoostedStatBoost(ATTACK, false, perc(.02, -2)), new BoostedStatBoost(STRENGTH, false, perc(.02, -2))), CIDER, CIDER1, CIDER2, CIDER3, CIDER4, CIDER_7752); + add(combo(4, food(2), boost(FARMING, 2), new BoostedStatBoost(ATTACK, false, perc(.02, -3)), new BoostedStatBoost(STRENGTH, false, perc(.02, -3))), MATURE_CIDER, CIDERM1, CIDERM2, CIDERM3, CIDERM4); + add(combo(3, food(1), boost(STRENGTH, 2), new BoostedStatBoost(ATTACK, false, perc(.05, -2))), DRAGON_BITTER, DRAGON_BITTER1, DRAGON_BITTER2, DRAGON_BITTER3, DRAGON_BITTER4, DRAGON_BITTER_7748); + add(combo(3, food(2), boost(STRENGTH, 3), new BoostedStatBoost(ATTACK, false, perc(.05, -2))), DRAGON_BITTERM, DRAGON_BITTERM1, DRAGON_BITTERM2, DRAGON_BITTERM3, DRAGON_BITTERM4); + add(combo(6, food(1), boost(MINING, 1), boost(SMITHING, 1), new BoostedStatBoost(ATTACK, false, perc(.04, -2)), new BoostedStatBoost(DEFENCE, false, perc(.04, -2)), new BoostedStatBoost(STRENGTH, false, perc(.04, -2))), DWARVEN_STOUT, DWARVEN_STOUT1, DWARVEN_STOUT2, DWARVEN_STOUT3, DWARVEN_STOUT4); + add(combo(6, food(2), boost(MINING, 2), boost(SMITHING, 2), new BoostedStatBoost(ATTACK, false, perc(.04, -3)), new BoostedStatBoost(DEFENCE, false, perc(.04, -3)), new BoostedStatBoost(STRENGTH, false, perc(.04, -3))), DWARVEN_STOUTM, DWARVEN_STOUTM1, DWARVEN_STOUTM2, DWARVEN_STOUTM3, DWARVEN_STOUTM4); + add(combo(5, food(1), boost(HERBLORE, 1), new BoostedStatBoost(ATTACK, false, perc(.04, -2)), new BoostedStatBoost(DEFENCE, false, perc(.04, -2)), new BoostedStatBoost(STRENGTH, false, perc(.04, -2))), GREENMANS_ALE, GREENMANS_ALE1, GREENMANS_ALE2, GREENMANS_ALE3, GREENMANS_ALE4, GREENMANS_ALE_7746); + add(combo(5, food(2), boost(HERBLORE, 2), new BoostedStatBoost(ATTACK, false, perc(.04, -3)), new BoostedStatBoost(DEFENCE, false, perc(.04, -3)), new BoostedStatBoost(STRENGTH, false, perc(.04, -3))), GREENMANS_ALEM, GREENMANS_ALEM1, GREENMANS_ALEM2, GREENMANS_ALEM3, GREENMANS_ALEM4); + add(combo(5, food(1), boost(SLAYER, 2), new BoostedStatBoost(ATTACK, false, perc(.02, -2)), new BoostedStatBoost(DEFENCE, false, perc(.02, -2)), new BoostedStatBoost(STRENGTH, false, perc(.02, -2))), SLAYERS_RESPITE, SLAYERS_RESPITE1, SLAYERS_RESPITE2, SLAYERS_RESPITE3, SLAYERS_RESPITE4); + add(combo(5, food(2), boost(SLAYER, 4), new BoostedStatBoost(ATTACK, false, perc(.02, -3)), new BoostedStatBoost(DEFENCE, false, perc(.02, -3)), new BoostedStatBoost(STRENGTH, false, perc(.02, -3))), SLAYERS_RESPITEM, SLAYERS_RESPITEM1, SLAYERS_RESPITEM2, SLAYERS_RESPITEM3, SLAYERS_RESPITEM4); + add(combo(5, food(1), new SimpleStatBoost(MAGIC, true, perc(.02, 2)), new BoostedStatBoost(ATTACK, false, perc(.05, -1)), new BoostedStatBoost(DEFENCE, false, perc(.05, -1)), new BoostedStatBoost(STRENGTH, false, perc(.05, -1))), WIZARDS_MIND_BOMB, MIND_BOMB1, MIND_BOMB2, MIND_BOMB3, MIND_BOMB4); + add(combo(5, food(2), new SimpleStatBoost(MAGIC, true, perc(.02, 3)), new BoostedStatBoost(ATTACK, false, perc(.05, -2)), new BoostedStatBoost(DEFENCE, false, perc(.05, -2)), new BoostedStatBoost(STRENGTH, false, perc(.05, -2))), MATURE_WMB, MIND_BOMBM1, MIND_BOMBM2, MIND_BOMBM3, MIND_BOMBM4); // Sq'irk Juice add(heal(RUN_ENERGY, 5), WINTER_SQIRKJUICE); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/skillcalculator/skills/HerbloreAction.java b/runelite-client/src/main/java/net/runelite/client/plugins/skillcalculator/skills/HerbloreAction.java index ad98d978c2..7360deba84 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/skillcalculator/skills/HerbloreAction.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/skillcalculator/skills/HerbloreAction.java @@ -72,7 +72,7 @@ public enum HerbloreAction implements ItemSkillAction SANFEW_SERUM_3(ItemID.SANFEW_SERUM3, 65, 160), SUPER_DEFENCE_3(ItemID.SUPER_DEFENCE3, 66, 150), LANTADYME(ItemID.LANTADYME, 67, 13.1f), - ANTIDOTE_PLUS_3(ItemID.ANTIDOTE3, 68, 155), + ANTIDOTE_PLUS_4(ItemID.ANTIDOTE4, 68, 155), ANTIFIRE_POTION_3(ItemID.ANTIFIRE_POTION3, 69, 157.5f), DIVINE_SUPER_ATTACK_POTION_4(ItemID.DIVINE_SUPER_ATTACK_POTION4, 70, 2), DIVINE_SUPER_DEFENCE_POTION_4(ItemID.DIVINE_SUPER_DEFENCE_POTION4, 70, 2), @@ -87,7 +87,7 @@ public enum HerbloreAction implements ItemSkillAction STAMINA_POTION_4(ItemID.STAMINA_POTION4, 77, 102), DIVINE_MAGIC_POTION_4(ItemID.DIVINE_MAGIC_POTION4, 78, 2), ZAMORAK_BREW_3(ItemID.ZAMORAK_BREW3, 78, 175), - ANTIDOTE_PLUS_PLUS_3(ItemID.ANTIDOTE3_5954, 79, 177.5f), + ANTIDOTE_PLUS_PLUS_4(ItemID.ANTIDOTE4_5952, 79, 177.5f), BASTION_POTION_3(ItemID.BASTION_POTION3, 80, 155), BATTLEMAGE_POTION_3(ItemID.BATTLEMAGE_POTION3, 80, 155), SARADOMIN_BREW_3(ItemID.SARADOMIN_BREW3, 81, 180), @@ -103,8 +103,8 @@ public enum HerbloreAction implements ItemSkillAction SUPER_ANTIFIRE_4(ItemID.SUPER_ANTIFIRE_POTION4, 92, 130), ANTIVENOM_PLUS_4(ItemID.ANTIVENOM4_12913, 94, 125), DIVINE_SUPER_COMBAT_POTION_4(ItemID.DIVINE_SUPER_COMBAT_POTION4, 97, 2), - EXTENDED_SUPER_ANTIFIRE_3(ItemID.SUPER_ANTIFIRE_POTION3, 98, 120), - EXTENDED_SUPER_ANTIFIRE_4(ItemID.SUPER_ANTIFIRE_POTION4, 98, 160), + EXTENDED_SUPER_ANTIFIRE_3(ItemID.EXTENDED_SUPER_ANTIFIRE3, 98, 120), + EXTENDED_SUPER_ANTIFIRE_4(ItemID.EXTENDED_SUPER_ANTIFIRE4, 98, 160), ; private final int itemId; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java index 07e7029b99..d3dbcad8af 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java @@ -126,6 +126,7 @@ public class TimersPlugin extends Plugin private static final String WARD_OF_ARCEUUS_MESSAGE = ">Your defence against Arceuus magic has been strengthened."; private static final String PICKPOCKET_FAILURE_MESSAGE = "You fail to pick the "; private static final String DODGY_NECKLACE_PROTECTION_MESSAGE = "Your dodgy necklace protects you."; + private static final String SHADOW_VEIL_PROTECTION_MESSAGE = "Your attempt to steal goes unnoticed."; private static final Pattern TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you(?: by .+)?\\. It will expire in (?\\d+) minutes?(?:, (?\\d+) seconds?)?\\."); private static final Pattern DIVINE_POTION_PATTERN = Pattern.compile("You drink some of your divine (.+) potion\\."); @@ -510,7 +511,7 @@ public class TimersPlugin extends Plugin return; } - if (message.contains(DODGY_NECKLACE_PROTECTION_MESSAGE)) + if (message.contains(DODGY_NECKLACE_PROTECTION_MESSAGE) || message.contains(SHADOW_VEIL_PROTECTION_MESSAGE)) { removeGameTimer(PICKPOCKET_STUN); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/CompostTracker.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/CompostTracker.java index b5066658f6..b590599f81 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/CompostTracker.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/CompostTracker.java @@ -76,7 +76,7 @@ public class CompostTracker private static final Pattern COMPOST_USED_ON_PATCH = Pattern.compile( "You treat the .+ with (?ultra|super|)compost\\."); private static final Pattern FERTILE_SOIL_CAST = Pattern.compile( - "The .+ has been treated with (?ultra|super|)compost\\."); + "^The .+ has been treated with (?ultra|super|)compost"); private static final Pattern ALREADY_TREATED = Pattern.compile( "This .+ has already been (treated|fertilised) with (?ultra|super|)compost(?: - the spell can't make it any more fertile)?\\."); private static final Pattern INSPECT_PATCH = Pattern.compile( @@ -271,7 +271,7 @@ public class CompostTracker Matcher matcher; if ((matcher = COMPOST_USED_ON_PATCH.matcher(chatMessage)).matches() || - (matcher = FERTILE_SOIL_CAST.matcher(chatMessage)).matches() || + (matcher = FERTILE_SOIL_CAST.matcher(chatMessage)).find() || (matcher = ALREADY_TREATED.matcher(chatMessage)).matches() || (matcher = INSPECT_PATCH.matcher(chatMessage)).matches()) { diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java index 8534a97014..87db1d771f 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java @@ -36,7 +36,6 @@ import java.awt.Point; import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.Stroke; -import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.geom.AffineTransform; import java.util.Collection; @@ -61,7 +60,6 @@ import net.runelite.client.config.RuneLiteConfig; import net.runelite.client.eventbus.EventBus; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.events.OverlayMenuClicked; -import net.runelite.client.input.KeyListener; import net.runelite.client.input.KeyManager; import net.runelite.client.input.MouseAdapter; import net.runelite.client.input.MouseManager; @@ -70,12 +68,13 @@ import net.runelite.client.ui.JagexColors; import net.runelite.client.ui.overlay.tooltip.Tooltip; import net.runelite.client.ui.overlay.tooltip.TooltipManager; import net.runelite.client.util.ColorUtil; +import net.runelite.client.util.HotkeyListener; import org.slf4j.Marker; import org.slf4j.MarkerFactory; @Singleton @Slf4j -public class OverlayRenderer extends MouseAdapter implements KeyListener +public class OverlayRenderer extends MouseAdapter { private static final Marker DEDUPLICATE = MarkerFactory.getMarker("DEDUPLICATE"); private static final int BORDER = 5; @@ -119,6 +118,8 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener private Overlay focusedOverlay; private Overlay prevFocusedOverlay; + private final HotkeyListener hotkeyListener; + @Inject private OverlayRenderer( final Client client, @@ -136,7 +137,27 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener this.clientUI = clientUI; this.tooltipManager = tooltipManager; this.eventBus = eventBus; - keyManager.registerKeyListener(this); + + this.hotkeyListener = new HotkeyListener(runeLiteConfig::dragHotkey) + { + @Override + public void hotkeyPressed() + { + inOverlayManagingMode = true; + } + + @Override + public void hotkeyReleased() + { + if (inOverlayManagingMode) + { + inOverlayManagingMode = false; + resetOverlayManagementMode(); + } + } + }; + + keyManager.registerKeyListener(hotkeyListener); mouseManager.registerMouseListener(this); eventBus.register(this); } @@ -731,30 +752,6 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener return mouseEvent; } - @Override - public void keyTyped(KeyEvent e) - { - } - - @Override - public void keyPressed(KeyEvent e) - { - if (e.isAltDown()) - { - inOverlayManagingMode = true; - } - } - - @Override - public void keyReleased(KeyEvent e) - { - if (!e.isAltDown() && inOverlayManagingMode) - { - inOverlayManagingMode = false; - resetOverlayManagementMode(); - } - } - private void safeRender(Client client, Overlay overlay, OverlayLayer layer, Graphics2D graphics, Point point) { if (!isResizeable && (layer == OverlayLayer.ABOVE_SCENE || layer == OverlayLayer.UNDER_WIDGETS)) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/1297.png b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/1297.png new file mode 100644 index 0000000000..7a409a5edf Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/1297.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/1713.png b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/1713.png new file mode 100644 index 0000000000..1f3ea867a2 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/1713.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/2219.png b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/2219.png new file mode 100644 index 0000000000..18ce37b687 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/2219.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/2276.png b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/2276.png new file mode 100644 index 0000000000..7c5f0082ad Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/2276.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/2309.png b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/2309.png new file mode 100644 index 0000000000..067ce08ff0 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/2309.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/835.png b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/835.png new file mode 100644 index 0000000000..fed11aa473 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/835.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/836.png b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/836.png new file mode 100644 index 0000000000..f6113acceb Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2005/836.png differ diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/timetracking/farming/CompostTrackerTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/timetracking/farming/CompostTrackerTest.java index 42dba61b5d..2d96d2e757 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/timetracking/farming/CompostTrackerTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/timetracking/farming/CompostTrackerTest.java @@ -320,4 +320,16 @@ public class CompostTrackerTest verify(configManager).setRSProfileConfiguration("timetracking", "MOCK.compost", CompostState.SUPERCOMPOST); } + @Test + public void onChatMessage_volcanicAsh() + { + ChatMessage chatEvent = mock(ChatMessage.class); + when(chatEvent.getType()).thenReturn(ChatMessageType.SPAM); + when(chatEvent.getMessage()).thenReturn("The fruit tree patch has been treated with ultracompost consuming 2 of your volcanic ash."); + + compostTracker.pendingCompostActions.put(farmingPatch, new CompostTracker.PendingCompost(Instant.MAX, worldPoint, farmingPatch)); + compostTracker.onChatMessage(chatEvent); + + verify(configManager).setRSProfileConfiguration("timetracking", "MOCK.compost", CompostState.ULTRACOMPOST); + } }