From 1c159c929a8ee3301cfb1b1902356214b2d23bd1 Mon Sep 17 00:00:00 2001 From: TheStonedTurtle Date: Fri, 15 May 2020 06:33:15 -0700 Subject: [PATCH 01/43] item stats - Fix revitalisation potion prayer bonus --- .../itemstats/potions/PrayerPotion.java | 12 +- .../itemstats/potions/SuperRestore.java | 2 +- .../plugins/itemstats/ItemStatEffectTest.java | 119 ++++++++++++++++++ 3 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 runelite-client/src/test/java/net/runelite/client/plugins/itemstats/ItemStatEffectTest.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/PrayerPotion.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/PrayerPotion.java index a0d17db24b..6611b8ac35 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/PrayerPotion.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/PrayerPotion.java @@ -35,12 +35,20 @@ import static net.runelite.client.plugins.itemstats.stats.Stats.PRAYER; public class PrayerPotion extends StatBoost { + private static final double BASE_PERC = .25; private final int delta; + private final double perc; public PrayerPotion(int delta) + { + this(delta, BASE_PERC); + } + + PrayerPotion(int delta, double perc) { super(PRAYER, false); this.delta = delta; + this.perc = perc; } private static final int RING_SLOT = EquipmentInventorySlot.RING.getSlotIdx(); @@ -93,9 +101,9 @@ public class PrayerPotion extends StatBoost } } - double perc = hasHolyWrench ? .27 : .25; + double percent = hasHolyWrench ? perc + .02 : perc; int max = getStat().getMaximum(client); - return (((int) (max * perc)) * (delta >= 0 ? 1 : -1)) + delta; + return (((int) (max * percent)) * (delta >= 0 ? 1 : -1)) + delta; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/SuperRestore.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/SuperRestore.java index b63cd0c2c9..543e3838cb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/SuperRestore.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/SuperRestore.java @@ -56,7 +56,7 @@ public class SuperRestore implements Effect StatsChanges changes = new StatsChanges(0); SimpleStatBoost calc = new SimpleStatBoost(null, false, perc(percR, delta)); - PrayerPotion prayer = new PrayerPotion(delta); + PrayerPotion prayer = new PrayerPotion(delta, percR); changes.setStatChanges(Stream.concat( Stream.of(prayer.effect(client)), Stream.of(superRestoreStats) diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/itemstats/ItemStatEffectTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/itemstats/ItemStatEffectTest.java new file mode 100644 index 0000000000..3a20ba9723 --- /dev/null +++ b/runelite-client/src/test/java/net/runelite/client/plugins/itemstats/ItemStatEffectTest.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2020, TheStonedTurtle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.itemstats; + +import com.google.common.collect.ImmutableMap; +import java.util.Map; +import net.runelite.api.Client; +import net.runelite.api.ItemID; +import net.runelite.api.Skill; +import static org.junit.Assert.assertEquals; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import static org.mockito.ArgumentMatchers.any; +import org.mockito.Mock; +import static org.mockito.Mockito.when; +import org.mockito.junit.MockitoJUnitRunner; + +@RunWith(MockitoJUnitRunner.class) +public class ItemStatEffectTest +{ + private static final ImmutableMap REVITALISATION_TABLE; + + static + { + // https://oldschool.runescape.wiki/w/Revitalisation_(+)#Maximum_stat_restoration + REVITALISATION_TABLE = new ImmutableMap.Builder() + .put(1, 11) .put(50, 26) + .put(3, 11) .put(53, 26) + .put(4, 12) .put(54, 27) + .put(6, 12) .put(56, 27) + .put(7, 13) .put(57, 28) + .put(9, 13) .put(59, 28) + .put(10, 14) .put(60, 29) + .put(13, 14) .put(63, 29) + .put(14, 15) .put(64, 30) + .put(16, 15) .put(66, 30) + .put(17, 16) .put(67, 31) + .put(19, 16) .put(69, 31) + .put(20, 17) .put(70, 32) + .put(23, 17) .put(73, 32) + .put(24, 18) .put(74, 33) + .put(26, 18) .put(76, 33) + .put(27, 19) .put(77, 34) + .put(29, 19) .put(79, 34) + .put(30, 20) .put(80, 35) + .put(33, 20) .put(83, 35) + .put(34, 21) .put(84, 36) + .put(36, 21) .put(86, 36) + .put(37, 22) .put(87, 37) + .put(39, 22) .put(89, 37) + .put(40, 23) .put(90, 38) + .put(43, 23) .put(93, 38) + .put(44, 24) .put(94, 39) + .put(46, 24) .put(96, 39) + .put(47, 25) .put(97, 40) + .put(49, 25) .put(99, 40) + .build(); + } + + @Mock + private Client client; + + private final ItemStatChanges itemStats = new ItemStatChanges(); + + @Before + public void prepare() + { + when(client.getBoostedSkillLevel(any(Skill.class))) + .thenReturn(0); + } + + @Test + public void testRevitalisationPlus() + { + final Effect item = itemStats.get(ItemID.REVITALISATION_1_20957); + matchWikiTable(REVITALISATION_TABLE, item); + } + + private void matchWikiTable(final ImmutableMap table, final Effect item) + { + for (final Map.Entry entry : table.entrySet()) + { + final int level = entry.getKey(); + final int theoretical = entry.getValue(); + + when(client.getRealSkillLevel(any(Skill.class))) + .thenReturn(level); + + final StatChange[] changes = item.calculate(client).getStatChanges(); + for (final StatChange change : changes) + { + assertEquals(theoretical, change.getTheoretical()); + } + } + } +} From 4836080e56a6523a1b5a686b16a82a9182a393a0 Mon Sep 17 00:00:00 2001 From: TheStonedTurtle Date: Fri, 15 May 2020 07:10:29 -0700 Subject: [PATCH 02/43] item stats - Fix sanfew serum restore bonuses --- .../plugins/itemstats/ItemStatChanges.java | 2 +- .../itemstats/potions/SuperRestore.java | 4 +- .../plugins/itemstats/ItemStatEffectTest.java | 62 +++++++++++++++++++ 3 files changed, 66 insertions(+), 2 deletions(-) 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 682e2b08cb..6391628e4d 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 @@ -158,7 +158,7 @@ public class ItemStatChanges add(heal(RUN_ENERGY, 20), SUPER_ENERGY1, SUPER_ENERGY2, SUPER_ENERGY3, SUPER_ENERGY4); add(new SuperRestore(.25, 8), SUPER_RESTORE1, SUPER_RESTORE2, SUPER_RESTORE3, SUPER_RESTORE4, BLIGHTED_SUPER_RESTORE1, BLIGHTED_SUPER_RESTORE2, BLIGHTED_SUPER_RESTORE3, BLIGHTED_SUPER_RESTORE4); - add(new SuperRestore(.25, 9), SANFEW_SERUM1, SANFEW_SERUM2, SANFEW_SERUM3, SANFEW_SERUM4); + add(new SuperRestore(.30, 4), SANFEW_SERUM1, SANFEW_SERUM2, SANFEW_SERUM3, SANFEW_SERUM4); add(heal(RUN_ENERGY, 20), STAMINA_POTION1, STAMINA_POTION2, STAMINA_POTION3, STAMINA_POTION4); // Raids potions (+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/SuperRestore.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/SuperRestore.java index 543e3838cb..38493055d7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/SuperRestore.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/potions/SuperRestore.java @@ -24,6 +24,7 @@ */ package net.runelite.client.plugins.itemstats.potions; +import com.google.common.annotations.VisibleForTesting; import java.util.Comparator; import java.util.stream.Stream; import lombok.RequiredArgsConstructor; @@ -47,7 +48,8 @@ public class SuperRestore implements Effect CONSTRUCTION }; - private final double percR; //percentage restored + @VisibleForTesting + public final double percR; //percentage restored private final int delta; @Override diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/itemstats/ItemStatEffectTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/itemstats/ItemStatEffectTest.java index 3a20ba9723..8f498a6f46 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/itemstats/ItemStatEffectTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/itemstats/ItemStatEffectTest.java @@ -42,6 +42,8 @@ import org.mockito.junit.MockitoJUnitRunner; public class ItemStatEffectTest { private static final ImmutableMap REVITALISATION_TABLE; + private static final ImmutableMap SUPER_RESTORE_TABLE; + private static final ImmutableMap SANFEW_TABLE; static { @@ -78,6 +80,52 @@ public class ItemStatEffectTest .put(47, 25) .put(97, 40) .put(49, 25) .put(99, 40) .build(); + + // https://oldschool.runescape.wiki/w/Super_restore#Maximum_restoration + SUPER_RESTORE_TABLE = new ImmutableMap.Builder() + .put(1, 8) .put(36, 17) .put(72, 26) + .put(3, 8) .put(39, 17) .put(75, 26) + .put(4, 9) .put(40, 18) .put(76, 27) + .put(7, 9) .put(43, 18) .put(79, 27) + .put(8, 10) .put(44, 19) .put(80, 28) + .put(11, 10) .put(47, 19) .put(83, 28) + .put(12, 11) .put(48, 20) .put(84, 29) + .put(15, 11) .put(51, 20) .put(87, 29) + .put(16, 12) .put(52, 21) .put(88, 30) + .put(19, 12) .put(55, 21) .put(91, 30) + .put(20, 13) .put(56, 22) .put(92, 31) + .put(23, 13) .put(59, 22) .put(95, 31) + .put(24, 14) .put(60, 23) .put(96, 32) + .put(27, 14) .put(63, 23) .put(99, 32) + .put(28, 15) .put(64, 24) + .put(31, 15) .put(67, 24) + .put(32, 16) .put(68, 25) + .put(35, 16) .put(71, 25) + .build(); + + // https://oldschool.runescape.wiki/w/Sanfew_serum#Maximum_restoration + SANFEW_TABLE = new ImmutableMap.Builder() + .put(1, 4) .put(34, 14) .put(67, 24) + .put(3, 4) .put(36, 14) .put(69, 24) + .put(4, 5) .put(37, 15) .put(70, 25) + .put(6, 5) .put(39, 15) .put(73, 25) + .put(7, 6) .put(40, 16) .put(74, 26) + .put(9, 6) .put(43, 16) .put(76, 26) + .put(10, 7) .put(44, 17) .put(77, 27) + .put(13, 7) .put(46, 17) .put(79, 27) + .put(14, 8) .put(47, 18) .put(80, 28) + .put(16, 8) .put(49, 18) .put(83, 28) + .put(17, 9) .put(50, 19) .put(84, 29) + .put(19, 9) .put(53, 19) .put(86, 29) + .put(20, 10) .put(54, 20) .put(87, 30) + .put(23, 10) .put(56, 20) .put(89, 30) + .put(24, 11) .put(57, 21) .put(90, 31) + .put(26, 11) .put(59, 21) .put(93, 31) + .put(27, 12) .put(60, 22) .put(94, 32) + .put(29, 12) .put(63, 22) .put(96, 32) + .put(30, 13) .put(64, 23) .put(97, 33) + .put(33, 13) .put(66, 23) .put(99, 33) + .build(); } @Mock @@ -99,6 +147,20 @@ public class ItemStatEffectTest matchWikiTable(REVITALISATION_TABLE, item); } + @Test + public void testSuperRestore() + { + final Effect item = itemStats.get(ItemID.SUPER_RESTORE1); + matchWikiTable(SUPER_RESTORE_TABLE, item); + } + + @Test + public void testSanfewSerum() + { + final Effect item = itemStats.get(ItemID.SANFEW_SERUM1); + matchWikiTable(SANFEW_TABLE, item); + } + private void matchWikiTable(final ImmutableMap table, final Effect item) { for (final Map.Entry entry : table.entrySet()) From a45d208eb6da0d312f354f71a7c5d56fb15efeea Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 4 Jun 2020 12:12:55 -0400 Subject: [PATCH 03/43] ge plugin: ignore offers being cleared on logout --- .../grandexchange/GrandExchangePlugin.java | 7 +++++++ .../GrandExchangePluginTest.java | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java index 8e5e0793ce..9de2574fc7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java @@ -377,6 +377,13 @@ public class GrandExchangePlugin extends Plugin final int slot = offerEvent.getSlot(); final GrandExchangeOffer offer = offerEvent.getOffer(); + if (offer.getState() == GrandExchangeOfferState.EMPTY && client.getGameState() != GameState.LOGGED_IN) + { + // Trades are cleared by the client during LOGIN_SCREEN/HOPPING/LOGGING_IN, ignore those so we don't + // zero and re-submit the trade on login as an update + return; + } + log.debug("GE offer updated: state: {}, slot: {}, item: {}, qty: {}, login: {}", offer.getState(), slot, offer.getItemId(), offer.getQuantitySold(), loginBurstGeUpdates); diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/grandexchange/GrandExchangePluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/grandexchange/GrandExchangePluginTest.java index 4b513f4fa2..1f7e4d1993 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/grandexchange/GrandExchangePluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/grandexchange/GrandExchangePluginTest.java @@ -33,10 +33,12 @@ import java.util.List; import java.util.concurrent.ScheduledExecutorService; import javax.inject.Inject; import net.runelite.api.Client; +import net.runelite.api.GameState; import net.runelite.api.GrandExchangeOffer; import net.runelite.api.GrandExchangeOfferState; import net.runelite.api.ItemID; import net.runelite.api.WorldType; +import net.runelite.api.events.GrandExchangeOfferChanged; import net.runelite.client.Notifier; import net.runelite.client.account.SessionManager; import net.runelite.client.config.ConfigManager; @@ -55,6 +57,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; import org.mockito.Mock; import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.mock; @@ -218,4 +221,20 @@ public class GrandExchangePluginTest assertEquals(10, trade.getTotal()); assertEquals(25, trade.getSpent()); } + + @Test + public void testHop() + { + when(client.getGameState()).thenReturn(GameState.HOPPING); + + GrandExchangeOffer grandExchangeOffer = mock(GrandExchangeOffer.class); + when(grandExchangeOffer.getState()).thenReturn(GrandExchangeOfferState.EMPTY); + + GrandExchangeOfferChanged grandExchangeOfferChanged = new GrandExchangeOfferChanged(); + grandExchangeOfferChanged.setOffer(grandExchangeOffer); + + grandExchangePlugin.onGrandExchangeOfferChanged(grandExchangeOfferChanged); + + verify(configManager, never()).unsetConfiguration(anyString(), anyString()); + } } \ No newline at end of file From 473ab8eae2a46fb130535f13e48b064eac87fe90 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 2 Jun 2020 19:00:18 -0400 Subject: [PATCH 04/43] client: remove unnecessary annotation-providing dependencies from runtime classpath --- runelite-api/pom.xml | 3 ++- runelite-client/pom.xml | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 3c5726a53e..a38aa80369 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -48,7 +48,8 @@ com.google.code.findbugs jsr305 - 1.3.9 + 3.0.2 + provided diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 41c2ab1b72..d9742f56c9 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -59,6 +59,28 @@ com.google.guava guava + + + + com.google.code.findbugs + jsr305 + + + com.google.errorprone + error_prone_annotations + + + com.google.j2objc + j2objc-annotations + + + org.codehaus.mojo + animal-sniffer-annotations + + com.google.inject @@ -173,6 +195,12 @@ jna-platform 4.5.1 + + com.google.code.findbugs + jsr305 + 3.0.2 + provided + net.runelite From e8b464f2179cc4d78a13fe3043e774691e093b97 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 4 Jun 2020 19:32:15 -0400 Subject: [PATCH 05/43] Revert "clanchat: Add player name to kick message (#11555)" This reverts commit 41a041972afe8ac99b936a2b0d7721ce34516a22. This evidently is intentionally left out of vanilla due to concerns over triggering auto mutes due to kicking players with bad names. https://twitter.com/JagexAsh/status/1268620095569289226 --- .../client/plugins/clanchat/ClanChatConfig.java | 15 ++------------- .../client/plugins/clanchat/ClanChatPlugin.java | 16 ---------------- .../src/main/scripts/ClanSendKick.rs2asm | 7 ------- 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatConfig.java index 08ba3de298..3a7dbfa20d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatConfig.java @@ -150,22 +150,11 @@ public interface ClanChatConfig extends Config return false; } - @ConfigItem( - keyName = "kickWithName", - name = "Show kicked player", - description = "Changes kick message to say who was kicked", - position = 10 - ) - default boolean kickWithName() - { - return true; - } - @ConfigItem( keyName = "showIgnores", name = "Recolor ignored players", description = "Recolors players that are on your ignore list", - position = 11 + position = 10 ) default boolean showIgnores() { @@ -176,7 +165,7 @@ public interface ClanChatConfig extends Config keyName = "showIgnoresColor", name = "Ignored color", description = "Allows you to change the color of the ignored players in your clan chat", - position = 12 + position = 11 ) default Color showIgnoresColor() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatPlugin.java index 49dfa8027a..1e51d1b4df 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/clanchat/ClanChatPlugin.java @@ -555,22 +555,6 @@ public class ClanChatPlugin extends Plugin clientThread.invokeLater(() -> confirmKickPlayer(kickPlayerName)); break; } - case "sendKickName": - { - if (!config.kickWithName()) - { - break; - } - - // Get name of the player we are kicking - final String[] stringStack = client.getStringStack(); - final int stringSize = client.getStringStackSize(); - final String kickPlayerName = stringStack[stringSize - 1]; - - // Sets the kick message based on players name - stringStack[stringSize - 2] = "-Attempting to kick " + kickPlayerName + " from friends chat..."; - break; - } } } diff --git a/runelite-client/src/main/scripts/ClanSendKick.rs2asm b/runelite-client/src/main/scripts/ClanSendKick.rs2asm index f26f49c73a..1da495029f 100644 --- a/runelite-client/src/main/scripts/ClanSendKick.rs2asm +++ b/runelite-client/src/main/scripts/ClanSendKick.rs2asm @@ -6,9 +6,6 @@ ; callback "confirmClanKick" ; Used by the ClanChat plugin to show a chatbox panel confirming the requested kick ; Also requires the "confirmKicks" option of ClanChatConfig to be enabled -; callback "sendKickName" -; Used by the ClanChat plugin to modify the kick message to include player name -; Also requires the "kickWithName" option of ClanChatConfig to be enabled invoke 1942 iconst 1 if_icmpeq LABEL4 @@ -19,10 +16,6 @@ LABEL4: return LABEL7: sconst "-Attempting to kick player from friends chat..." - sload 0 ; Username we are kicking - sconst "sendKickName" - runelite_callback - pop_string ; Username we are kicking iconst 2 invoke 96 sload 0 From af7c8336959d159dac087ba3fd777299ef5880e8 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 4 Jun 2020 22:39:21 -0400 Subject: [PATCH 06/43] npc indicators: rename highlight dead npcs to ignore dead npcs --- .../plugins/npchighlight/NpcIndicatorsConfig.java | 10 +++++----- .../plugins/npchighlight/NpcIndicatorsPlugin.java | 2 +- .../client/plugins/npchighlight/NpcMinimapOverlay.java | 2 +- .../client/plugins/npchighlight/NpcSceneOverlay.java | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java index 6ef25f3bb3..029d67d6ba 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java @@ -100,13 +100,13 @@ public interface NpcIndicatorsConfig extends Config @ConfigItem( position = 6, - keyName = "highlightDeadNPCs", - name = "Highlight dead NPCs", - description = "Highlight dead NPCs" + keyName = "ignoreDeadNpcs", + name = "Ignore dead NPCs", + description = "Prevents highlighting NPCs after they are dead" ) - default boolean highlightDeadNpcs() + default boolean ignoreDeadNpcs() { - return false; + return true; } @ConfigItem( diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java index fc7cf4ac91..ed8a577880 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java @@ -261,7 +261,7 @@ public class NpcIndicatorsPlugin extends Plugin if (config.highlightMenuNames() && NPC_MENU_ACTIONS.contains(MenuAction.of(type)) && - highlightedNpcs.stream().anyMatch(npc -> npc.getIndex() == event.getIdentifier() && (!npc.isDead() || config.highlightDeadNpcs()))) + highlightedNpcs.stream().anyMatch(npc -> npc.getIndex() == event.getIdentifier() && (!npc.isDead() || !config.ignoreDeadNpcs()))) { MenuEntry[] menuEntries = client.getMenuEntries(); final MenuEntry menuEntry = menuEntries[menuEntries.length - 1]; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcMinimapOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcMinimapOverlay.java index dc6871cfcb..01af41f6ad 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcMinimapOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcMinimapOverlay.java @@ -69,7 +69,7 @@ public class NpcMinimapOverlay extends Overlay { NPCComposition npcComposition = actor.getTransformedComposition(); if (npcComposition == null || !npcComposition.isInteractible() - || (actor.isDead() && !config.highlightDeadNpcs())) + || (actor.isDead() && config.ignoreDeadNpcs())) { return; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcSceneOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcSceneOverlay.java index a1d1bffda9..f3befac1e2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcSceneOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcSceneOverlay.java @@ -147,7 +147,7 @@ public class NpcSceneOverlay extends Overlay { NPCComposition npcComposition = actor.getTransformedComposition(); if (npcComposition == null || !npcComposition.isInteractible() - || (actor.isDead() && !config.highlightDeadNpcs())) + || (actor.isDead() && config.ignoreDeadNpcs())) { return; } From bda66e8da47309b8117175f46feaf8b126c061df Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 4 Jun 2020 22:40:27 -0400 Subject: [PATCH 07/43] npc indicators: add option to highlight dead npc menu entries --- .../npchighlight/NpcIndicatorsConfig.java | 8 +++ .../npchighlight/NpcIndicatorsPlugin.java | 35 ++++++++--- .../npchighlight/NpcIndicatorsPluginTest.java | 61 +++++++++++++++++++ 3 files changed, 95 insertions(+), 9 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java index 029d67d6ba..a9eede906e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsConfig.java @@ -118,4 +118,12 @@ public interface NpcIndicatorsConfig extends Config { return false; } + + @ConfigItem( + position = 7, + keyName = "deadNpcMenuColor", + name = "Dead NPC menu color", + description = "Color of the NPC menus for dead NPCs" + ) + Color deadNpcMenuColor(); } \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java index ed8a577880..77abdd41f3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPlugin.java @@ -28,6 +28,7 @@ package net.runelite.client.plugins.npchighlight; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableSet; import com.google.inject.Provides; +import java.awt.Color; import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; @@ -259,17 +260,33 @@ public class NpcIndicatorsPlugin extends Plugin type -= MENU_ACTION_DEPRIORITIZE_OFFSET; } - if (config.highlightMenuNames() && - NPC_MENU_ACTIONS.contains(MenuAction.of(type)) && - highlightedNpcs.stream().anyMatch(npc -> npc.getIndex() == event.getIdentifier() && (!npc.isDead() || !config.ignoreDeadNpcs()))) + final MenuAction menuAction = MenuAction.of(type); + + if (NPC_MENU_ACTIONS.contains(menuAction)) { - MenuEntry[] menuEntries = client.getMenuEntries(); - final MenuEntry menuEntry = menuEntries[menuEntries.length - 1]; - final String target = ColorUtil.prependColorTag(Text.removeTags(event.getTarget()), config.getHighlightColor()); - menuEntry.setTarget(target); - client.setMenuEntries(menuEntries); + NPC npc = client.getCachedNPCs()[event.getIdentifier()]; + + Color color = null; + if (npc.isDead()) + { + color = config.deadNpcMenuColor(); + } + + if (color == null && highlightedNpcs.contains(npc) && config.highlightMenuNames() && (!npc.isDead() || !config.ignoreDeadNpcs())) + { + color = config.getHighlightColor(); + } + + if (color != null) + { + MenuEntry[] menuEntries = client.getMenuEntries(); + final MenuEntry menuEntry = menuEntries[menuEntries.length - 1]; + final String target = ColorUtil.prependColorTag(Text.removeTags(event.getTarget()), color); + menuEntry.setTarget(target); + client.setMenuEntries(menuEntries); + } } - else if (hotKeyPressed && type == MenuAction.EXAMINE_NPC.getId()) + else if (hotKeyPressed && menuAction == MenuAction.EXAMINE_NPC) { // Add tag option MenuEntry[] menuEntries = client.getMenuEntries(); diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPluginTest.java index 58df1cf936..7884a7c81b 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/npchighlight/NpcIndicatorsPluginTest.java @@ -27,17 +27,26 @@ package net.runelite.client.plugins.npchighlight; import com.google.inject.Guice; import com.google.inject.testing.fieldbinder.Bind; import com.google.inject.testing.fieldbinder.BoundFieldModule; +import java.awt.Color; import java.util.Iterator; import java.util.List; import java.util.concurrent.ScheduledExecutorService; import javax.inject.Inject; import net.runelite.api.Client; +import net.runelite.api.MenuAction; +import net.runelite.api.MenuEntry; +import net.runelite.api.NPC; +import net.runelite.api.events.MenuEntryAdded; +import net.runelite.api.events.NpcSpawned; +import net.runelite.client.events.ConfigChanged; import net.runelite.client.ui.overlay.OverlayManager; import static org.junit.Assert.assertEquals; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import org.mockito.junit.MockitoJUnitRunner; @@ -81,4 +90,56 @@ public class NpcIndicatorsPluginTest assertEquals("zulrah", iterator.next()); assertEquals("*wyvern", iterator.next()); } + + @Test + public void testDeadNpcMenuHighlight() + { + when(npcIndicatorsConfig.getNpcToHighlight()).thenReturn("goblin"); + when(npcIndicatorsConfig.deadNpcMenuColor()).thenReturn(Color.RED); + + ConfigChanged configChanged = new ConfigChanged(); + configChanged.setGroup("npcindicators"); + npcIndicatorsPlugin.onConfigChanged(configChanged); + + NPC npc = mock(NPC.class); + when(npc.getName()).thenReturn("Goblin"); + when(npc.isDead()).thenReturn(true); + npcIndicatorsPlugin.onNpcSpawned(new NpcSpawned(npc)); + + when(client.getCachedNPCs()).thenReturn(new NPC[]{npc}); // id 0 + + when(client.getMenuEntries()).thenReturn(new MenuEntry[]{new MenuEntry()}); + MenuEntryAdded menuEntryAdded = new MenuEntryAdded("", "Goblin", MenuAction.NPC_FIRST_OPTION.getId(), 0, -1, -1); + npcIndicatorsPlugin.onMenuEntryAdded(menuEntryAdded); + + MenuEntry target = new MenuEntry(); + target.setTarget("Goblin"); // red + verify(client).setMenuEntries(new MenuEntry[]{target}); + } + + @Test + public void testAliveNpcMenuHighlight() + { + when(npcIndicatorsConfig.getNpcToHighlight()).thenReturn("goblin"); + when(npcIndicatorsConfig.highlightMenuNames()).thenReturn(true); + when(npcIndicatorsConfig.getHighlightColor()).thenReturn(Color.BLUE); + + ConfigChanged configChanged = new ConfigChanged(); + configChanged.setGroup("npcindicators"); + npcIndicatorsPlugin.onConfigChanged(configChanged); + + NPC npc = mock(NPC.class); + when(npc.getName()).thenReturn("Goblin"); + npcIndicatorsPlugin.onNpcSpawned(new NpcSpawned(npc)); + + when(client.getCachedNPCs()).thenReturn(new NPC[]{npc}); // id 0 + + when(client.getMenuEntries()).thenReturn(new MenuEntry[]{new MenuEntry()}); + MenuEntryAdded menuEntryAdded = new MenuEntryAdded("", "Goblin", MenuAction.NPC_FIRST_OPTION.getId(), 0, -1, -1); + npcIndicatorsPlugin.onMenuEntryAdded(menuEntryAdded); + + MenuEntry target = new MenuEntry(); + target.setTarget("Goblin"); // blue + verify(client).setMenuEntries(new MenuEntry[]{target}); + } } From cc2ed2311bec808193fbae382cadf4a973f64b20 Mon Sep 17 00:00:00 2001 From: Jacob Lindelof Date: Tue, 2 Jun 2020 21:45:01 -0700 Subject: [PATCH 08/43] antidrag: Add option to use CTRL to disable delay This allows users who enable the plugin to temporarily allow item dragging to reorganize their inventory without fully toggling the plugin off and on again. Co-authored-by: Jordan --- .../plugins/antidrag/AntiDragConfig.java | 11 +++++++ .../plugins/antidrag/AntiDragPlugin.java | 33 ++++++++++++++----- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragConfig.java index d685fe6573..6fa7c3871a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragConfig.java @@ -53,4 +53,15 @@ public interface AntiDragConfig extends Config { return true; } + + @ConfigItem( + keyName = "disableOnCtrl", + name = "Disable On Control Pressed", + description = "Configures whether to ignore the delay while holding control.", + position = 3 + ) + default boolean disableOnCtrl() + { + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragPlugin.java index 8a6459382a..5f55e44a04 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragPlugin.java @@ -70,7 +70,8 @@ public class AntiDragPlugin extends Plugin implements KeyListener private KeyManager keyManager; private boolean inPvp; - private boolean held; + private boolean shiftHeld; + private boolean ctrlHeld; @Provides AntiDragConfig getConfig(ConfigManager configManager) @@ -112,20 +113,30 @@ public class AntiDragPlugin extends Plugin implements KeyListener @Override public void keyPressed(KeyEvent e) { - if (e.getKeyCode() == KeyEvent.VK_SHIFT && (inPvp || config.onShiftOnly())) + if (e.getKeyCode() == KeyEvent.VK_CONTROL && config.disableOnCtrl() && !(inPvp || config.onShiftOnly())) + { + resetDragDelay(); + ctrlHeld = true; + } + else if (e.getKeyCode() == KeyEvent.VK_SHIFT && (inPvp || config.onShiftOnly())) { setDragDelay(); - held = true; + shiftHeld = true; } } @Override public void keyReleased(KeyEvent e) { - if (e.getKeyCode() == KeyEvent.VK_SHIFT && (inPvp || config.onShiftOnly())) + if (e.getKeyCode() == KeyEvent.VK_CONTROL && config.disableOnCtrl() && !(inPvp || config.onShiftOnly())) + { + setDragDelay(); + ctrlHeld = false; + } + else if (e.getKeyCode() == KeyEvent.VK_SHIFT && (inPvp || config.onShiftOnly())) { resetDragDelay(); - held = false; + shiftHeld = false; } } @@ -134,9 +145,14 @@ public class AntiDragPlugin extends Plugin implements KeyListener { if (event.getGroup().equals(CONFIG_GROUP)) { + if (!config.disableOnCtrl()) + { + ctrlHeld = false; + } + if (config.onShiftOnly() || inPvp) { - held = false; + shiftHeld = false; clientThread.invoke(this::resetDragDelay); } else @@ -172,7 +188,8 @@ public class AntiDragPlugin extends Plugin implements KeyListener { if (!focusChanged.isFocused()) { - held = false; + shiftHeld = false; + ctrlHeld = false; clientThread.invoke(this::resetDragDelay); } else if (!inPvp && !config.onShiftOnly()) @@ -184,7 +201,7 @@ public class AntiDragPlugin extends Plugin implements KeyListener @Subscribe public void onWidgetLoaded(WidgetLoaded widgetLoaded) { - if (widgetLoaded.getGroupId() == WidgetID.BANK_GROUP_ID && (!config.onShiftOnly() || held)) + if (widgetLoaded.getGroupId() == WidgetID.BANK_GROUP_ID && (!config.onShiftOnly() || shiftHeld) && !ctrlHeld) { setBankDragDelay(config.dragDelay()); } From dfce3bd7fc85764e9fef086aec23dee59f7be189 Mon Sep 17 00:00:00 2001 From: cyantheum <66275413+cyantheum@users.noreply.github.com> Date: Sat, 6 Jun 2020 02:02:45 -0500 Subject: [PATCH 09/43] motherlode: Fix vein overlay not displaying on upper level (#11796) When standing on the tile south of Mercy, the player's height is -498, just barely under the previous defined height of the upper floor. --- .../runelite/client/plugins/motherlode/MotherlodePlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f67082de66..91725a3754 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 @@ -100,7 +100,7 @@ public class MotherlodePlugin extends Plugin private static final int SACK_LARGE_SIZE = 162; private static final int SACK_SIZE = 81; - private static final int UPPER_FLOOR_HEIGHT = -500; + private static final int UPPER_FLOOR_HEIGHT = -490; @Inject private OverlayManager overlayManager; From 04263990ccab8ff749ab08cf4d293a52e01217ff Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Sat, 6 Jun 2020 12:59:02 +0100 Subject: [PATCH 10/43] clues: update ranging mix sherlock master challenge --- .../client/plugins/cluescrolls/clues/SkillChallengeClue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/SkillChallengeClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/SkillChallengeClue.java index 404de2bb6c..768b50c8c1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/SkillChallengeClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/SkillChallengeClue.java @@ -173,7 +173,7 @@ public class SkillChallengeClue extends ClueScroll implements NpcClueScroll, Nam new SkillChallengeClue("Steal a gem from the Ardougne market."), new SkillChallengeClue("Pickpocket an elf."), new SkillChallengeClue("Bind a blood rune at the blood altar.", item(ItemID.DARK_ESSENCE_FRAGMENTS)), - new SkillChallengeClue("Create a ranging mix potion.", item(ItemID.RANGING_POTION2), item(ItemID.CAVIAR)), + new SkillChallengeClue("Create a ranging mix potion.", "mix a ranging mix potion.", item(ItemID.RANGING_POTION2), item(ItemID.CAVIAR)), new SkillChallengeClue("Fletch a rune dart.", item(ItemID.RUNE_DART_TIP), item(ItemID.FEATHER)), new SkillChallengeClue("Cremate a set of fiyr remains.", any("Magic or Redwood Pyre Logs", item(ItemID.MAGIC_PYRE_LOGS), item(ItemID.REDWOOD_PYRE_LOGS)), item(ItemID.TINDERBOX), item(ItemID.FIYR_REMAINS)), new SkillChallengeClue("Dissect a sacred eel.", item(ItemID.KNIFE), any("Fishing rod", item(ItemID.FISHING_ROD), item(ItemID.PEARL_FISHING_ROD)), item(ItemID.FISHING_BAIT)), From a1122ba141c3e96ef9d3c19c7258fc1a543a568e Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 6 Jun 2020 00:01:08 -0400 Subject: [PATCH 11/43] ge: fix computing bought/sold amount Use the total spent price instead of the delta spent price, as it is being divided by the total quantity --- .../java/net/runelite/http/api/ge/GrandExchangeTrade.java | 1 + .../net/runelite/http/service/ge/GrandExchangeController.java | 2 +- .../client/plugins/grandexchange/GrandExchangePlugin.java | 4 ++-- .../client/plugins/grandexchange/GrandExchangePluginTest.java | 4 +++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/http-api/src/main/java/net/runelite/http/api/ge/GrandExchangeTrade.java b/http-api/src/main/java/net/runelite/http/api/ge/GrandExchangeTrade.java index 3e886b68cb..0ab9260f7f 100644 --- a/http-api/src/main/java/net/runelite/http/api/ge/GrandExchangeTrade.java +++ b/http-api/src/main/java/net/runelite/http/api/ge/GrandExchangeTrade.java @@ -38,6 +38,7 @@ public class GrandExchangeTrade private int dqty; private int total; private int spent; + private int dspent; private int offer; private int slot; private WorldType worldType; diff --git a/http-service/src/main/java/net/runelite/http/service/ge/GrandExchangeController.java b/http-service/src/main/java/net/runelite/http/service/ge/GrandExchangeController.java index ad03083739..c6eaf85b15 100644 --- a/http-service/src/main/java/net/runelite/http/service/ge/GrandExchangeController.java +++ b/http-service/src/main/java/net/runelite/http/service/ge/GrandExchangeController.java @@ -94,7 +94,7 @@ public class GrandExchangeController trade.setQty(grandExchangeTrade.getQty()); trade.setDqty(grandExchangeTrade.getDqty()); trade.setTotal(grandExchangeTrade.getTotal()); - trade.setSpent(grandExchangeTrade.getSpent()); + trade.setSpent(grandExchangeTrade.getDspent()); trade.setOffer(grandExchangeTrade.getOffer()); trade.setSlot(grandExchangeTrade.getSlot()); trade.setTime((int) (System.currentTimeMillis() / 1000L)); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java index 9de2574fc7..02972dd772 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java @@ -420,7 +420,6 @@ public class GrandExchangePlugin extends Plugin grandExchangeTrade.setBuy(state == GrandExchangeOfferState.BUYING); grandExchangeTrade.setItemId(offer.getItemId()); grandExchangeTrade.setTotal(offer.getTotalQuantity()); - grandExchangeTrade.setSpent(0); grandExchangeTrade.setOffer(offer.getPrice()); grandExchangeTrade.setSlot(slot); grandExchangeTrade.setWorldType(getGeWorldType()); @@ -475,7 +474,8 @@ public class GrandExchangePlugin extends Plugin grandExchangeTrade.setQty(offer.getQuantitySold()); grandExchangeTrade.setDqty(qty); grandExchangeTrade.setTotal(offer.getTotalQuantity()); - grandExchangeTrade.setSpent(dspent); + grandExchangeTrade.setDspent(dspent); + grandExchangeTrade.setSpent(offer.getSpent()); grandExchangeTrade.setOffer(offer.getPrice()); grandExchangeTrade.setSlot(slot); grandExchangeTrade.setWorldType(getGeWorldType()); diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/grandexchange/GrandExchangePluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/grandexchange/GrandExchangePluginTest.java index 1f7e4d1993..0c3dc00d04 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/grandexchange/GrandExchangePluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/grandexchange/GrandExchangePluginTest.java @@ -135,6 +135,7 @@ public class GrandExchangePluginTest @Test public void testSubmitTrade() { + // 1 @ 25 SavedOffer savedOffer = new SavedOffer(); savedOffer.setItemId(ItemID.ABYSSAL_WHIP); savedOffer.setQuantitySold(1); @@ -162,7 +163,8 @@ public class GrandExchangePluginTest assertEquals(ItemID.ABYSSAL_WHIP, trade.getItemId()); assertEquals(2, trade.getDqty()); assertEquals(10, trade.getTotal()); - assertEquals(20, trade.getSpent()); + assertEquals(45, trade.getSpent()); + assertEquals(20, trade.getDspent()); } @Test From b63466694f34895dd75e9b22c9a016330dac7a6f Mon Sep 17 00:00:00 2001 From: Max Weber Date: Thu, 4 Jun 2020 18:39:46 -0600 Subject: [PATCH 12/43] IconTextField: fire clear listener after text has been cleared This would put the ge search panel into an invalid state where it could no longer be interacted with --- .../GrandExchangeSearchPanel.java | 2 +- .../skillcalculator/SkillCalculator.java | 2 +- .../client/ui/components/IconTextField.java | 19 +++++++++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangeSearchPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangeSearchPanel.java index 19683158b4..723d9f697a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangeSearchPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangeSearchPanel.java @@ -98,7 +98,7 @@ class GrandExchangeSearchPanel extends JPanel searchBar.setBackground(ColorScheme.DARKER_GRAY_COLOR); searchBar.setHoverBackgroundColor(ColorScheme.DARK_GRAY_HOVER_COLOR); searchBar.addActionListener(e -> executor.execute(() -> priceLookup(false))); - searchBar.addClearListener(e -> updateSearch()); + searchBar.addClearListener(this::updateSearch); searchItemsPanel.setLayout(new GridBagLayout()); searchItemsPanel.setBackground(ColorScheme.DARK_GRAY_COLOR); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/skillcalculator/SkillCalculator.java b/runelite-client/src/main/java/net/runelite/client/plugins/skillcalculator/SkillCalculator.java index 30d6979a54..64422ee34c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/skillcalculator/SkillCalculator.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/skillcalculator/SkillCalculator.java @@ -94,7 +94,7 @@ class SkillCalculator extends JPanel searchBar.setPreferredSize(new Dimension(PluginPanel.PANEL_WIDTH - 20, 30)); searchBar.setBackground(ColorScheme.DARKER_GRAY_COLOR); searchBar.setHoverBackgroundColor(ColorScheme.DARK_GRAY_HOVER_COLOR); - searchBar.addClearListener(e -> onSearch()); + searchBar.addClearListener(this::onSearch); searchBar.addKeyListener(e -> onSearch()); setLayout(new DynamicGridLayout(0, 1, 0, 5)); diff --git a/runelite-client/src/main/java/net/runelite/client/ui/components/IconTextField.java b/runelite-client/src/main/java/net/runelite/client/ui/components/IconTextField.java index 0266caa450..cb317b8afd 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/components/IconTextField.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/components/IconTextField.java @@ -29,7 +29,6 @@ package net.runelite.client.ui.components; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; -import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; @@ -38,6 +37,8 @@ import java.awt.event.KeyListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; +import java.util.ArrayList; +import java.util.List; import java.util.function.Consumer; import javax.swing.DefaultListModel; import javax.swing.ImageIcon; @@ -77,6 +78,8 @@ public class IconTextField extends JPanel @Getter private final DefaultListModel suggestionListModel; + private final List clearListeners = new ArrayList<>(); + public IconTextField() { setLayout(new BorderLayout()); @@ -124,7 +127,15 @@ public class IconTextField extends JPanel clearButton = createRHSButton(ColorScheme.PROGRESS_ERROR_COLOR, Color.PINK); clearButton.setText("×"); - clearButton.addActionListener(evt -> setText(null)); + clearButton.addActionListener(evt -> + { + setText(null); + + for (Runnable l : clearListeners) + { + l.run(); + } + }); suggestionListModel = new DefaultListModel<>(); suggestionListModel.addListDataListener(new ListDataListener() @@ -318,9 +329,9 @@ public class IconTextField extends JPanel textField.addKeyListener(keyListener); } - public void addClearListener(Consumer actionEventConsumer) + public void addClearListener(Runnable clearListener) { - clearButton.addActionListener(actionEventConsumer::accept); + clearListeners.add(clearListener); } public void addKeyListener(Consumer keyEventConsumer) From 37e8928a1dfa19c3fdf80b2d2c2ecd6152fe32c7 Mon Sep 17 00:00:00 2001 From: Adam Blaida Date: Sun, 7 Jun 2020 13:28:47 -0500 Subject: [PATCH 13/43] Update lumbridge guide's position for anagram clue --- .../runelite/client/plugins/cluescrolls/clues/AnagramClue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java index accb87bdaa..b954168fae 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java @@ -69,7 +69,7 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc 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"), new AnagramClue("BAIL TRIMS", "Brimstail", new WorldPoint(2402, 3419, 0), "West of Stronghold Slayer Cave"), new AnagramClue("BAKER CLIMB", "Brambickle", new WorldPoint(2783, 3861, 0), "Trollweiss mountain"), - new AnagramClue("BLUE GRIM GUIDED", "Lumbridge Guide", new WorldPoint(3232, 3232, 0), "Lumbridge"), + new AnagramClue("BLUE GRIM GUIDED", "Lumbridge Guide", new WorldPoint(3238, 3220, 0), "Lumbridge"), new AnagramClue("BY LOOK", "Bolkoy", new WorldPoint(2529, 3162, 0), "Tree Gnome Village general store", "How many flowers are there in the clearing below this platform?", "13"), new AnagramClue("CALAMARI MADE MUD", "Madame Caldarium", new WorldPoint(2553, 2868, 0), "Corsair Cove", "What is 3(5-3)?", "6"), new AnagramClue("CAR IF ICES", "Sacrifice", new WorldPoint(2209, 3056, 0), "Zul-Andra"), From b453624dd93ae064046605ca1b151b56119523b4 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 8 Jun 2020 10:31:41 -0400 Subject: [PATCH 14/43] pom: set release 8 on jdk9+ This fixes having Java 9+ API dependencies generated by the compiler when building on JDK9+ despite targeting Java 8 bytecode. This fixes the gpu plugin linking errors when running on Java 8 after being compiled on 9+. --- pom.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pom.xml b/pom.xml index 791eed53dc..e0d6bb7e88 100644 --- a/pom.xml +++ b/pom.xml @@ -38,6 +38,7 @@ UTF-8 1.8 + 8 1.18.4 true @@ -151,6 +152,25 @@ + + + java9 + + [1.9,) + + + + + maven-compiler-plugin + + ${java.release} + + + + + + + From 30681d89357ed814193e15df89d369351edf6f5b Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Sat, 9 May 2020 17:29:14 +0100 Subject: [PATCH 15/43] config: add support for sections --- .../client/config/ConfigDescriptor.java | 16 +-- .../runelite/client/config/ConfigItem.java | 2 + .../client/config/ConfigItemDescriptor.java | 20 ++- .../runelite/client/config/ConfigManager.java | 28 ++++- .../runelite/client/config/ConfigObject.java | 32 +++++ .../runelite/client/config/ConfigSection.java | 43 +++++++ .../config/ConfigSectionDescriptor.java | 52 ++++++++ .../client/plugins/config/ConfigPanel.java | 117 +++++++++++++++++- 8 files changed, 295 insertions(+), 15 deletions(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/config/ConfigObject.java create mode 100644 runelite-client/src/main/java/net/runelite/client/config/ConfigSection.java create mode 100644 runelite-client/src/main/java/net/runelite/client/config/ConfigSectionDescriptor.java diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigDescriptor.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigDescriptor.java index 34db13d2e9..b234e756d6 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigDescriptor.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigDescriptor.java @@ -24,26 +24,20 @@ */ package net.runelite.client.config; +import lombok.Getter; import java.util.Collection; +@Getter public class ConfigDescriptor { private final ConfigGroup group; + private final Collection sections; private final Collection items; - public ConfigDescriptor(ConfigGroup group, Collection items) + public ConfigDescriptor(ConfigGroup group, Collection sections, Collection items) { this.group = group; + this.sections = sections; this.items = items; } - - public ConfigGroup getGroup() - { - return group; - } - - public Collection getItems() - { - return items; - } } diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigItem.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigItem.java index b50094826e..a9a511cc08 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigItem.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigItem.java @@ -46,4 +46,6 @@ public @interface ConfigItem String warning() default ""; boolean secret() default false; + + String section() default ""; } diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigItemDescriptor.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigItemDescriptor.java index 852d9fa873..d6ced58e18 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigItemDescriptor.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigItemDescriptor.java @@ -27,11 +27,29 @@ package net.runelite.client.config; import lombok.Value; @Value -public class ConfigItemDescriptor +public class ConfigItemDescriptor implements ConfigObject { private final ConfigItem item; private final Class type; private final Range range; private final Alpha alpha; private final Units units; + + @Override + public String key() + { + return item.keyName(); + } + + @Override + public String name() + { + return item.name(); + } + + @Override + public int position() + { + return item.position(); + } } diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java index 61c748047c..e4cbdcc5b1 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java @@ -468,8 +468,32 @@ public class ConfigManager throw new IllegalArgumentException("Not a config group"); } + final List sections = Arrays.stream(inter.getDeclaredFields()) + .filter(m -> m.isAnnotationPresent(ConfigSection.class) && m.getType() == String.class) + .map(m -> + { + try + { + return new ConfigSectionDescriptor( + String.valueOf(m.get(inter)), + m.getDeclaredAnnotation(ConfigSection.class) + ); + } + catch (IllegalAccessException e) + { + log.warn("Unable to load section {}::{}", inter.getSimpleName(), m.getName()); + return null; + } + }) + .filter(Objects::nonNull) + .sorted((a, b) -> ComparisonChain.start() + .compare(a.getSection().position(), b.getSection().position()) + .compare(a.getSection().name(), b.getSection().name()) + .result()) + .collect(Collectors.toList()); + final List items = Arrays.stream(inter.getMethods()) - .filter(m -> m.getParameterCount() == 0) + .filter(m -> m.getParameterCount() == 0 && m.isAnnotationPresent(ConfigItem.class)) .map(m -> new ConfigItemDescriptor( m.getDeclaredAnnotation(ConfigItem.class), m.getReturnType(), @@ -483,7 +507,7 @@ public class ConfigManager .result()) .collect(Collectors.toList()); - return new ConfigDescriptor(group, items); + return new ConfigDescriptor(group, sections, items); } /** diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigObject.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigObject.java new file mode 100644 index 0000000000..0e8010e58e --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigObject.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2020, Hydrox6 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.config; + +public interface ConfigObject +{ + String key(); + String name(); + int position(); +} diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigSection.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigSection.java new file mode 100644 index 0000000000..4a0f722d3f --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigSection.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2019, Hydrox6 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.config; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ConfigSection +{ + String name(); + + String description(); + + int position(); + + boolean closedByDefault() default false; +} diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigSectionDescriptor.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigSectionDescriptor.java new file mode 100644 index 0000000000..9a8447ee49 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigSectionDescriptor.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2020, Hydrox6 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.config; + +import lombok.Value; + +@Value +public class ConfigSectionDescriptor implements ConfigObject +{ + private final String key; + private final ConfigSection section; + + @Override + public String key() + { + return key; + } + + @Override + public String name() + { + return section.name(); + } + + @Override + public int position() + { + return section.position(); + } +} \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java index 20c04f79fd..db39c25e50 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java @@ -25,6 +25,7 @@ package net.runelite.client.plugins.config; import com.google.common.base.Strings; +import com.google.common.collect.ComparisonChain; import com.google.common.primitives.Ints; import java.awt.BorderLayout; import java.awt.Color; @@ -36,8 +37,12 @@ import java.awt.event.ItemEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.image.BufferedImage; +import java.util.HashMap; +import java.util.Map; +import java.util.TreeMap; import javax.inject.Inject; import javax.swing.BorderFactory; +import javax.swing.BoxLayout; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JCheckBox; @@ -55,7 +60,9 @@ import javax.swing.ScrollPaneConstants; import javax.swing.SpinnerModel; import javax.swing.SpinnerNumberModel; import javax.swing.SwingUtilities; +import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; +import javax.swing.border.MatteBorder; import javax.swing.event.ChangeListener; import javax.swing.text.JTextComponent; import lombok.extern.slf4j.Slf4j; @@ -63,6 +70,9 @@ import net.runelite.client.config.ConfigDescriptor; import net.runelite.client.config.ConfigItem; import net.runelite.client.config.ConfigItemDescriptor; import net.runelite.client.config.ConfigManager; +import net.runelite.client.config.ConfigObject; +import net.runelite.client.config.ConfigSection; +import net.runelite.client.config.ConfigSectionDescriptor; import net.runelite.client.config.Keybind; import net.runelite.client.config.ModifierlessKeybind; import net.runelite.client.config.Range; @@ -76,6 +86,7 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginManager; import net.runelite.client.ui.ColorScheme; import net.runelite.client.ui.DynamicGridLayout; +import net.runelite.client.ui.FontManager; import net.runelite.client.ui.PluginPanel; import net.runelite.client.ui.components.ComboBoxListRenderer; import net.runelite.client.ui.components.colorpicker.ColorPickerManager; @@ -89,9 +100,15 @@ import net.runelite.client.util.Text; class ConfigPanel extends PluginPanel { private static final int SPINNER_FIELD_WIDTH = 6; + private static final ImageIcon SECTION_EXPAND_ICON; + private static final ImageIcon SECTION_EXPAND_ICON_HOVER; + private static final ImageIcon SECTION_RETRACT_ICON; + private static final ImageIcon SECTION_RETRACT_ICON_HOVER; static final ImageIcon BACK_ICON; static final ImageIcon BACK_ICON_HOVER; + private static final Map sectionExpandStates = new HashMap<>(); + private final FixedWidthPanel mainPanel; private final JLabel title; private final PluginToggleButton pluginToggle; @@ -118,6 +135,14 @@ class ConfigPanel extends PluginPanel final BufferedImage backIcon = ImageUtil.getResourceStreamFromClass(ConfigPanel.class, "config_back_icon.png"); BACK_ICON = new ImageIcon(backIcon); BACK_ICON_HOVER = new ImageIcon(ImageUtil.alphaOffset(backIcon, -100)); + + BufferedImage sectionRetractIcon = ImageUtil.getResourceStreamFromClass(ConfigPanel.class, "/util/arrow_right.png"); + sectionRetractIcon = ImageUtil.luminanceOffset(sectionRetractIcon, -121); + SECTION_EXPAND_ICON = new ImageIcon(sectionRetractIcon); + SECTION_EXPAND_ICON_HOVER = new ImageIcon(ImageUtil.alphaOffset(sectionRetractIcon, -100)); + final BufferedImage sectionExpandIcon = ImageUtil.rotateImage(sectionRetractIcon, Math.PI / 2); + SECTION_RETRACT_ICON = new ImageIcon(sectionExpandIcon); + SECTION_RETRACT_ICON_HOVER = new ImageIcon(ImageUtil.alphaOffset(sectionExpandIcon, -100)); } public ConfigPanel() @@ -205,11 +230,91 @@ class ConfigPanel extends PluginPanel rebuild(); } + private void toggleSection(ConfigSectionDescriptor csd, JButton button, JPanel contents) + { + boolean newState = !contents.isVisible(); + contents.setVisible(newState); + button.setIcon(newState ? SECTION_RETRACT_ICON : SECTION_EXPAND_ICON); + button.setRolloverIcon(newState ? SECTION_RETRACT_ICON_HOVER : SECTION_EXPAND_ICON_HOVER); + button.setToolTipText(newState ? "Retract" : "Expand"); + sectionExpandStates.put(csd, newState); + SwingUtilities.invokeLater(contents::revalidate); + } + private void rebuild() { mainPanel.removeAll(); ConfigDescriptor cd = pluginConfig.getConfigDescriptor(); + + final Map sectionWidgets = new HashMap<>(); + final Map topLevelPanels = new TreeMap<>((a, b) -> + ComparisonChain.start() + .compare(a.position(), b.position()) + .compare(a.name(), b.name()) + .result()); + + for (ConfigSectionDescriptor csd : cd.getSections()) + { + ConfigSection cs = csd.getSection(); + final boolean isOpen = sectionExpandStates.getOrDefault(csd, !cs.closedByDefault()); + + final JPanel section = new JPanel(); + section.setLayout(new BoxLayout(section, BoxLayout.Y_AXIS)); + section.setMinimumSize(new Dimension(PANEL_WIDTH, 0)); + + final JPanel sectionHeader = new JPanel(); + sectionHeader.setLayout(new BorderLayout()); + sectionHeader.setMinimumSize(new Dimension(PANEL_WIDTH, 0)); + // For whatever reason, the header extends out by a single pixel when closed. Adding a single pixel of + // border on the right only affects the width when closed, fixing the issue. + sectionHeader.setBorder(new CompoundBorder( + new MatteBorder(0, 0, 1, 0, ColorScheme.MEDIUM_GRAY_COLOR), + new EmptyBorder(0, 0, 3, 1))); + section.add(sectionHeader, BorderLayout.NORTH); + + final JButton sectionToggle = new JButton(isOpen ? SECTION_RETRACT_ICON : SECTION_EXPAND_ICON); + sectionToggle.setRolloverIcon(isOpen ? SECTION_RETRACT_ICON_HOVER : SECTION_EXPAND_ICON_HOVER); + sectionToggle.setPreferredSize(new Dimension(18, 0)); + sectionToggle.setBorder(new EmptyBorder(0, 0, 0, 5)); + sectionToggle.setToolTipText(isOpen ? "Retract" : "Expand"); + SwingUtil.removeButtonDecorations(sectionToggle); + sectionHeader.add(sectionToggle, BorderLayout.WEST); + + String name = cs.name(); + final JLabel sectionName = new JLabel(name); + sectionName.setForeground(ColorScheme.BRAND_ORANGE); + sectionName.setFont(FontManager.getRunescapeBoldFont()); + sectionName.setToolTipText("" + name + ":
" + cs.description() + ""); + sectionHeader.add(sectionName, BorderLayout.CENTER); + + final JPanel sectionContents = new JPanel(); + sectionContents.setLayout(new DynamicGridLayout(0, 1, 0, 5)); + sectionContents.setMinimumSize(new Dimension(PANEL_WIDTH, 0)); + sectionContents.setBorder(new CompoundBorder( + new MatteBorder(0, 0, 1, 0, ColorScheme.MEDIUM_GRAY_COLOR), + new EmptyBorder(BORDER_OFFSET, 0, BORDER_OFFSET, 0))); + sectionContents.setVisible(isOpen); + section.add(sectionContents, BorderLayout.SOUTH); + + // Add listeners to each part of the header so that it's easier to toggle them + final MouseAdapter adapter = new MouseAdapter() + { + @Override + public void mouseClicked(MouseEvent e) + { + toggleSection(csd, sectionToggle, sectionContents); + } + }; + sectionToggle.addActionListener(actionEvent -> toggleSection(csd, sectionToggle, sectionContents)); + sectionName.addMouseListener(adapter); + sectionHeader.addMouseListener(adapter); + + sectionWidgets.put(csd.getKey(), sectionContents); + + topLevelPanels.put(csd, section); + } + for (ConfigItemDescriptor cid : cd.getItems()) { if (cid.getItem().hidden()) @@ -427,9 +532,19 @@ class ConfigPanel extends PluginPanel item.add(button, BorderLayout.EAST); } - mainPanel.add(item); + JPanel section = sectionWidgets.get(cid.getItem().section()); + if (section == null) + { + topLevelPanels.put(cid, item); + } + else + { + section.add(item); + } } + topLevelPanels.values().forEach(mainPanel::add); + JButton resetButton = new JButton("Reset"); resetButton.addActionListener((e) -> { From 40f17648b4e83d1659d3fde5b7fb1d3ba2218a04 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Fri, 5 Jun 2020 22:55:21 +0100 Subject: [PATCH 16/43] add sections to various configs --- .../client/config/ChatColorConfig.java | 286 +++++++++++------- .../client/config/RuneLiteConfig.java | 101 +++++-- .../grounditems/GroundItemsConfig.java | 15 +- .../plugins/implings/ImplingsConfig.java | 80 +++-- .../plugins/itemcharges/ItemChargeConfig.java | 75 +++-- .../ItemIdentificationConfig.java | 29 +- .../keyremapping/KeyRemappingConfig.java | 72 +++-- .../loottracker/LootTrackerConfig.java | 17 +- .../MenuEntrySwapperConfig.java | 158 +++++++--- .../PlayerIndicatorsConfig.java | 38 ++- .../randomevents/RandomEventConfig.java | 38 ++- .../plugins/runecraft/RunecraftConfig.java | 70 +++-- .../plugins/screenshot/ScreenshotConfig.java | 44 ++- .../plugins/xptracker/XpTrackerConfig.java | 17 +- 14 files changed, 730 insertions(+), 310 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/config/ChatColorConfig.java b/runelite-client/src/main/java/net/runelite/client/config/ChatColorConfig.java index e57be2942b..2839512e3d 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ChatColorConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ChatColorConfig.java @@ -30,19 +30,37 @@ import net.runelite.client.ui.JagexColors; @ConfigGroup("textrecolor") public interface ChatColorConfig extends Config { + @ConfigSection( + name = "Opaque", + description = "The options that control the colours for the Opaque Chatbox", + position = 0, + closedByDefault = true + ) + String opaqueSection = "opaqueSection"; + + @ConfigSection( + name = "Transparent", + description = "The options that control the colours for the Transparent Chatbox", + position = 50, + closedByDefault = true + ) + String transparentSection = "transparentSection"; + @ConfigItem( - position = 31, + position = 1, keyName = "opaquePublicChat", name = "Public chat", - description = "Color of Public chat" + description = "Color of Public chat", + section = opaqueSection ) Color opaquePublicChat(); @ConfigItem( - position = 32, + position = 2, keyName = "opaquePublicChatHighlight", name = "Public chat highlight", - description = "Color of highlights in Public chat" + description = "Color of highlights in Public chat", + section = opaqueSection ) default Color opaquePublicChatHighlight() { @@ -50,18 +68,20 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 33, + position = 3, keyName = "opaquePrivateMessageSent", name = "Sent private messages", - description = "Color of Private messages you've sent" + description = "Color of Private messages you've sent", + section = opaqueSection ) Color opaquePrivateMessageSent(); @ConfigItem( - position = 34, + position = 4, keyName = "opaquePrivateMessageSentHighlight", name = "Sent private messages highlight", - description = "Color of highlights in Private messages you've sent" + description = "Color of highlights in Private messages you've sent", + section = opaqueSection ) default Color opaquePrivateMessageSentHighlight() { @@ -69,18 +89,20 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 35, + position = 5, keyName = "opaquePrivateMessageReceived", name = "Received private messages", - description = "Color of Private messages you've received" + description = "Color of Private messages you've received", + section = opaqueSection ) Color opaquePrivateMessageReceived(); @ConfigItem( - position = 36, + position = 6, keyName = "opaquePrivateMessageReceivedHighlight", name = "Received private messages highlight", - description = "Color of highlights in Private messages you've received" + description = "Color of highlights in Private messages you've received", + section = opaqueSection ) default Color opaquePrivateMessageReceivedHighlight() { @@ -88,10 +110,11 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 37, + position = 7, keyName = "opaqueClanChatInfo", name = "Clan chat info", - description = "Clan Chat Information (eg. when joining a channel)" + description = "Clan Chat Information (eg. when joining a channel)", + section = opaqueSection ) default Color opaqueClanChatInfo() { @@ -99,10 +122,11 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 38, + position = 8, keyName = "opaqueClanChatInfoHighlight", name = "Clan chat info highlight", - description = "Clan Chat Information highlight (used for the Raids plugin)" + description = "Clan Chat Information highlight (used for the Raids plugin)", + section = opaqueSection ) default Color opaqueClanChatInfoHighlight() { @@ -110,18 +134,20 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 39, + position = 9, keyName = "opaqueClanChatMessage", name = "Clan chat message", - description = "Color of Clan Chat Messages" + description = "Color of Clan Chat Messages", + section = opaqueSection ) Color opaqueClanChatMessage(); @ConfigItem( - position = 40, + position = 10, keyName = "opaqueClanChatMessageHighlight", name = "Clan chat message highlight", - description = "Color of highlights in Clan Chat Messages" + description = "Color of highlights in Clan Chat Messages", + section = opaqueSection ) default Color opaqueClanChatMessageHighlight() { @@ -129,66 +155,74 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 41, + position = 11, keyName = "opaqueAutochatMessage", name = "Autochat", - description = "Color of Autochat messages" + description = "Color of Autochat messages", + section = opaqueSection ) Color opaqueAutochatMessage(); @ConfigItem( - position = 42, + position = 12, keyName = "opaqueAutochatMessageHighlight", name = "Autochat highlight", - description = "Color of highlights in Autochat messages" + description = "Color of highlights in Autochat messages", + section = opaqueSection ) Color opaqueAutochatMessageHighlight(); @ConfigItem( - position = 43, + position = 13, keyName = "opaqueTradeChatMessage", name = "Trade chat", - description = "Color of Trade Chat Messages" + description = "Color of Trade Chat Messages", + section = opaqueSection ) Color opaqueTradeChatMessage(); @ConfigItem( - position = 44, + position = 14, keyName = "opaqueTradeChatMessageHighlight", name = "Trade chat highlight", - description = "Color of highlights in Trade Chat Messages" + description = "Color of highlights in Trade Chat Messages", + section = opaqueSection ) Color opaqueTradeChatMessageHighlight(); @ConfigItem( - position = 45, + position = 15, keyName = "opaqueServerMessage", name = "Server message", - description = "Color of Server Messages (eg. 'Welcome to RuneScape')" + description = "Color of Server Messages (eg. 'Welcome to RuneScape')", + section = opaqueSection ) Color opaqueServerMessage(); @ConfigItem( - position = 46, + position = 16, keyName = "opaqueServerMessageHighlight", name = "Server message highlight", - description = "Color of highlights in Server Messages" + description = "Color of highlights in Server Messages", + section = opaqueSection ) Color opaqueServerMessageHighlight(); @ConfigItem( - position = 47, + position = 17, keyName = "opaqueGameMessage", name = "Game message", - description = "Color of Game Messages" + description = "Color of Game Messages", + section = opaqueSection ) Color opaqueGameMessage(); @ConfigItem( - position = 48, + position = 18, keyName = "opaqueGameMessageHighlight", name = "Game message highlight", - description = "Color of highlights in Game Messages" + description = "Color of highlights in Game Messages", + section = opaqueSection ) default Color opaqueGameMessageHighlight() { @@ -196,18 +230,20 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 49, + position = 19, keyName = "opaqueExamine", name = "Examine", - description = "Color of Examine Text" + description = "Color of Examine Text", + section = opaqueSection ) Color opaqueExamine(); @ConfigItem( - position = 50, + position = 20, keyName = "opaqueExamineHighlight", name = "Examine highlight", - description = "Color of highlights in Examine Text" + description = "Color of highlights in Examine Text", + section = opaqueSection ) default Color opaqueExamineHighlight() { @@ -215,74 +251,83 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 51, + position = 21, keyName = "opaqueFiltered", name = "Filtered", - description = "Color of Filtered Text (messages that aren't shown when Game messages are filtered)" + description = "Color of Filtered Text (messages that aren't shown when Game messages are filtered)", + section = opaqueSection ) Color opaqueFiltered(); @ConfigItem( - position = 52, + position = 22, keyName = "opaqueFilteredHighlight", name = "Filtered highlight", - description = "Color of highlights in Filtered Text" + description = "Color of highlights in Filtered Text", + section = opaqueSection ) Color opaqueFilteredHighlight(); @ConfigItem( - position = 53, + position = 23, keyName = "opaqueUsername", name = "Usernames", - description = "Color of Usernames" + description = "Color of Usernames", + section = opaqueSection ) Color opaqueUsername(); @ConfigItem( - position = 54, + position = 24, keyName = "opaquePrivateUsernames", name = "Private chat usernames", - description = "Color of Usernames in Private Chat" + description = "Color of Usernames in Private Chat", + section = opaqueSection ) Color opaquePrivateUsernames(); @ConfigItem( - position = 55, + position = 25, keyName = "opaqueClanChannelName", name = "Clan channel name", - description = "Color of Clan Channel Name" + description = "Color of Clan Channel Name", + section = opaqueSection ) Color opaqueClanChannelName(); @ConfigItem( - position = 56, + position = 26, keyName = "opaqueClanUsernames", name = "Clan usernames", - description = "Color of Usernames in Clan Chat" + description = "Color of Usernames in Clan Chat", + section = opaqueSection ) Color opaqueClanUsernames(); @ConfigItem( - position = 57, + position = 27, keyName = "opaquePublicFriendUsernames", name = "Public friend usernames", - description = "Color of Friend Usernames in Public Chat" + description = "Color of Friend Usernames in Public Chat", + section = opaqueSection ) Color opaquePublicFriendUsernames(); @ConfigItem( - position = 61, + position = 51, keyName = "transparentPublicChat", name = "Public chat (transparent)", - description = "Color of Public chat (transparent)" + description = "Color of Public chat (transparent)", + section = transparentSection ) Color transparentPublicChat(); @ConfigItem( - position = 62, + position = 52, keyName = "transparentPublicChatHighlight", name = "Public chat highlight (transparent)", - description = "Color of highlights in Public chat (transparent)" + description = "Color of highlights in Public chat (transparent)", + section = transparentSection ) default Color transparentPublicChatHighlight() { @@ -290,18 +335,20 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 63, + position = 53, keyName = "transparentPrivateMessageSent", name = "Sent private messages (transparent)", - description = "Color of Private messages you've sent (transparent)" + description = "Color of Private messages you've sent (transparent)", + section = transparentSection ) Color transparentPrivateMessageSent(); @ConfigItem( - position = 64, + position = 54, keyName = "transparentPrivateMessageSentHighlight", name = "Sent private messages highlight (transparent)", - description = "Color of highlights in Private messages you've sent (transparent)" + description = "Color of highlights in Private messages you've sent (transparent)", + section = transparentSection ) default Color transparentPrivateMessageSentHighlight() { @@ -309,18 +356,20 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 65, + position = 55, keyName = "transparentPrivateMessageReceived", name = "Received private messages (transparent)", - description = "Color of Private messages you've received (transparent)" + description = "Color of Private messages you've received (transparent)", + section = transparentSection ) Color transparentPrivateMessageReceived(); @ConfigItem( - position = 66, + position = 56, keyName = "transparentPrivateMessageReceivedHighlight", name = "Received private messages highlight (transparent)", - description = "Color of highlights in Private messages you've received (transparent)" + description = "Color of highlights in Private messages you've received (transparent)", + section = transparentSection ) default Color transparentPrivateMessageReceivedHighlight() { @@ -328,10 +377,11 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 67, + position = 57, keyName = "transparentClanChatInfo", name = "Clan chat info (transparent)", - description = "Clan Chat Information (eg. when joining a channel) (transparent)" + description = "Clan Chat Information (eg. when joining a channel) (transparent)", + section = transparentSection ) default Color transparentClanChatInfo() { @@ -339,10 +389,11 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 68, + position = 58, keyName = "transparentClanChatInfoHighlight", name = "Clan chat info highlight (transparent)", - description = "Clan Chat Information highlight (used for the Raids plugin) (transparent)" + description = "Clan Chat Information highlight (used for the Raids plugin) (transparent)", + section = transparentSection ) default Color transparentClanChatInfoHighlight() { @@ -350,18 +401,20 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 69, + position = 59, keyName = "transparentClanChatMessage", name = "Clan chat message (transparent)", - description = "Color of Clan Chat Messages (transparent)" + description = "Color of Clan Chat Messages (transparent)", + section = transparentSection ) Color transparentClanChatMessage(); @ConfigItem( - position = 70, + position = 60, keyName = "transparentClanChatMessageHighlight", name = "Clan chat message highlight (transparent)", - description = "Color of highlights in Clan Chat Messages (transparent)" + description = "Color of highlights in Clan Chat Messages (transparent)", + section = transparentSection ) default Color transparentClanChatMessageHighlight() { @@ -369,66 +422,74 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 71, + position = 61, keyName = "transparentAutochatMessage", name = "Autochat (transparent)", - description = "Color of Autochat messages (transparent)" + description = "Color of Autochat messages (transparent)", + section = transparentSection ) Color transparentAutochatMessage(); @ConfigItem( - position = 72, + position = 62, keyName = "transparentAutochatMessageHighlight", name = "Autochat highlight (transparent)", - description = "Color of highlights in Autochat messages (transparent)" + description = "Color of highlights in Autochat messages (transparent)", + section = transparentSection ) Color transparentAutochatMessageHighlight(); @ConfigItem( - position = 73, + position = 63, keyName = "transparentTradeChatMessage", name = "Trade chat (transparent)", - description = "Color of Trade Chat Messages (transparent)" + description = "Color of Trade Chat Messages (transparent)", + section = transparentSection ) Color transparentTradeChatMessage(); @ConfigItem( - position = 74, + position = 64, keyName = "transparentTradeChatMessageHighlight", name = "Trade chat highlight (transparent)", - description = "Color of highlights in Trade Chat Messages (transparent)" + description = "Color of highlights in Trade Chat Messages (transparent)", + section = transparentSection ) Color transparentTradeChatMessageHighlight(); @ConfigItem( - position = 75, + position = 65, keyName = "transparentServerMessage", name = "Server message (transparent)", - description = "Color of Server Messages (eg. 'Welcome to RuneScape') (transparent)" + description = "Color of Server Messages (eg. 'Welcome to RuneScape') (transparent)", + section = transparentSection ) Color transparentServerMessage(); @ConfigItem( - position = 76, + position = 66, keyName = "transparentServerMessageHighlight", name = "Server message highlight (transparent)", - description = "Color of highlights in Server Messages (transparent)" + description = "Color of highlights in Server Messages (transparent)", + section = transparentSection ) Color transparentServerMessageHighlight(); @ConfigItem( - position = 77, + position = 67, keyName = "transparentGameMessage", name = "Game message (transparent)", - description = "Color of Game Messages (transparent)" + description = "Color of Game Messages (transparent)", + section = transparentSection ) Color transparentGameMessage(); @ConfigItem( - position = 78, + position = 68, keyName = "transparentGameMessageHighlight", name = "Game message highlight (transparent)", - description = "Color of highlights in Game Messages (transparent)" + description = "Color of highlights in Game Messages (transparent)", + section = transparentSection ) default Color transparentGameMessageHighlight() { @@ -436,18 +497,20 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 79, + position = 69, keyName = "transparentExamine", name = "Examine (transparent)", - description = "Color of Examine Text (transparent)" + description = "Color of Examine Text (transparent)", + section = transparentSection ) Color transparentExamine(); @ConfigItem( - position = 80, + position = 70, keyName = "transparentExamineHighlight", name = "Examine highlight (transparent)", - description = "Color of highlights in Examine Text (transparent)" + description = "Color of highlights in Examine Text (transparent)", + section = transparentSection ) default Color transparentExamineHighlight() { @@ -455,58 +518,65 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 81, + position = 71, keyName = "transparentFiltered", name = "Filtered (transparent)", - description = "Color of Filtered Text (messages that aren't shown when Game messages are filtered) (transparent)" + description = "Color of Filtered Text (messages that aren't shown when Game messages are filtered) (transparent)", + section = transparentSection ) Color transparentFiltered(); @ConfigItem( - position = 82, + position = 72, keyName = "transparentFilteredHighlight", name = "Filtered highlight (transparent)", - description = "Color of highlights in Filtered Text (transparent)" + description = "Color of highlights in Filtered Text (transparent)", + section = transparentSection ) Color transparentFilteredHighlight(); @ConfigItem( - position = 83, + position = 73, keyName = "transparentUsername", name = "Usernames (transparent)", - description = "Color of Usernames (transparent)" + description = "Color of Usernames (transparent)", + section = transparentSection ) Color transparentUsername(); @ConfigItem( - position = 84, + position = 74, keyName = "transparentPrivateUsernames", name = "Private chat usernames (transparent)", - description = "Color of Usernames in Private Chat (transparent)" + description = "Color of Usernames in Private Chat (transparent)", + section = transparentSection ) Color transparentPrivateUsernames(); @ConfigItem( - position = 85, + position = 75, keyName = "transparentClanChannelName", name = "Clan channel name (transparent)", - description = "Color of Clan Channel Name (transparent)" + description = "Color of Clan Channel Name (transparent)", + section = transparentSection ) Color transparentClanChannelName(); @ConfigItem( - position = 86, + position = 76, keyName = "transparentClanUsernames", name = "Clan usernames (transparent)", - description = "Color of Usernames in Clan Chat (transparent)" + description = "Color of Usernames in Clan Chat (transparent)", + section = transparentSection ) Color transparentClanUsernames(); @ConfigItem( - position = 87, + position = 77, keyName = "transparentPublicFriendUsernames", name = "Public friend usernames (transparent)", - description = "Color of Friend Usernames in Public Chat (transparent)" + description = "Color of Friend Usernames in Public Chat (transparent)", + section = transparentSection ) Color transparentPublicFriendUsernames(); } 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 43e2a93ae6..81bbfab84f 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 @@ -38,11 +38,33 @@ public interface RuneLiteConfig extends Config { String GROUP_NAME = "runelite"; + @ConfigSection( + name = "Window Settings", + description = "Settings relating to the client's window and frame", + position = 0 + ) + String windowSettings = "windowSettings"; + + @ConfigSection( + name = "Notification Settings", + description = "Settings relating to notifications", + position = 1 + ) + String notificationSettings = "notificationSettings"; + + @ConfigSection( + name = "Overlay Settings", + description = "Settings relating to fonts", + position = 2 + ) + String overlaySettings = "overlaySettings"; + @ConfigItem( keyName = "gameSize", name = "Game size", description = "The game will resize to this resolution upon starting the client", - position = 10 + position = 10, + section = windowSettings ) default Dimension gameSize() { @@ -53,7 +75,8 @@ public interface RuneLiteConfig extends Config keyName = "automaticResizeType", name = "Resize type", description = "Choose how the window should resize when opening and closing panels", - position = 11 + position = 11, + section = windowSettings ) default ExpandResizeType automaticResizeType() { @@ -64,7 +87,8 @@ public interface RuneLiteConfig extends Config keyName = "lockWindowSize", name = "Lock window size", description = "Determines if the window resizing is allowed or not", - position = 12 + position = 12, + section = windowSettings ) default boolean lockWindowSize() { @@ -75,7 +99,8 @@ public interface RuneLiteConfig extends Config keyName = "containInScreen2", name = "Contain in screen", description = "Makes the client stay contained in the screen when attempted to move out of it.
Note: 'Always' only works if custom chrome is enabled.", - position = 13 + position = 13, + section = windowSettings ) default ContainableFrame.Mode containInScreen() { @@ -86,7 +111,8 @@ public interface RuneLiteConfig extends Config keyName = "rememberScreenBounds", name = "Remember client position", description = "Save the position and size of the client after exiting", - position = 14 + position = 14, + section = windowSettings ) default boolean rememberScreenBounds() { @@ -98,7 +124,8 @@ public interface RuneLiteConfig extends Config name = "Enable custom window chrome", description = "Use Runelite's custom window title and borders.", warning = "Please restart your client after changing this setting", - position = 15 + position = 15, + section = windowSettings ) default boolean enableCustomChrome() { @@ -113,7 +140,8 @@ public interface RuneLiteConfig extends Config keyName = "uiWindowOpacity", name = "Window opacity", description = "Set the windows opacity. Requires \"Enable custom window chrome\" to be enabled.", - position = 16 + position = 16, + section = windowSettings ) default int windowOpacity() { @@ -124,7 +152,8 @@ public interface RuneLiteConfig extends Config keyName = "gameAlwaysOnTop", name = "Enable client always on top", description = "The game will always be on the top of the screen", - position = 17 + position = 17, + section = windowSettings ) default boolean gameAlwaysOnTop() { @@ -135,7 +164,8 @@ public interface RuneLiteConfig extends Config keyName = "warningOnExit", name = "Display warning on exit", description = "Toggles a warning popup when trying to exit the client", - position = 18 + position = 18, + section = windowSettings ) default WarningOnExit warningOnExit() { @@ -146,7 +176,8 @@ public interface RuneLiteConfig extends Config keyName = "usernameInTitle", name = "Show display name in title", description = "Toggles displaying of local player's display name in client title", - position = 19 + position = 19, + section = windowSettings ) default boolean usernameInTitle() { @@ -157,7 +188,8 @@ public interface RuneLiteConfig extends Config keyName = "notificationTray", name = "Enable tray notifications", description = "Enables tray notifications", - position = 20 + position = 20, + section = notificationSettings ) default boolean enableTrayNotifications() { @@ -168,7 +200,8 @@ public interface RuneLiteConfig extends Config keyName = "notificationRequestFocus", name = "Request focus on notification", description = "Configures the window focus request type on notification", - position = 21 + position = 21, + section = notificationSettings ) default RequestFocusType notificationRequestFocus() { @@ -179,7 +212,8 @@ 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 = 22, + section = notificationSettings ) default Notifier.NativeCustomOff notificationSound() { @@ -190,7 +224,8 @@ public interface RuneLiteConfig extends Config keyName = "notificationGameMessage", name = "Enable game message notifications", description = "Puts a notification message in the chatbox", - position = 23 + position = 23, + section = notificationSettings ) default boolean enableGameMessageNotification() { @@ -201,7 +236,8 @@ public interface RuneLiteConfig extends Config keyName = "flashNotification", name = "Flash notification", description = "Flashes the game frame as a notification", - position = 24 + position = 24, + section = notificationSettings ) default FlashNotification flashNotification() { @@ -212,7 +248,8 @@ public interface RuneLiteConfig extends Config keyName = "notificationFocused", name = "Send notifications when focused", description = "Toggles all notifications for when the client is focused", - position = 25 + position = 25, + section = notificationSettings ) default boolean sendNotificationsWhenFocused() { @@ -223,7 +260,8 @@ public interface RuneLiteConfig extends Config keyName = "fontType", name = "Dynamic Overlay Font", description = "Configures what font type is used for in-game overlays such as player name, ground items, etc.", - position = 30 + position = 30, + section = overlaySettings ) default FontType fontType() { @@ -234,7 +272,8 @@ public interface RuneLiteConfig extends Config keyName = "tooltipFontType", name = "Tooltip Font", description = "Configures what font type is used for in-game tooltips such as food stats, NPC names, etc.", - position = 31 + position = 31, + section = overlaySettings ) default FontType tooltipFontType() { @@ -245,7 +284,8 @@ public interface RuneLiteConfig extends Config keyName = "interfaceFontType", name = "Interface Overlay Font", description = "Configures what font type is used for in-game interface overlays such as panels, opponent info, clue scrolls etc.", - position = 32 + position = 32, + section = overlaySettings ) default FontType interfaceFontType() { @@ -256,7 +296,8 @@ public interface RuneLiteConfig extends Config keyName = "menuEntryShift", name = "Require Shift for overlay menu", description = "Overlay right-click menu will require shift to be added", - position = 33 + position = 33, + section = overlaySettings ) default boolean menuEntryShift() { @@ -267,7 +308,8 @@ public interface RuneLiteConfig extends Config keyName = "tooltipPosition", name = "Tooltip Position", description = "Configures whether to show the tooltip above or under the cursor", - position = 35 + position = 35, + section = overlaySettings ) default TooltipPositionType tooltipPosition() { @@ -278,7 +320,8 @@ public interface RuneLiteConfig extends Config keyName = "infoBoxVertical", name = "Display infoboxes vertically", description = "Toggles the infoboxes to display vertically", - position = 40 + position = 40, + section = overlaySettings ) default boolean infoBoxVertical() { @@ -289,7 +332,8 @@ public interface RuneLiteConfig extends Config keyName = "infoBoxSize", name = "Infobox size", description = "Configures the size of each infobox in pixels", - position = 42 + position = 42, + section = overlaySettings ) @Units(Units.PIXELS) default int infoBoxSize() @@ -301,7 +345,8 @@ public interface RuneLiteConfig extends Config keyName = "overlayBackgroundColor", name = "Overlay Color", description = "Configures the background color of infoboxes and overlays", - position = 43 + position = 43, + section = overlaySettings ) @Alpha default Color overlayBackgroundColor() @@ -324,7 +369,8 @@ public interface RuneLiteConfig extends Config keyName = "sidebarToggleKey", name = "Sidebar Toggle Key", description = "The key that will toggle the sidebar (accepts modifiers)", - position = 45 + position = 45, + section = windowSettings ) default Keybind sidebarToggleKey() { @@ -335,10 +381,11 @@ public interface RuneLiteConfig extends Config keyName = "panelToggleKey", name = "Plugin Panel Toggle Key", description = "The key that will toggle the current or last opened plugin panel (accepts modifiers)", - position = 46 + position = 46, + section = windowSettings ) default Keybind panelToggleKey() { return new Keybind(KeyEvent.VK_F12, InputEvent.CTRL_DOWN_MASK); } -} \ No newline at end of file +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsConfig.java index c00bbf5e22..9a891a9901 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsConfig.java @@ -30,6 +30,7 @@ import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; import net.runelite.client.config.Units; +import net.runelite.client.config.ConfigSection; import net.runelite.client.plugins.grounditems.config.HighlightTier; import net.runelite.client.plugins.grounditems.config.ItemHighlightMode; import net.runelite.client.plugins.grounditems.config.MenuHighlightMode; @@ -39,11 +40,20 @@ import net.runelite.client.plugins.grounditems.config.ValueCalculationMode; @ConfigGroup("grounditems") public interface GroundItemsConfig extends Config { + @ConfigSection( + name = "Item Lists", + description = "The highlighted and hidden item lists", + position = 0, + closedByDefault = true + ) + String itemLists = "itemLists"; + @ConfigItem( keyName = "highlightedItems", name = "Highlighted Items", description = "Configures specifically highlighted ground items. Format: (item), (item)", - position = 0 + position = 0, + section = itemLists ) default String getHighlightItems() { @@ -61,7 +71,8 @@ public interface GroundItemsConfig extends Config keyName = "hiddenItems", name = "Hidden Items", description = "Configures hidden ground items. Format: (item), (item)", - position = 1 + position = 1, + section = itemLists ) default String getHiddenItems() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/implings/ImplingsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/implings/ImplingsConfig.java index cbbae7e547..ac88a11214 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/implings/ImplingsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/implings/ImplingsConfig.java @@ -28,6 +28,7 @@ import java.awt.Color; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; /** * @@ -43,11 +44,19 @@ public interface ImplingsConfig extends Config NOTIFY } + @ConfigSection( + name = "Impling Type Settings", + description = "Configuration for each type of impling", + position = 99 + ) + String implingSection = "implings"; + @ConfigItem( position = 1, keyName = "showbaby", name = "Show Baby implings", - description = "Configures whether or not Baby impling tags are displayed" + description = "Configures whether or not Baby impling tags are displayed", + section = implingSection ) default ImplingMode showBaby() { @@ -58,7 +67,8 @@ public interface ImplingsConfig extends Config position = 2, keyName = "babyColor", name = "Baby impling color", - description = "Text color for Baby implings" + description = "Text color for Baby implings", + section = implingSection ) default Color getBabyColor() { @@ -69,7 +79,8 @@ public interface ImplingsConfig extends Config position = 3, keyName = "showyoung", name = "Show Young implings", - description = "Configures whether or not Young impling tags are displayed" + description = "Configures whether or not Young impling tags are displayed", + section = implingSection ) default ImplingMode showYoung() { @@ -80,7 +91,8 @@ public interface ImplingsConfig extends Config position = 4, keyName = "youngColor", name = "Young impling color", - description = "Text color for Young implings" + description = "Text color for Young implings", + section = implingSection ) default Color getYoungColor() { @@ -91,7 +103,8 @@ public interface ImplingsConfig extends Config position = 5, keyName = "showgourmet", name = "Show Gourmet implings", - description = "Configures whether or not Gourmet impling tags are displayed" + description = "Configures whether or not Gourmet impling tags are displayed", + section = implingSection ) default ImplingMode showGourmet() { @@ -102,7 +115,8 @@ public interface ImplingsConfig extends Config position = 6, keyName = "gourmetColor", name = "Gourmet impling color", - description = "Text color for Gourmet implings" + description = "Text color for Gourmet implings", + section = implingSection ) default Color getGourmetColor() { @@ -113,7 +127,8 @@ public interface ImplingsConfig extends Config position = 7, keyName = "showearth", name = "Show Earth implings", - description = "Configures whether or not Earth impling tags are displayed" + description = "Configures whether or not Earth impling tags are displayed", + section = implingSection ) default ImplingMode showEarth() { @@ -124,7 +139,8 @@ public interface ImplingsConfig extends Config position = 8, keyName = "earthColor", name = "Earth impling color", - description = "Text color for Earth implings" + description = "Text color for Earth implings", + section = implingSection ) default Color getEarthColor() { @@ -135,7 +151,8 @@ public interface ImplingsConfig extends Config position = 9, keyName = "showessence", name = "Show Essence implings", - description = "Configures whether or not Essence impling tags are displayed" + description = "Configures whether or not Essence impling tags are displayed", + section = implingSection ) default ImplingMode showEssence() { @@ -146,7 +163,8 @@ public interface ImplingsConfig extends Config position = 10, keyName = "essenceColor", name = "Essence impling color", - description = "Text color for Essence implings" + description = "Text color for Essence implings", + section = implingSection ) default Color getEssenceColor() { @@ -157,7 +175,8 @@ public interface ImplingsConfig extends Config position = 11, keyName = "showeclectic", name = "Show Eclectic implings", - description = "Configures whether or not Eclectic impling tags are displayed" + description = "Configures whether or not Eclectic impling tags are displayed", + section = implingSection ) default ImplingMode showEclectic() { @@ -168,7 +187,8 @@ public interface ImplingsConfig extends Config position = 12, keyName = "eclecticColor", name = "Eclectic impling color", - description = "Text color for Eclectic implings" + description = "Text color for Eclectic implings", + section = implingSection ) default Color getEclecticColor() { @@ -179,7 +199,8 @@ public interface ImplingsConfig extends Config position = 13, keyName = "shownature", name = "Show Nature implings", - description = "Configures whether or not Nature impling tags are displayed" + description = "Configures whether or not Nature impling tags are displayed", + section = implingSection ) default ImplingMode showNature() { @@ -190,7 +211,8 @@ public interface ImplingsConfig extends Config position = 14, keyName = "natureColor", name = "Nature impling color", - description = "Text color for Nature implings" + description = "Text color for Nature implings", + section = implingSection ) default Color getNatureColor() { @@ -201,7 +223,8 @@ public interface ImplingsConfig extends Config position = 15, keyName = "showmagpie", name = "Show Magpie implings", - description = "Configures whether or not Magpie impling tags are displayed" + description = "Configures whether or not Magpie impling tags are displayed", + section = implingSection ) default ImplingMode showMagpie() { @@ -212,7 +235,8 @@ public interface ImplingsConfig extends Config position = 16, keyName = "magpieColor", name = "Magpie impling color", - description = "Text color for Magpie implings" + description = "Text color for Magpie implings", + section = implingSection ) default Color getMagpieColor() { @@ -223,7 +247,8 @@ public interface ImplingsConfig extends Config position = 17, keyName = "showninja", name = "Show Ninja implings", - description = "Configures whether or not Ninja impling tags are displayed" + description = "Configures whether or not Ninja impling tags are displayed", + section = implingSection ) default ImplingMode showNinja() { @@ -234,7 +259,8 @@ public interface ImplingsConfig extends Config position = 18, keyName = "ninjaColor", name = "Ninja impling color", - description = "Text color for Ninja implings" + description = "Text color for Ninja implings", + section = implingSection ) default Color getNinjaColor() { @@ -245,7 +271,8 @@ public interface ImplingsConfig extends Config position = 19, keyName = "showCrystal", name = "Show Crystal implings", - description = "Configures whether or not Crystal implings are displayed" + description = "Configures whether or not Crystal implings are displayed", + section = implingSection ) default ImplingMode showCrystal() { @@ -256,7 +283,8 @@ public interface ImplingsConfig extends Config position = 20, keyName = "crystalColor", name = "Crystal impling color", - description = "Text color for Crystal implings" + description = "Text color for Crystal implings", + section = implingSection ) default Color getCrystalColor() { @@ -267,7 +295,8 @@ public interface ImplingsConfig extends Config position = 21, keyName = "showdragon", name = "Show Dragon implings", - description = "Configures whether or not Dragon impling tags are displayed" + description = "Configures whether or not Dragon impling tags are displayed", + section = implingSection ) default ImplingMode showDragon() { @@ -278,7 +307,8 @@ public interface ImplingsConfig extends Config position = 22, keyName = "dragonColor", name = "Dragon impling color", - description = "Text color for Dragon implings" + description = "Text color for Dragon implings", + section = implingSection ) default Color getDragonColor() { @@ -289,7 +319,8 @@ public interface ImplingsConfig extends Config position = 23, keyName = "showlucky", name = "Show Lucky implings", - description = "Configures whether or not Lucky impling tags are displayed" + description = "Configures whether or not Lucky impling tags are displayed", + section = implingSection ) default ImplingMode showLucky() { @@ -300,7 +331,8 @@ public interface ImplingsConfig extends Config position = 24, keyName = "luckyColor", name = "Lucky impling color", - description = "Text color for Lucky implings" + description = "Text color for Lucky implings", + section = implingSection ) default Color getLuckyColor() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java index 554df738c7..81e527ca66 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java @@ -29,10 +29,25 @@ import java.awt.Color; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; @ConfigGroup("itemCharge") public interface ItemChargeConfig extends Config { + @ConfigSection( + name = "Charge Settings", + description = "Configuration for which charges should be displayed", + position = 98 + ) + String chargesSection = "charges"; + + @ConfigSection( + name = "Notification Settings", + description = "Configuration for notifications", + position = 99 + ) + String notificationSection = "notifications"; + @ConfigItem( keyName = "veryLowWarningColor", name = "Very Low Warning Color", @@ -81,7 +96,8 @@ public interface ItemChargeConfig extends Config keyName = "showTeleportCharges", name = "Show Teleport Charges", description = "Configures if teleport item count is shown", - position = 5 + position = 5, + section = chargesSection ) default boolean showTeleportCharges() { @@ -92,7 +108,8 @@ public interface ItemChargeConfig extends Config keyName = "showDodgyCount", name = "Dodgy Necklace Count", description = "Configures if Dodgy Necklace charge count is shown", - position = 6 + position = 6, + section = chargesSection ) default boolean showDodgyCount() { @@ -103,7 +120,8 @@ public interface ItemChargeConfig extends Config keyName = "dodgyNotification", name = "Dodgy Necklace Notification", description = "Configures if the dodgy necklace breaking notification is shown", - position = 7 + position = 7, + section = notificationSection ) default boolean dodgyNotification() { @@ -132,7 +150,8 @@ public interface ItemChargeConfig extends Config keyName = "showImpCharges", name = "Show Imp-in-a-box charges", description = "Configures if imp-in-a-box item charges is shown", - position = 8 + position = 8, + section = chargesSection ) default boolean showImpCharges() { @@ -143,7 +162,8 @@ public interface ItemChargeConfig extends Config keyName = "showFungicideCharges", name = "Show Fungicide Charges", description = "Configures if fungicide item charges is shown", - position = 9 + position = 9, + section = chargesSection ) default boolean showFungicideCharges() { @@ -154,7 +174,8 @@ public interface ItemChargeConfig extends Config keyName = "showWateringCanCharges", name = "Show Watering Can Charges", description = "Configures if watering can item charge is shown", - position = 10 + position = 10, + section = chargesSection ) default boolean showWateringCanCharges() { @@ -165,7 +186,8 @@ public interface ItemChargeConfig extends Config keyName = "showWaterskinCharges", name = "Show Waterskin Charges", description = "Configures if waterskin item charge is shown", - position = 11 + position = 11, + section = chargesSection ) default boolean showWaterskinCharges() { @@ -176,7 +198,8 @@ public interface ItemChargeConfig extends Config keyName = "showBellowCharges", name = "Show Bellow Charges", description = "Configures if ogre bellow item charge is shown", - position = 12 + position = 12, + section = chargesSection ) default boolean showBellowCharges() { @@ -187,7 +210,8 @@ public interface ItemChargeConfig extends Config keyName = "showBasketCharges", name = "Show Basket Charges", description = "Configures if fruit basket item charge is shown", - position = 13 + position = 13, + section = chargesSection ) default boolean showBasketCharges() { @@ -198,7 +222,8 @@ public interface ItemChargeConfig extends Config keyName = "showSackCharges", name = "Show Sack Charges", description = "Configures if sack item charge is shown", - position = 14 + position = 14, + section = chargesSection ) default boolean showSackCharges() { @@ -209,7 +234,8 @@ public interface ItemChargeConfig extends Config keyName = "showAbyssalBraceletCharges", name = "Show Abyssal Bracelet Charges", description = "Configures if abyssal bracelet item charge is shown", - position = 15 + position = 15, + section = chargesSection ) default boolean showAbyssalBraceletCharges() { @@ -220,7 +246,8 @@ public interface ItemChargeConfig extends Config keyName = "showAmuletOfChemistryCharges", name = "Show Amulet of Chemistry Charges", description = "Configures if amulet of chemistry item charge is shown", - position = 16 + position = 16, + section = chargesSection ) default boolean showAmuletOfChemistryCharges() { @@ -249,7 +276,8 @@ public interface ItemChargeConfig extends Config keyName = "showAmuletOfBountyCharges", name = "Show Amulet of Bounty Charges", description = "Configures if amulet of bounty item charge is shown", - position = 17 + position = 17, + section = chargesSection ) default boolean showAmuletOfBountyCharges() { @@ -278,7 +306,8 @@ public interface ItemChargeConfig extends Config keyName = "recoilNotification", name = "Ring of Recoil Notification", description = "Configures if the ring of recoil breaking notification is shown", - position = 18 + position = 18, + section = notificationSection ) default boolean recoilNotification() { @@ -289,7 +318,8 @@ public interface ItemChargeConfig extends Config keyName = "showBindingNecklaceCharges", name = "Show Binding Necklace Charges", description = "Configures if binding necklace item charge is shown", - position = 19 + position = 19, + section = chargesSection ) default boolean showBindingNecklaceCharges() { @@ -318,7 +348,8 @@ public interface ItemChargeConfig extends Config keyName = "bindingNotification", name = "Binding Necklace Notification", description = "Configures if the binding necklace breaking notification is shown", - position = 20 + position = 20, + section = notificationSection ) default boolean bindingNotification() { @@ -329,7 +360,8 @@ public interface ItemChargeConfig extends Config keyName = "showExplorerRingCharges", name = "Show Explorer's Ring Alch Charges", description = "Configures if explorer's ring alchemy charges are shown", - position = 21 + position = 21, + section = chargesSection ) default boolean showExplorerRingCharges() { @@ -358,7 +390,8 @@ public interface ItemChargeConfig extends Config keyName = "showRingOfForgingCount", name = "Show Ring of Forging Charges", description = "Configures if the Ring of Forging charge count is shown", - position = 22 + position = 22, + section = chargesSection ) default boolean showRingOfForgingCount() { @@ -387,7 +420,8 @@ public interface ItemChargeConfig extends Config keyName = "ringOfForgingNotification", name = "Ring of Forging Notification", description = "Configures if the Ring of Forging breaking notification is enabled", - position = 23 + position = 23, + section = notificationSection ) default boolean ringOfForgingNotification() { @@ -409,7 +443,8 @@ public interface ItemChargeConfig extends Config keyName = "showPotionDoseCount", name = "Show Potion Doses", description = "Configures if potion doses are shown", - position = 25 + position = 25, + section = chargesSection ) default boolean showPotionDoseCount() { 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 13cc1e941d..df83c112a8 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 @@ -28,10 +28,18 @@ import java.awt.Color; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; @ConfigGroup("itemidentification") public interface ItemIdentificationConfig extends Config { + @ConfigSection( + name = "Categories", + description = "The categories of items to identify", + position = 99 + ) + String identificationSection = "identification"; + @ConfigItem( keyName = "identificationType", name = "Identification Type", @@ -57,7 +65,8 @@ public interface ItemIdentificationConfig extends Config @ConfigItem( keyName = "showSeeds", name = "Seeds", - description = "Show identification on Seeds" + description = "Show identification on Seeds", + section = identificationSection ) default boolean showSeeds() { @@ -67,7 +76,8 @@ public interface ItemIdentificationConfig extends Config @ConfigItem( keyName = "showHerbs", name = "Herbs", - description = "Show identification on Herbs" + description = "Show identification on Herbs", + section = identificationSection ) default boolean showHerbs() { @@ -77,7 +87,8 @@ public interface ItemIdentificationConfig extends Config @ConfigItem( keyName = "showSaplings", name = "Saplings", - description = "Show identification on Saplings and Seedlings" + description = "Show identification on Saplings and Seedlings", + section = identificationSection ) default boolean showSaplings() { @@ -87,7 +98,8 @@ public interface ItemIdentificationConfig extends Config @ConfigItem( keyName = "showOres", name = "Ores", - description = "Show identification on Ores" + description = "Show identification on Ores", + section = identificationSection ) default boolean showOres() { @@ -97,7 +109,8 @@ public interface ItemIdentificationConfig extends Config @ConfigItem( keyName = "showGems", name = "Gems", - description = "Show identification on Gems" + description = "Show identification on Gems", + section = identificationSection ) default boolean showGems() { @@ -107,7 +120,8 @@ public interface ItemIdentificationConfig extends Config @ConfigItem( keyName = "showPotions", name = "Potions", - description = "Show identification on Potions" + description = "Show identification on Potions", + section = identificationSection ) default boolean showPotions() { @@ -117,7 +131,8 @@ public interface ItemIdentificationConfig extends Config @ConfigItem( keyName = "showImplingJars", name = "Impling jars", - description = "Show identification on Impling jars" + description = "Show identification on Impling jars", + section = identificationSection ) default boolean showImplingJars() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/keyremapping/KeyRemappingConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/keyremapping/KeyRemappingConfig.java index ca549e5967..70bc8bae19 100755 --- a/runelite-client/src/main/java/net/runelite/client/plugins/keyremapping/KeyRemappingConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/keyremapping/KeyRemappingConfig.java @@ -28,16 +28,32 @@ import java.awt.event.KeyEvent; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ModifierlessKeybind; @ConfigGroup("keyremapping") public interface KeyRemappingConfig extends Config { + @ConfigSection( + name = "Camera Remapping", + description = "Settings for remapping the camera", + position = 0 + ) + String cameraSection = "camera"; + + @ConfigSection( + name = "F Key Remapping", + description = "Settings for remapping the F Keys", + position = 1 + ) + String fKeySection = "fKeys"; + @ConfigItem( position = 1, keyName = "cameraRemap", name = "Remap Camera", - description = "Configures whether the camera movement uses remapped keys" + description = "Configures whether the camera movement uses remapped keys", + section = cameraSection ) default boolean cameraRemap() { @@ -48,7 +64,8 @@ public interface KeyRemappingConfig extends Config position = 2, keyName = "up", name = "Camera Up key", - description = "The key which will replace up." + description = "The key which will replace up.", + section = cameraSection ) default ModifierlessKeybind up() { @@ -59,7 +76,8 @@ public interface KeyRemappingConfig extends Config position = 3, keyName = "down", name = "Camera Down key", - description = "The key which will replace down." + description = "The key which will replace down.", + section = cameraSection ) default ModifierlessKeybind down() { @@ -70,7 +88,8 @@ public interface KeyRemappingConfig extends Config position = 4, keyName = "left", name = "Camera Left key", - description = "The key which will replace left." + description = "The key which will replace left.", + section = cameraSection ) default ModifierlessKeybind left() { @@ -81,7 +100,8 @@ public interface KeyRemappingConfig extends Config position = 5, keyName = "right", name = "Camera Right key", - description = "The key which will replace right." + description = "The key which will replace right.", + section = cameraSection ) default ModifierlessKeybind right() { @@ -92,7 +112,8 @@ public interface KeyRemappingConfig extends Config position = 6, keyName = "fkeyRemap", name = "Remap F Keys", - description = "Configures whether F-Keys use remapped keys" + description = "Configures whether F-Keys use remapped keys", + section = fKeySection ) default boolean fkeyRemap() { @@ -103,7 +124,8 @@ public interface KeyRemappingConfig extends Config position = 7, keyName = "f1", name = "F1", - description = "The key which will replace {F1}." + description = "The key which will replace {F1}.", + section = fKeySection ) default ModifierlessKeybind f1() { @@ -114,7 +136,8 @@ public interface KeyRemappingConfig extends Config position = 8, keyName = "f2", name = "F2", - description = "The key which will replace {F2}." + description = "The key which will replace {F2}.", + section = fKeySection ) default ModifierlessKeybind f2() { @@ -125,7 +148,8 @@ public interface KeyRemappingConfig extends Config position = 9, keyName = "f3", name = "F3", - description = "The key which will replace {F3}." + description = "The key which will replace {F3}.", + section = fKeySection ) default ModifierlessKeybind f3() { @@ -136,7 +160,8 @@ public interface KeyRemappingConfig extends Config position = 10, keyName = "f4", name = "F4", - description = "The key which will replace {F4}." + description = "The key which will replace {F4}.", + section = fKeySection ) default ModifierlessKeybind f4() { @@ -147,7 +172,8 @@ public interface KeyRemappingConfig extends Config position = 11, keyName = "f5", name = "F5", - description = "The key which will replace {F5}." + description = "The key which will replace {F5}.", + section = fKeySection ) default ModifierlessKeybind f5() { @@ -158,7 +184,8 @@ public interface KeyRemappingConfig extends Config position = 12, keyName = "f6", name = "F6", - description = "The key which will replace {F6}." + description = "The key which will replace {F6}.", + section = fKeySection ) default ModifierlessKeybind f6() { @@ -169,7 +196,8 @@ public interface KeyRemappingConfig extends Config position = 13, keyName = "f7", name = "F7", - description = "The key which will replace {F7}." + description = "The key which will replace {F7}.", + section = fKeySection ) default ModifierlessKeybind f7() { @@ -180,7 +208,8 @@ public interface KeyRemappingConfig extends Config position = 14, keyName = "f8", name = "F8", - description = "The key which will replace {F8}." + description = "The key which will replace {F8}.", + section = fKeySection ) default ModifierlessKeybind f8() { @@ -191,7 +220,8 @@ public interface KeyRemappingConfig extends Config position = 15, keyName = "f9", name = "F9", - description = "The key which will replace {F9}." + description = "The key which will replace {F9}.", + section = fKeySection ) default ModifierlessKeybind f9() { @@ -202,7 +232,8 @@ public interface KeyRemappingConfig extends Config position = 16, keyName = "f10", name = "F10", - description = "The key which will replace {F10}." + description = "The key which will replace {F10}.", + section = fKeySection ) default ModifierlessKeybind f10() { @@ -213,7 +244,8 @@ public interface KeyRemappingConfig extends Config position = 17, keyName = "f11", name = "F11", - description = "The key which will replace {F11}." + description = "The key which will replace {F11}.", + section = fKeySection ) default ModifierlessKeybind f11() { @@ -224,7 +256,8 @@ public interface KeyRemappingConfig extends Config position = 18, keyName = "f12", name = "F12", - description = "The key which will replace {F12}." + description = "The key which will replace {F12}.", + section = fKeySection ) default ModifierlessKeybind f12() { @@ -235,7 +268,8 @@ public interface KeyRemappingConfig extends Config position = 19, keyName = "esc", name = "ESC", - description = "The key which will replace {ESC}." + description = "The key which will replace {ESC}.", + section = fKeySection ) default ModifierlessKeybind esc() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerConfig.java index 1d9f8b847d..a33534d975 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerConfig.java @@ -28,14 +28,24 @@ package net.runelite.client.plugins.loottracker; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; @ConfigGroup("loottracker") public interface LootTrackerConfig extends Config { + @ConfigSection( + name = "Ignored Entries", + description = "The Ignore items and Ignore groups options", + position = -2, + closedByDefault = true + ) + String ignored = "ignored"; + @ConfigItem( keyName = "ignoredItems", name = "Ignored items", - description = "Configures which items should be ignored when calculating loot prices." + description = "Configures which items should be ignored when calculating loot prices.", + section = ignored ) default String getIgnoredItems() { @@ -94,7 +104,8 @@ public interface LootTrackerConfig extends Config @ConfigItem( keyName = "ignoredEvents", name = "Ignored Loot Sources", - description = "Hide specific NPCs or sources of loot in the loot tracker (e.g., Goblin, Barrows Chest, H.A.M. Member)." + description = "Hide specific NPCs or sources of loot in the loot tracker (e.g., Goblin, Barrows Chest, H.A.M. Member).", + section = ignored ) default String getIgnoredEvents() { @@ -127,4 +138,4 @@ public interface LootTrackerConfig extends Config { return false; } -} \ No newline at end of file +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java index 88e5ff0bfe..1df4da2262 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java @@ -27,15 +27,49 @@ package net.runelite.client.plugins.menuentryswapper; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; @ConfigGroup("menuentryswapper") public interface MenuEntrySwapperConfig extends Config { + @ConfigSection( + name = "Item Swaps", + description = "All options that swap item menu entries", + position = 0, + closedByDefault = true + ) + String itemSection = "items"; + + @ConfigSection( + name = "NPC Swaps", + description = "All options that swap NPC menu entries", + position = 1, + closedByDefault = true + ) + String npcSection = "npcs"; + + @ConfigSection( + name = "Object Swaps", + description = "All options that swap object menu entries", + position = 2, + closedByDefault = true + ) + String objectSection = "objects"; + + @ConfigSection( + name = "UI Swaps", + description = "All options that swap entries in the UI (except Items)", + position = 3, + closedByDefault = true + ) + String uiSection = "ui"; + @ConfigItem( position = -2, keyName = "shiftClickCustomization", name = "Customizable shift-click", - description = "Allows customization of shift-clicks on items" + description = "Allows customization of shift-clicks on items", + section = itemSection ) default boolean shiftClickCustomization() { @@ -45,7 +79,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapAdmire", name = "Admire", - description = "Swap Admire with Teleport, Spellbook and Perks (max cape) for mounted skill capes." + description = "Swap Admire with Teleport, Spellbook and Perks (max cape) for mounted skill capes.", + section = objectSection ) default boolean swapAdmire() { @@ -55,7 +90,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapAssignment", name = "Assignment", - description = "Swap Talk-to with Assignment for Slayer Masters. This will take priority over swapping Trade." + description = "Swap Talk-to with Assignment for Slayer Masters. This will take priority over swapping Trade.", + section = npcSection ) default boolean swapAssignment() { @@ -65,7 +101,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapBanker", name = "Bank", - description = "Swap Talk-to with Bank on Bank NPC
Example: Banker" + description = "Swap Talk-to with Bank on Bank NPC
Example: Banker", + section = npcSection ) default boolean swapBank() { @@ -75,7 +112,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapBirdhouseEmpty", name = "Birdhouse", - description = "Swap Interact with Empty for birdhouses on Fossil Island" + description = "Swap Interact with Empty for birdhouses on Fossil Island", + section = objectSection ) default boolean swapBirdhouseEmpty() { @@ -85,7 +123,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapBones", name = "Bury", - description = "Swap Bury with Use on Bones" + description = "Swap Bury with Use on Bones", + section = itemSection ) default boolean swapBones() { @@ -95,7 +134,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapContract", name = "Contract", - description = "Swap Talk-to with Contract on Guildmaster Jane" + description = "Swap Talk-to with Contract on Guildmaster Jane", + section = npcSection ) default boolean swapContract() { @@ -105,7 +145,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapChase", name = "Chase", - description = "Allows to left click your cat to chase" + description = "Allows to left click your cat to chase", + section = npcSection ) default boolean swapChase() { @@ -115,7 +156,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "claimSlime", name = "Claim Slime", - description = "Swap Talk-to with Claim Slime from Morytania diaries" + description = "Swap Talk-to with Claim Slime from Morytania diaries", + section = npcSection ) default boolean claimSlime() { @@ -125,7 +167,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapDarkMage", name = "Repairs", - description = "Swap Talk-to with Repairs for Dark Mage" + description = "Swap Talk-to with Repairs for Dark Mage", + section = npcSection ) default boolean swapDarkMage() { @@ -135,7 +178,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapCaptainKhaled", name = "Task", - description = "Swap Talk-to with Task for Captain Khaled in Port Piscarilius" + description = "Swap Talk-to with Task for Captain Khaled in Port Piscarilius", + section = npcSection ) default boolean swapCaptainKhaled() { @@ -145,7 +189,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapDecant", name = "Decant", - description = "Swap Talk-to with Decant for Bob Barter and Murky Matt at the Grand Exchange." + description = "Swap Talk-to with Decant for Bob Barter and Murky Matt at the Grand Exchange.", + section = npcSection ) default boolean swapDecant() { @@ -155,7 +200,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapExchange", name = "Exchange", - description = "Swap Talk-to with Exchange on NPC
Example: Grand Exchange Clerk, Tool Leprechaun, Void Knight" + description = "Swap Talk-to with Exchange on NPC
Example: Grand Exchange Clerk, Tool Leprechaun, Void Knight", + section = npcSection ) default boolean swapExchange() { @@ -165,7 +211,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapFairyRing", name = "Fairy ring", - description = "Swap Zanaris with Last-destination or Configure on Fairy rings" + description = "Swap Zanaris with Last-destination or Configure on Fairy rings", + section = objectSection ) default FairyRingMode swapFairyRing() { @@ -185,7 +232,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapHarpoon", name = "Harpoon", - description = "Swap Cage, Big Net with Harpoon on Fishing spot" + description = "Swap Cage, Big Net with Harpoon on Fishing spot", + section = objectSection ) default boolean swapHarpoon() { @@ -195,7 +243,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapHelp", name = "Help", - description = "Swap Talk-to with Help on Arceuus library customers" + description = "Swap Talk-to with Help on Arceuus library customers", + section = npcSection ) default boolean swapHelp() { @@ -205,7 +254,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapHomePortal", name = "Home", - description = "Swap Enter with Home or Build or Friend's house on Portal" + description = "Swap Enter with Home or Build or Friend's house on Portal", + section = objectSection ) default HouseMode swapHomePortal() { @@ -215,7 +265,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapHouseAdvertisement", name = "House Advertisement", - description = "Swap View with Add-House or Visit-Last on House Advertisement board" + description = "Swap View with Add-House or Visit-Last on House Advertisement board", + section = objectSection ) default HouseAdvertisementMode swapHouseAdvertisement() { @@ -225,7 +276,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapPay", name = "Pay", - description = "Swap Talk-to with Pay on NPC
Example: Elstan, Heskel, Fayeth" + description = "Swap Talk-to with Pay on NPC
Example: Elstan, Heskel, Fayeth", + section = npcSection ) default boolean swapPay() { @@ -235,7 +287,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapJewelleryBox", name = "Jewellery Box", - description = "Swap Teleport Menu with previous destination on Jewellery Box" + description = "Swap Teleport Menu with previous destination on Jewellery Box", + section = objectSection ) default boolean swapJewelleryBox() { @@ -245,7 +298,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapPrivate", name = "Private", - description = "Swap Shared with Private on the Chambers of Xeric storage units." + description = "Swap Shared with Private on the Chambers of Xeric storage units.", + section = objectSection ) default boolean swapPrivate() { @@ -255,7 +309,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapPick", name = "Pick", - description = "Swap Pick with Pick-lots of the Gourd tree in the Chambers of Xeric" + description = "Swap Pick with Pick-lots of the Gourd tree in the Chambers of Xeric", + section = objectSection ) default boolean swapPick() { @@ -265,7 +320,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapQuick", name = "Quick Pass/Open/Start/Travel", - description = "Swap Pass with Quick-Pass, Open with Quick-Open, Ring with Quick-Start and Talk-to with Quick-Travel" + description = "Swap Pass with Quick-Pass, Open with Quick-Open, Ring with Quick-Start and Talk-to with Quick-Travel", + section = objectSection ) default boolean swapQuick() { @@ -275,7 +331,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapBoxTrap", name = "Reset", - description = "Swap Check with Reset on box trap" + description = "Swap Check with Reset on box trap", + section = objectSection ) default boolean swapBoxTrap() { @@ -285,7 +342,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapTeleportItem", name = "Teleport item", - description = "Swap Wear, Wield with Rub, Teleport on teleport item
Example: Amulet of glory, Explorer's ring, Chronicle" + description = "Swap Wear, Wield with Rub, Teleport on teleport item
Example: Amulet of glory, Explorer's ring, Chronicle", + section = itemSection ) default boolean swapTeleportItem() { @@ -295,7 +353,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapAbyssTeleport", name = "Teleport to Abyss", - description = "Swap Talk-to with Teleport for the Mage of Zamorak" + description = "Swap Talk-to with Teleport for the Mage of Zamorak", + section = npcSection ) default boolean swapAbyssTeleport() { @@ -305,7 +364,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapTrade", name = "Trade", - description = "Swap Talk-to with Trade on NPC
Example: Shop keeper, Shop assistant" + description = "Swap Talk-to with Trade on NPC
Example: Shop keeper, Shop assistant", + section = npcSection ) default boolean swapTrade() { @@ -315,7 +375,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapTravel", name = "Travel", - description = "Swap Talk-to with Travel, Take-boat, Pay-fare, Charter on NPC
Example: Squire, Monk of Entrana, Customs officer, Trader Crewmember" + description = "Swap Talk-to with Travel, Take-boat, Pay-fare, Charter on NPC
Example: Squire, Monk of Entrana, Customs officer, Trader Crewmember", + section = npcSection ) default boolean swapTravel() { @@ -325,7 +386,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapEnchant", name = "Enchant", - description = "Swap Talk-to with Enchant for Eluned" + description = "Swap Talk-to with Enchant for Eluned", + section = npcSection ) default boolean swapEnchant() { @@ -335,7 +397,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapTeleportSpell", name = "Shift-click teleport spells", - description = "Swap teleport spells that have a second destination on shift" + description = "Swap teleport spells that have a second destination on shift", + section = uiSection ) default boolean swapTeleportSpell() { @@ -345,7 +408,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapStartMinigame", name = "Pyramid Plunder Start-minigame", - description = "Swap Talk-to with Start-minigame at the Guardian Mummy" + description = "Swap Talk-to with Start-minigame at the Guardian Mummy", + section = npcSection ) default boolean swapStartMinigame() { @@ -355,7 +419,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapQuickleave", name = "Quick-Leave", - description = "Swap Leave Tomb with Quick-Leave at Pyramid Plunder" + description = "Swap Leave Tomb with Quick-Leave at Pyramid Plunder", + section = objectSection ) default boolean swapQuickLeave() { @@ -365,7 +430,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapGEItemCollect", name = "GE Item Collect", - description = "Swap Collect-notes, Collect-items, or Bank options from GE offer" + description = "Swap Collect-notes, Collect-items, or Bank options from GE offer", + section = uiSection ) default GEItemCollectMode swapGEItemCollect() { @@ -376,6 +442,8 @@ public interface MenuEntrySwapperConfig extends Config keyName = "swapGEAbort", name = "GE Abort", description = "Swap abort offer on Grand Exchange offers when shift-clicking" + , + section = uiSection ) default boolean swapGEAbort() { @@ -385,7 +453,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapNpcContact", name = "NPC Contact", - description = "Swap NPC Contact with last contacted NPC when shift-clicking" + description = "Swap NPC Contact with last contacted NPC when shift-clicking", + section = uiSection ) default boolean swapNpcContact() { @@ -395,7 +464,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "bankWithdrawShiftClick", name = "Bank Withdraw Shift-Click", - description = "Swaps the behavior of shift-click when withdrawing from bank." + description = "Swaps the behavior of shift-click when withdrawing from bank.", + section = itemSection ) default ShiftWithdrawMode bankWithdrawShiftClick() { @@ -405,7 +475,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "bankDepositShiftClick", name = "Bank Deposit Shift-Click", - description = "Swaps the behavior of shift-click when depositing to bank." + description = "Swaps the behavior of shift-click when depositing to bank.", + section = itemSection ) default ShiftDepositMode bankDepositShiftClick() { @@ -415,7 +486,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "shopBuy", name = "Shop Buy Shift-Click", - description = "Swaps the Buy options with Value on items in shops when shift is held." + description = "Swaps the Buy options with Value on items in shops when shift is held.", + section = uiSection ) default BuyMode shopBuy() { @@ -425,7 +497,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "shopSell", name = "Shop Sell Shift-Click", - description = "Swaps the Sell options with Value on items in your inventory when selling to shops when shift is held." + description = "Swaps the Sell options with Value on items in your inventory when selling to shops when shift is held.", + section = uiSection ) default SellMode shopSell() { @@ -435,7 +508,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapEssenceMineTeleport", name = "Essence Mine Teleport", - description = "Swaps Talk-To with Teleport for NPCs which teleport you to the essence mine" + description = "Swaps Talk-To with Teleport for NPCs which teleport you to the essence mine", + section = npcSection ) default boolean swapEssenceMineTeleport() { @@ -445,7 +519,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapNets", name = "Nets", - description = "Swap Talk-to with Nets on Annette" + description = "Swap Talk-to with Nets on Annette", + section = npcSection ) default boolean swapNets() { @@ -455,7 +530,8 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapGauntlet", name = "Corrupted Gauntlet", - description = "Swap Enter with Enter-corrupted when entering The Gauntlet" + description = "Swap Enter with Enter-corrupted when entering The Gauntlet", + section = objectSection ) default boolean swapGauntlet() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java index 6b032bc8ee..6dd5964c63 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java @@ -28,15 +28,24 @@ import java.awt.Color; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; @ConfigGroup("playerindicators") public interface PlayerIndicatorsConfig extends Config { + @ConfigSection( + name = "Highlight Options", + description = "Toggle highlighted players by type (self, friends, etc.) and choose their highlight colors", + position = 99 + ) + String highlightSection = "section"; + @ConfigItem( position = 0, keyName = "drawOwnName", name = "Highlight own player", - description = "Configures whether or not your own player should be highlighted" + description = "Configures whether or not your own player should be highlighted", + section = highlightSection ) default boolean highlightOwnPlayer() { @@ -47,7 +56,8 @@ public interface PlayerIndicatorsConfig extends Config position = 1, keyName = "ownNameColor", name = "Own player color", - description = "Color of your own player" + description = "Color of your own player", + section = highlightSection ) default Color getOwnPlayerColor() { @@ -58,7 +68,8 @@ public interface PlayerIndicatorsConfig extends Config position = 2, keyName = "drawFriendNames", name = "Highlight friends", - description = "Configures whether or not friends should be highlighted" + description = "Configures whether or not friends should be highlighted", + section = highlightSection ) default boolean highlightFriends() { @@ -69,7 +80,8 @@ public interface PlayerIndicatorsConfig extends Config position = 3, keyName = "friendNameColor", name = "Friend color", - description = "Color of friend names" + description = "Color of friend names", + section = highlightSection ) default Color getFriendColor() { @@ -80,7 +92,8 @@ public interface PlayerIndicatorsConfig extends Config position = 4, keyName = "drawClanMemberNames", name = "Highlight clan members", - description = "Configures whether or clan members should be highlighted" + description = "Configures whether or clan members should be highlighted", + section = highlightSection ) default boolean drawClanMemberNames() { @@ -91,7 +104,8 @@ public interface PlayerIndicatorsConfig extends Config position = 5, keyName = "clanMemberColor", name = "Clan member color", - description = "Color of clan members" + description = "Color of clan members", + section = highlightSection ) default Color getClanMemberColor() { @@ -102,7 +116,8 @@ public interface PlayerIndicatorsConfig extends Config position = 6, keyName = "drawTeamMemberNames", name = "Highlight team members", - description = "Configures whether or not team members should be highlighted" + description = "Configures whether or not team members should be highlighted", + section = highlightSection ) default boolean highlightTeamMembers() { @@ -113,7 +128,8 @@ public interface PlayerIndicatorsConfig extends Config position = 7, keyName = "teamMemberColor", name = "Team member color", - description = "Color of team members" + description = "Color of team members", + section = highlightSection ) default Color getTeamMemberColor() { @@ -124,7 +140,8 @@ public interface PlayerIndicatorsConfig extends Config position = 8, keyName = "drawNonClanMemberNames", name = "Highlight non-clan members", - description = "Configures whether or not non-clan members should be highlighted" + description = "Configures whether or not non-clan members should be highlighted", + section = highlightSection ) default boolean highlightNonClanMembers() { @@ -135,7 +152,8 @@ public interface PlayerIndicatorsConfig extends Config position = 9, keyName = "nonClanMemberColor", name = "Non-clan member color", - description = "Color of non-clan member names" + description = "Color of non-clan member names", + section = highlightSection ) default Color getNonClanMemberColor() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/randomevents/RandomEventConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/randomevents/RandomEventConfig.java index 5d5abf8dca..5d7fff13e8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/randomevents/RandomEventConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/randomevents/RandomEventConfig.java @@ -28,10 +28,18 @@ package net.runelite.client.plugins.randomevents; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; @ConfigGroup("randomevents") public interface RandomEventConfig extends Config { + @ConfigSection( + name = "Notification Settings", + description = "Choose which random events will trigger notifications when spawned", + position = 99 + ) + String notificationSection = "section"; + @ConfigItem( keyName = "removeMenuOptions", name = "Remove others' menu options", @@ -47,7 +55,8 @@ public interface RandomEventConfig extends Config keyName = "notifyDunce", name = "Notify on Surprise Exam", description = "", - position = 1 + position = 1, + section = notificationSection ) default boolean notifyDunce() { @@ -58,7 +67,8 @@ public interface RandomEventConfig extends Config keyName = "notifyGenie", name = "Notify on Genie", description = "", - position = 2 + position = 2, + section = notificationSection ) default boolean notifyGenie() { @@ -69,7 +79,8 @@ public interface RandomEventConfig extends Config keyName = "notifyDemon", name = "Notify on Drill Demon", description = "", - position = 3 + position = 3, + section = notificationSection ) default boolean notifyDemon() { @@ -80,7 +91,8 @@ public interface RandomEventConfig extends Config keyName = "notifyForester", name = "Notify on Freaky Forester", description = "", - position = 4 + position = 4, + section = notificationSection ) default boolean notifyForester() { @@ -91,7 +103,8 @@ public interface RandomEventConfig extends Config keyName = "notifyFrog", name = "Notify on Kiss the Frog", description = "", - position = 5 + position = 5, + section = notificationSection ) default boolean notifyFrog() { @@ -102,7 +115,8 @@ public interface RandomEventConfig extends Config keyName = "notifyGravedigger", name = "Notify on Gravedigger", description = "", - position = 6 + position = 6, + section = notificationSection ) default boolean notifyGravedigger() { @@ -113,7 +127,8 @@ public interface RandomEventConfig extends Config keyName = "notifyMoM", name = "Notify on Mysterious Old Man", description = "", - position = 7 + position = 7, + section = notificationSection ) default boolean notifyMoM() { @@ -124,7 +139,8 @@ public interface RandomEventConfig extends Config keyName = "notifyBob", name = "Notify on Evil Bob", description = "", - position = 8 + position = 8, + section = notificationSection ) default boolean notifyBob() { @@ -135,7 +151,8 @@ public interface RandomEventConfig extends Config keyName = "notifyQuiz", name = "Notify on Quiz Master", description = "", - position = 9 + position = 9, + section = notificationSection ) default boolean notifyQuiz() { @@ -146,7 +163,8 @@ public interface RandomEventConfig extends Config keyName = "notifyAll", name = "Notify for all events", description = "", - position = 10 + position = 10, + section = notificationSection ) default boolean notifyAllEvents() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/runecraft/RunecraftConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/runecraft/RunecraftConfig.java index f84af6b243..7bb8c23a40 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/runecraft/RunecraftConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/runecraft/RunecraftConfig.java @@ -28,26 +28,48 @@ package net.runelite.client.plugins.runecraft; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; @ConfigGroup("runecraft") public interface RunecraftConfig extends Config { + @ConfigSection( + name = "Rift Settings", + description = "Abyss rift overlay settings", + position = 99 + ) + String riftSection = "rifts"; + @ConfigItem( keyName = "showRifts", name = "Show Rifts in Abyss", description = "Configures whether the rifts in the abyss will be displayed", - position = 3 + position = 2, + section = riftSection ) default boolean showRifts() { return true; } + @ConfigItem( + keyName = "showClickBox", + name = "Show Rift click box", + description = "Configures whether to display the click box of the rift", + position = 3, + section = riftSection + ) + default boolean showClickBox() + { + return true; + } + @ConfigItem( keyName = "showAir", name = "Show Air rift", description = "Configures whether to display the air rift", - position = 4 + position = 4, + section = riftSection ) default boolean showAir() { @@ -69,7 +91,8 @@ public interface RunecraftConfig extends Config keyName = "showBody", name = "Show Body rift", description = "Configures whether to display the Body rift", - position = 6 + position = 6, + section = riftSection ) default boolean showBody() { @@ -80,7 +103,8 @@ public interface RunecraftConfig extends Config keyName = "showChaos", name = "Show Chaos rift", description = "Configures whether to display the Chaos rift", - position = 7 + position = 7, + section = riftSection ) default boolean showChaos() { @@ -91,7 +115,8 @@ public interface RunecraftConfig extends Config keyName = "showCosmic", name = "Show Cosmic rift", description = "Configures whether to display the Cosmic rift", - position = 8 + position = 8, + section = riftSection ) default boolean showCosmic() { @@ -102,7 +127,8 @@ public interface RunecraftConfig extends Config keyName = "showDeath", name = "Show Death rift", description = "Configures whether to display the Death rift", - position = 9 + position = 9, + section = riftSection ) default boolean showDeath() { @@ -113,7 +139,8 @@ public interface RunecraftConfig extends Config keyName = "showEarth", name = "Show Earth rift", description = "Configures whether to display the Earth rift", - position = 10 + position = 10, + section = riftSection ) default boolean showEarth() { @@ -124,7 +151,8 @@ public interface RunecraftConfig extends Config keyName = "showFire", name = "Show Fire rift", description = "Configures whether to display the Fire rift", - position = 11 + position = 11, + section = riftSection ) default boolean showFire() { @@ -135,7 +163,8 @@ public interface RunecraftConfig extends Config keyName = "showLaw", name = "Show Law rift", description = "Configures whether to display the Law rift", - position = 12 + position = 12, + section = riftSection ) default boolean showLaw() { @@ -146,7 +175,8 @@ public interface RunecraftConfig extends Config keyName = "showMind", name = "Show Mind rift", description = "Configures whether to display the Mind rift", - position = 13 + position = 13, + section = riftSection ) default boolean showMind() { @@ -157,7 +187,8 @@ public interface RunecraftConfig extends Config keyName = "showNature", name = "Show Nature rift", description = "Configures whether to display the Nature rift", - position = 14 + position = 14, + section = riftSection ) default boolean showNature() { @@ -168,7 +199,8 @@ public interface RunecraftConfig extends Config keyName = "showSoul", name = "Show Soul rift", description = "Configures whether to display the Soul rift", - position = 15 + position = 15, + section = riftSection ) default boolean showSoul() { @@ -179,24 +211,14 @@ public interface RunecraftConfig extends Config keyName = "showWater", name = "Show Water rift", description = "Configures whether to display the Water rift", - position = 16 + position = 16, + section = riftSection ) default boolean showWater() { return true; } - @ConfigItem( - keyName = "showClickBox", - name = "Show Rift click box", - description = "Configures whether to display the click box of the rift", - position = 17 - ) - default boolean showClickBox() - { - return true; - } - @ConfigItem( keyName = "hightlightDarkMage", name = "Highlight Dark Mage NPC", diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java index e0a32b2e0a..62cc1a2ed6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java @@ -27,12 +27,20 @@ package net.runelite.client.plugins.screenshot; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; import net.runelite.client.config.Keybind; import net.runelite.client.util.ImageUploadStyle; @ConfigGroup("screenshot") public interface ScreenshotConfig extends Config { + @ConfigSection( + name = "What to Screenshot", + description = "All the options that select what to screenshot", + position = 99 + ) + String whatSection = "what"; + @ConfigItem( keyName = "includeFrame", name = "Include Client Frame", @@ -70,7 +78,8 @@ public interface ScreenshotConfig extends Config keyName = "rewards", name = "Screenshot Rewards", description = "Configures whether screenshots are taken of clues, barrows, and quest completion", - position = 3 + position = 3, + section = whatSection ) default boolean screenshotRewards() { @@ -81,7 +90,8 @@ public interface ScreenshotConfig extends Config keyName = "levels", name = "Screenshot Levels", description = "Configures whether screenshots are taken of level ups", - position = 4 + position = 4, + section = whatSection ) default boolean screenshotLevels() { @@ -92,7 +102,8 @@ public interface ScreenshotConfig extends Config keyName = "kingdom", name = "Screenshot Kingdom Reward", description = "Configures whether screenshots are taken of Kingdom Reward", - position = 5 + position = 5, + section = whatSection ) default boolean screenshotKingdom() { @@ -103,7 +114,8 @@ public interface ScreenshotConfig extends Config keyName = "pets", name = "Screenshot Pet", description = "Configures whether screenshots are taken of receiving pets", - position = 6 + position = 6, + section = whatSection ) default boolean screenshotPet() { @@ -125,7 +137,8 @@ public interface ScreenshotConfig extends Config keyName = "kills", name = "Screenshot PvP Kills", description = "Configures whether or not screenshots are automatically taken of PvP kills", - position = 8 + position = 8, + section = whatSection ) default boolean screenshotKills() { @@ -136,7 +149,8 @@ public interface ScreenshotConfig extends Config keyName = "boss", name = "Screenshot Boss Kills", description = "Configures whether or not screenshots are automatically taken of boss kills", - position = 9 + position = 9, + section = whatSection ) default boolean screenshotBossKills() { @@ -147,7 +161,8 @@ public interface ScreenshotConfig extends Config keyName = "playerDeath", name = "Screenshot Deaths", description = "Configures whether or not screenshots are automatically taken when you die.", - position = 10 + position = 10, + section = whatSection ) default boolean screenshotPlayerDeath() { @@ -158,7 +173,8 @@ public interface ScreenshotConfig extends Config keyName = "friendDeath", name = "Screenshot Friend Deaths", description = "Configures whether or not screenshots are automatically taken when friends or clan members die.", - position = 11 + position = 11, + section = whatSection ) default boolean screenshotFriendDeath() { @@ -169,7 +185,8 @@ public interface ScreenshotConfig extends Config keyName = "duels", name = "Screenshot Duels", description = "Configures whether or not screenshots are automatically taken of the duel end screen.", - position = 12 + position = 12, + section = whatSection ) default boolean screenshotDuels() { @@ -180,7 +197,8 @@ public interface ScreenshotConfig extends Config keyName = "valuableDrop", name = "Screenshot Valuable drops", description = "Configures whether or not screenshots are automatically taken when you receive a valuable drop.", - position = 13 + position = 13, + section = whatSection ) default boolean screenshotValuableDrop() { @@ -191,7 +209,8 @@ public interface ScreenshotConfig extends Config keyName = "untradeableDrop", name = "Screenshot Untradeable drops", description = "Configures whether or not screenshots are automatically taken when you receive an untradeable drop.", - position = 14 + position = 14, + section = whatSection ) default boolean screenshotUntradeableDrop() { @@ -202,7 +221,8 @@ public interface ScreenshotConfig extends Config keyName = "ccKick", name = "Screenshot Kicks from CC", description = "Take a screenshot when you kick a user from a clan chat.", - position = 15 + position = 15, + section = whatSection ) default boolean screenshotCcKick() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpTrackerConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpTrackerConfig.java index cc41bb5585..c195d46987 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpTrackerConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpTrackerConfig.java @@ -28,11 +28,19 @@ package net.runelite.client.plugins.xptracker; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; import net.runelite.client.config.Units; @ConfigGroup("xpTracker") public interface XpTrackerConfig extends Config { + @ConfigSection( + name = "Overlay", + description = "Canvas overlay options", + position = 99 + ) + String overlaySection = "overlay"; + @ConfigItem( position = 0, keyName = "hideMaxed", @@ -82,7 +90,8 @@ public interface XpTrackerConfig extends Config position = 4, keyName = "skillTabOverlayMenuOptions", name = "Add skill tab canvas menu option", - description = "Configures whether a menu option to show/hide canvas XP trackers will be added to skills on the skill tab" + description = "Configures whether a menu option to show/hide canvas XP trackers will be added to skills on the skill tab", + section = overlaySection ) default boolean skillTabOverlayMenuOptions() { @@ -93,7 +102,8 @@ public interface XpTrackerConfig extends Config position = 5, keyName = "onScreenDisplayMode", name = "On-screen tracker display mode (top)", - description = "Configures the information displayed in the first line of on-screen XP overlays" + description = "Configures the information displayed in the first line of on-screen XP overlays", + section = overlaySection ) default XpPanelLabel onScreenDisplayMode() { @@ -104,7 +114,8 @@ public interface XpTrackerConfig extends Config position = 6, keyName = "onScreenDisplayModeBottom", name = "On-screen tracker display mode (bottom)", - description = "Configures the information displayed in the second line of on-screen XP overlays" + description = "Configures the information displayed in the second line of on-screen XP overlays", + section = overlaySection ) default XpPanelLabel onScreenDisplayModeBottom() { From 5048058422e2491de3a0be43a3f062725f94eda7 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Fri, 5 Jun 2020 23:13:01 +0100 Subject: [PATCH 17/43] menu entry swapper: split hardwood grove into 2 options The option was the only one that could fit into more than one section --- .../menuentryswapper/MenuEntrySwapperConfig.java | 16 ++++++++++++++-- .../menuentryswapper/MenuEntrySwapperPlugin.java | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java index 1df4da2262..2f06379369 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java @@ -221,14 +221,26 @@ public interface MenuEntrySwapperConfig extends Config @ConfigItem( keyName = "swapHardWoodGrove", - name = "Hardwood Grove", - description = "Swap Quick-Pay(100) and Send-Parcel at Hardwood Grove" + name = "Hardwood Grove Quick-Pay", + description = "Swap Quick-Pay(100) at the Hardwood Grove", + section = objectSection ) default boolean swapHardWoodGrove() { return true; } + @ConfigItem( + keyName = "swapHardWoodGroveParcel", + name = "Hardwood Grove Send-Parcel", + description = "Swap Send-Parcel at the Hardwood Grove", + section = npcSection + ) + default boolean swapHardWoodGroveParcel() + { + return true; + } + @ConfigItem( keyName = "swapHarpoon", name = "Harpoon", 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 f148ec9a90..92410be021 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 @@ -442,7 +442,7 @@ public class MenuEntrySwapperPlugin extends Plugin swap("teleport", option, target, index); } - if (config.swapHardWoodGrove() && target.contains("rionasta")) + if (config.swapHardWoodGroveParcel() && target.contains("rionasta")) { swap("send-parcel", option, target, index); } From c40db2f812a86f44103ff2cf003b3d6f125e08cc Mon Sep 17 00:00:00 2001 From: Damen Date: Mon, 8 Jun 2020 16:23:20 -0400 Subject: [PATCH 18/43] loot tracker: fix cox loot being double-counted after region load It is possible to hit region loads in cox after checking the chest once, so additionally check we are no longer in an instance. --- .../runelite/client/plugins/loottracker/LootTrackerPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 dd776e32a3..9fd849ac61 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 @@ -370,7 +370,7 @@ public class LootTrackerPlugin extends Plugin @Subscribe public void onGameStateChanged(final GameStateChanged event) { - if (event.getGameState() == GameState.LOADING) + if (event.getGameState() == GameState.LOADING && !client.isInInstancedRegion()) { chestLooted = false; } From 6c2d823b7089e8173acad95d0a8c6631598af1da Mon Sep 17 00:00:00 2001 From: TheStonedTurtle <29030969+TheStonedTurtle@users.noreply.github.com> Date: Mon, 8 Jun 2020 13:24:27 -0700 Subject: [PATCH 19/43] item stats overlay: limit bank widgets to item container --- .../net/runelite/client/plugins/itemstats/ItemStatOverlay.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatOverlay.java index 57ca7dde8a..ab0a527904 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatOverlay.java @@ -98,7 +98,7 @@ public class ItemStatOverlay extends Overlay || group == WidgetInfo.EQUIPMENT.getGroupId() || group == WidgetInfo.EQUIPMENT_INVENTORY_ITEMS_CONTAINER.getGroupId() || (config.showStatsInBank() - && (group == WidgetInfo.BANK_ITEM_CONTAINER.getGroupId() + && ((group == WidgetInfo.BANK_ITEM_CONTAINER.getGroupId() && child == WidgetInfo.BANK_ITEM_CONTAINER.getChildId()) || group == WidgetInfo.BANK_INVENTORY_ITEMS_CONTAINER.getGroupId())))) { return null; From d7f55bbef6f00ebc55025454761b9bb664465fe2 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 8 Jun 2020 17:22:35 -0400 Subject: [PATCH 20/43] slayer plugin: fix points and streak being forgotten when restarted with no task --- .../client/plugins/slayer/SlayerPlugin.java | 34 +++++++++---------- .../plugins/slayer/SlayerPluginTest.java | 20 +++++------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java index 8ac2601931..89ad7d1473 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java @@ -54,7 +54,6 @@ import net.runelite.api.NPCComposition; import static net.runelite.api.Skill.SLAYER; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.ChatMessage; -import net.runelite.client.events.ConfigChanged; import net.runelite.api.events.GameStateChanged; import net.runelite.api.events.GameTick; import net.runelite.api.events.NpcDespawned; @@ -72,6 +71,7 @@ import net.runelite.client.chat.ChatMessageManager; import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.events.ChatInput; +import net.runelite.client.events.ConfigChanged; import net.runelite.client.game.ItemManager; import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDescriptor; @@ -198,12 +198,6 @@ public class SlayerPlugin extends Plugin @Setter(AccessLevel.PACKAGE) private String taskName; - @Getter(AccessLevel.PACKAGE) - private int streak; - - @Getter(AccessLevel.PACKAGE) - private int points; - private TaskCounter counter; private int cachedXp = -1; private Instant infoTimer; @@ -225,8 +219,6 @@ public class SlayerPlugin extends Plugin if (config.amount() != -1 && !config.taskName().isEmpty()) { - points = config.points(); - streak = config.streak(); setExpeditiousChargeCount(config.expeditious()); setSlaughterChargeCount(config.slaughter()); clientThread.invoke(() -> setTask(config.taskName(), config.amount(), config.initialAmount(), config.taskLocation(), false)); @@ -274,8 +266,6 @@ public class SlayerPlugin extends Plugin && !config.taskName().isEmpty() && loginFlag) { - points = config.points(); - streak = config.streak(); setExpeditiousChargeCount(config.expeditious()); setSlaughterChargeCount(config.slaughter()); setTask(config.taskName(), config.amount(), config.initialAmount(), config.taskLocation(), false); @@ -291,8 +281,6 @@ public class SlayerPlugin extends Plugin config.initialAmount(initialAmount); config.taskName(taskName); config.taskLocation(taskLocation); - config.points(points); - config.streak(streak); config.expeditious(expeditiousChargeCount); config.slaughter(slaughterChargeCount); } @@ -342,7 +330,8 @@ public class SlayerPlugin extends Plugin { int amount = Integer.parseInt(mAssignBoss.group(2)); setTask(mAssignBoss.group(1), amount, amount); - points = Integer.parseInt(mAssignBoss.group(3).replaceAll(",", "")); + int points = Integer.parseInt(mAssignBoss.group(3).replaceAll(",", "")); + config.points(points); } else if (mCurrent.find()) { @@ -377,11 +366,12 @@ public class SlayerPlugin extends Plugin Matcher mPoints = REWARD_POINTS.matcher(w.getText()); if (mPoints.find()) { - final int prevPoints = points; - points = Integer.parseInt(mPoints.group(1).replaceAll(",", "")); + final int prevPoints = config.points(); + int points = Integer.parseInt(mPoints.group(1).replaceAll(",", "")); if (prevPoints != points) { + config.points(points); removeCounter(); addCounter(); } @@ -465,6 +455,7 @@ public class SlayerPlugin extends Plugin matches.add(mComplete.group(0).replaceAll(",", "")); } + int streak = -1, points = -1; switch (matches.size()) { case 0: @@ -480,6 +471,15 @@ public class SlayerPlugin extends Plugin default: log.warn("Unreachable default case for message ending in '; return to Slayer master'"); } + if (streak != -1) + { + config.streak(streak); + } + if (points != -1) + { + config.points(points); + } + setTask("", 0, 0); return; } @@ -734,7 +734,7 @@ public class SlayerPlugin extends Plugin } counter = new TaskCounter(taskImg, this, amount); - counter.setTooltip(String.format(taskTooltip, capsString(taskName), points, streak)); + counter.setTooltip(String.format(taskTooltip, capsString(taskName), config.points(), config.streak())); infoBoxManager.addInfoBox(counter); } diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/slayer/SlayerPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/slayer/SlayerPluginTest.java index 49caa7c65f..f5dc666aca 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/slayer/SlayerPluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/slayer/SlayerPluginTest.java @@ -267,7 +267,7 @@ public class SlayerPluginTest assertEquals("Vet'ion", slayerPlugin.getTaskName()); assertEquals(3, slayerPlugin.getAmount()); - assertEquals(914, slayerPlugin.getPoints()); + verify(slayerConfig).points(914); } @Test @@ -280,7 +280,7 @@ public class SlayerPluginTest assertEquals("Chaos Elemental", slayerPlugin.getTaskName()); assertEquals(3, slayerPlugin.getAmount()); - assertEquals(914, slayerPlugin.getPoints()); + verify(slayerConfig).points(914); } @Test @@ -293,7 +293,7 @@ public class SlayerPluginTest assertEquals("Alchemical Hydra", slayerPlugin.getTaskName()); assertEquals(35, slayerPlugin.getAmount()); - assertEquals(724, slayerPlugin.getPoints()); + verify(slayerConfig).points(724); } @Test @@ -360,7 +360,7 @@ public class SlayerPluginTest when(client.getWidget(WidgetInfo.SLAYER_REWARDS_TOPBAR)).thenReturn(rewardBar); slayerPlugin.onGameTick(new GameTick()); - assertEquals(17566, slayerPlugin.getPoints()); + verify(slayerConfig).points(17566); } @Test @@ -369,7 +369,7 @@ public class SlayerPluginTest ChatMessage chatMessageEvent = new ChatMessage(null, GAMEMESSAGE, "Perterter", TASK_ONE, null, 0); slayerPlugin.onChatMessage(chatMessageEvent); - assertEquals(1, slayerPlugin.getStreak()); + verify(slayerConfig).streak(1); assertEquals("", slayerPlugin.getTaskName()); assertEquals(0, slayerPlugin.getAmount()); } @@ -380,7 +380,7 @@ public class SlayerPluginTest ChatMessage chatMessageEvent = new ChatMessage(null, GAMEMESSAGE, "Perterter", TASK_COMPLETE_NO_POINTS, null, 0); slayerPlugin.onChatMessage(chatMessageEvent); - assertEquals(3, slayerPlugin.getStreak()); + verify(slayerConfig).streak(3); assertEquals("", slayerPlugin.getTaskName()); assertEquals(0, slayerPlugin.getAmount()); } @@ -391,10 +391,10 @@ public class SlayerPluginTest ChatMessage chatMessageEvent = new ChatMessage(null, GAMEMESSAGE, "Perterter", TASK_POINTS, null, 0); slayerPlugin.onChatMessage(chatMessageEvent); - assertEquals(9, slayerPlugin.getStreak()); + verify(slayerConfig).streak(9); assertEquals("", slayerPlugin.getTaskName()); assertEquals(0, slayerPlugin.getAmount()); - assertEquals(18_000, slayerPlugin.getPoints()); + verify(slayerConfig).points(18_000); } @Test @@ -403,10 +403,10 @@ public class SlayerPluginTest ChatMessage chatMessageEvent = new ChatMessage(null, GAMEMESSAGE, "Perterter", TASK_LARGE_STREAK, null, 0); slayerPlugin.onChatMessage(chatMessageEvent); - assertEquals(2465, slayerPlugin.getStreak()); + verify(slayerConfig).streak(2465); assertEquals("", slayerPlugin.getTaskName()); assertEquals(0, slayerPlugin.getAmount()); - assertEquals(17_566_000, slayerPlugin.getPoints()); + verify(slayerConfig).points(17_566_000); } @Test From 54cac0f595ad85b1ccb63ddfbdf636ba9ff90720 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 7 May 2020 14:15:02 -0600 Subject: [PATCH 21/43] runelite-api: add NullNpcID --- .../main/java/net/runelite/api/NullNpcID.java | 1085 +++++++++++++++++ 1 file changed, 1085 insertions(+) create mode 100644 runelite-api/src/main/java/net/runelite/api/NullNpcID.java diff --git a/runelite-api/src/main/java/net/runelite/api/NullNpcID.java b/runelite-api/src/main/java/net/runelite/api/NullNpcID.java new file mode 100644 index 0000000000..49016c1c50 --- /dev/null +++ b/runelite-api/src/main/java/net/runelite/api/NullNpcID.java @@ -0,0 +1,1085 @@ +/* This file is automatically generated. Do not edit. */ +package net.runelite.api; + +public final class NullNpcID +{ + public static final int NULL = 21; + public static final int NULL_24 = 24; + public static final int NULL_25 = 25; + public static final int NULL_119 = 119; + public static final int NULL_222 = 222; + public static final int NULL_224 = 224; + public static final int NULL_226 = 226; + public static final int NULL_228 = 228; + public static final int NULL_230 = 230; + public static final int NULL_317 = 317; + public static final int NULL_324 = 324; + public static final int NULL_384 = 384; + public static final int NULL_424 = 424; + public static final int NULL_471 = 471; + public static final int NULL_490 = 490; + public static final int NULL_536 = 536; + public static final int NULL_638 = 638; + public static final int NULL_716 = 716; + public static final int NULL_740 = 740; + public static final int NULL_743 = 743; + public static final int NULL_744 = 744; + public static final int NULL_745 = 745; + public static final int NULL_746 = 746; + public static final int NULL_747 = 747; + public static final int NULL_748 = 748; + public static final int NULL_749 = 749; + public static final int NULL_761 = 761; + public static final int NULL_816 = 816; + public static final int NULL_818 = 818; + public static final int NULL_843 = 843; + public static final int NULL_889 = 889; + public static final int NULL_890 = 890; + public static final int NULL_913 = 913; + public static final int NULL_914 = 914; + public static final int NULL_915 = 915; + public static final int NULL_916 = 916; + public static final int NULL_919 = 919; + public static final int NULL_1023 = 1023; + public static final int NULL_1033 = 1033; + public static final int NULL_1034 = 1034; + public static final int NULL_1035 = 1035; + public static final int NULL_1036 = 1036; + public static final int NULL_1063 = 1063; + public static final int NULL_1064 = 1064; + public static final int NULL_1114 = 1114; + public static final int NULL_1115 = 1115; + public static final int NULL_1116 = 1116; + public static final int NULL_1117 = 1117; + public static final int NULL_1136 = 1136; + public static final int NULL_1143 = 1143; + public static final int NULL_1148 = 1148; + public static final int NULL_1149 = 1149; + public static final int NULL_1150 = 1150; + public static final int NULL_1151 = 1151; + public static final int NULL_1180 = 1180; + public static final int NULL_1194 = 1194; + public static final int NULL_1196 = 1196; + public static final int NULL_1239 = 1239; + public static final int NULL_1242 = 1242; + public static final int NULL_1245 = 1245; + public static final int NULL_1248 = 1248; + public static final int NULL_1251 = 1251; + public static final int NULL_1254 = 1254; + public static final int NULL_1321 = 1321; + public static final int NULL_1322 = 1322; + public static final int NULL_1328 = 1328; + public static final int NULL_1329 = 1329; + public static final int NULL_1330 = 1330; + public static final int NULL_1331 = 1331; + public static final int NULL_1332 = 1332; + public static final int NULL_1333 = 1333; + public static final int NULL_1334 = 1334; + public static final int NULL_1359 = 1359; + public static final int NULL_1394 = 1394; + public static final int NULL_1423 = 1423; + public static final int NULL_1424 = 1424; + public static final int NULL_1426 = 1426; + public static final int NULL_1427 = 1427; + public static final int NULL_1449 = 1449; + public static final int NULL_1450 = 1450; + public static final int NULL_1451 = 1451; + public static final int NULL_1452 = 1452; + public static final int NULL_1455 = 1455; + public static final int NULL_1456 = 1456; + public static final int NULL_1457 = 1457; + public static final int NULL_1458 = 1458; + public static final int NULL_1459 = 1459; + public static final int NULL_1491 = 1491; + public static final int NULL_1492 = 1492; + public static final int NULL_1493 = 1493; + public static final int NULL_1763 = 1763; + public static final int NULL_1812 = 1812; + public static final int NULL_1819 = 1819; + public static final int NULL_1820 = 1820; + public static final int NULL_1821 = 1821; + public static final int NULL_1822 = 1822; + public static final int NULL_1823 = 1823; + public static final int NULL_1824 = 1824; + public static final int NULL_1836 = 1836; + public static final int NULL_1837 = 1837; + public static final int NULL_1858 = 1858; + public static final int NULL_1859 = 1859; + public static final int NULL_1860 = 1860; + public static final int NULL_1868 = 1868; + public static final int NULL_1946 = 1946; + public static final int NULL_1953 = 1953; + public static final int NULL_1954 = 1954; + public static final int NULL_1955 = 1955; + public static final int NULL_1956 = 1956; + public static final int NULL_1957 = 1957; + public static final int NULL_1958 = 1958; + public static final int NULL_1959 = 1959; + public static final int NULL_1960 = 1960; + public static final int NULL_1961 = 1961; + public static final int NULL_1962 = 1962; + public static final int NULL_1963 = 1963; + public static final int NULL_1964 = 1964; + public static final int NULL_1965 = 1965; + public static final int NULL_1966 = 1966; + public static final int NULL_1967 = 1967; + public static final int NULL_1968 = 1968; + public static final int NULL_1969 = 1969; + public static final int NULL_1970 = 1970; + public static final int NULL_1971 = 1971; + public static final int NULL_1972 = 1972; + public static final int NULL_1973 = 1973; + public static final int NULL_1974 = 1974; + public static final int NULL_1975 = 1975; + public static final int NULL_1976 = 1976; + public static final int NULL_1977 = 1977; + public static final int NULL_1978 = 1978; + public static final int NULL_1979 = 1979; + public static final int NULL_1980 = 1980; + public static final int NULL_1981 = 1981; + public static final int NULL_1982 = 1982; + public static final int NULL_1983 = 1983; + public static final int NULL_1984 = 1984; + public static final int NULL_1985 = 1985; + public static final int NULL_1986 = 1986; + public static final int NULL_1987 = 1987; + public static final int NULL_1988 = 1988; + public static final int NULL_1989 = 1989; + public static final int NULL_1994 = 1994; + public static final int NULL_1995 = 1995; + public static final int NULL_1996 = 1996; + public static final int NULL_2009 = 2009; + public static final int NULL_2010 = 2010; + public static final int NULL_2011 = 2011; + public static final int NULL_2012 = 2012; + public static final int NULL_2013 = 2013; + public static final int NULL_2014 = 2014; + public static final int NULL_2015 = 2015; + public static final int NULL_2016 = 2016; + public static final int NULL_2017 = 2017; + public static final int NULL_2019 = 2019; + public static final int NULL_2020 = 2020; + public static final int NULL_2021 = 2021; + public static final int NULL_2022 = 2022; + public static final int NULL_2023 = 2023; + public static final int NULL_2024 = 2024; + public static final int NULL_2109 = 2109; + public static final int NULL_2124 = 2124; + public static final int NULL_2231 = 2231; + public static final int NULL_2260 = 2260; + public static final int NULL_2432 = 2432; + public static final int NULL_2493 = 2493; + public static final int NULL_2779 = 2779; + public static final int NULL_2780 = 2780; + public static final int NULL_2781 = 2781; + public static final int NULL_2934 = 2934; + public static final int NULL_2935 = 2935; + public static final int NULL_2936 = 2936; + public static final int NULL_2937 = 2937; + public static final int NULL_2938 = 2938; + public static final int NULL_2939 = 2939; + public static final int NULL_2940 = 2940; + public static final int NULL_2941 = 2941; + public static final int NULL_2942 = 2942; + public static final int NULL_2943 = 2943; + public static final int NULL_2944 = 2944; + public static final int NULL_2945 = 2945; + public static final int NULL_2964 = 2964; + public static final int NULL_2965 = 2965; + public static final int NULL_2966 = 2966; + public static final int NULL_2967 = 2967; + public static final int NULL_2968 = 2968; + public static final int NULL_2969 = 2969; + public static final int NULL_2970 = 2970; + public static final int NULL_2971 = 2971; + public static final int NULL_2973 = 2973; + public static final int NULL_2979 = 2979; + public static final int NULL_2990 = 2990; + public static final int NULL_2991 = 2991; + public static final int NULL_3087 = 3087; + public static final int NULL_3104 = 3104; + public static final int NULL_3186 = 3186; + public static final int NULL_3187 = 3187; + public static final int NULL_3188 = 3188; + public static final int NULL_3197 = 3197; + public static final int NULL_3198 = 3198; + public static final int NULL_3206 = 3206; + public static final int NULL_3228 = 3228; + public static final int NULL_3229 = 3229; + public static final int NULL_3230 = 3230; + public static final int NULL_3363 = 3363; + public static final int NULL_3365 = 3365; + public static final int NULL_3366 = 3366; + public static final int NULL_3367 = 3367; + public static final int NULL_3368 = 3368; + public static final int NULL_3399 = 3399; + public static final int NULL_3427 = 3427; + public static final int NULL_3430 = 3430; + public static final int NULL_3431 = 3431; + public static final int NULL_3435 = 3435; + public static final int NULL_3487 = 3487; + public static final int NULL_3488 = 3488; + public static final int NULL_3489 = 3489; + public static final int NULL_3500 = 3500; + public static final int NULL_3567 = 3567; + public static final int NULL_3650 = 3650; + public static final int NULL_3670 = 3670; + public static final int NULL_3773 = 3773; + public static final int NULL_3828 = 3828; + public static final int NULL_3854 = 3854; + public static final int NULL_3857 = 3857; + public static final int NULL_3926 = 3926; + public static final int NULL_3927 = 3927; + public static final int NULL_3983 = 3983; + public static final int NULL_3990 = 3990; + public static final int NULL_3991 = 3991; + public static final int NULL_3992 = 3992; + public static final int NULL_3993 = 3993; + public static final int NULL_4003 = 4003; + public static final int NULL_4006 = 4006; + public static final int NULL_4007 = 4007; + public static final int NULL_4008 = 4008; + public static final int NULL_4009 = 4009; + public static final int NULL_4013 = 4013; + public static final int NULL_4113 = 4113; + public static final int NULL_4211 = 4211; + public static final int NULL_4254 = 4254; + public static final int NULL_4258 = 4258; + public static final int NULL_4259 = 4259; + public static final int NULL_4260 = 4260; + public static final int NULL_4261 = 4261; + public static final int NULL_4262 = 4262; + public static final int NULL_4267 = 4267; + public static final int NULL_4273 = 4273; + public static final int NULL_4297 = 4297; + public static final int NULL_4300 = 4300; + public static final int NULL_4338 = 4338; + public static final int NULL_4339 = 4339; + public static final int NULL_4341 = 4341; + public static final int NULL_4408 = 4408; + public static final int NULL_4410 = 4410; + public static final int NULL_4415 = 4415; + public static final int NULL_4418 = 4418; + public static final int NULL_4479 = 4479; + public static final int NULL_4507 = 4507; + public static final int NULL_4515 = 4515; + public static final int NULL_4528 = 4528; + public static final int NULL_4529 = 4529; + public static final int NULL_4530 = 4530; + public static final int NULL_4531 = 4531; + public static final int NULL_4532 = 4532; + public static final int NULL_4536 = 4536; + public static final int NULL_4537 = 4537; + public static final int NULL_4538 = 4538; + public static final int NULL_4539 = 4539; + public static final int NULL_4540 = 4540; + public static final int NULL_4541 = 4541; + public static final int NULL_4542 = 4542; + public static final int NULL_4544 = 4544; + public static final int NULL_4545 = 4545; + public static final int NULL_4546 = 4546; + public static final int NULL_4547 = 4547; + public static final int NULL_4548 = 4548; + public static final int NULL_4549 = 4549; + public static final int NULL_4550 = 4550; + public static final int NULL_4554 = 4554; + public static final int NULL_4555 = 4555; + public static final int NULL_4556 = 4556; + public static final int NULL_4557 = 4557; + public static final int NULL_4558 = 4558; + public static final int NULL_4559 = 4559; + public static final int NULL_4560 = 4560; + public static final int NULL_4728 = 4728; + public static final int NULL_4729 = 4729; + public static final int NULL_4730 = 4730; + public static final int NULL_4731 = 4731; + public static final int NULL_4732 = 4732; + public static final int NULL_4765 = 4765; + public static final int NULL_4785 = 4785; + public static final int NULL_4786 = 4786; + public static final int NULL_4815 = 4815; + public static final int NULL_4939 = 4939; + public static final int NULL_4940 = 4940; + public static final int NULL_4941 = 4941; + public static final int NULL_4942 = 4942; + public static final int NULL_4943 = 4943; + public static final int NULL_4944 = 4944; + public static final int NULL_4945 = 4945; + public static final int NULL_4946 = 4946; + public static final int NULL_4947 = 4947; + public static final int NULL_4948 = 4948; + public static final int NULL_4949 = 4949; + public static final int NULL_4950 = 4950; + public static final int NULL_4951 = 4951; + public static final int NULL_4952 = 4952; + public static final int NULL_4953 = 4953; + public static final int NULL_4954 = 4954; + public static final int NULL_4955 = 4955; + public static final int NULL_4956 = 4956; + public static final int NULL_4957 = 4957; + public static final int NULL_4971 = 4971; + public static final int NULL_4983 = 4983; + public static final int NULL_4986 = 4986; + public static final int NULL_4988 = 4988; + public static final int NULL_5005 = 5005; + public static final int NULL_5047 = 5047; + public static final int NULL_5049 = 5049; + public static final int NULL_5050 = 5050; + public static final int NULL_5058 = 5058; + public static final int NULL_5059 = 5059; + public static final int NULL_5060 = 5060; + public static final int NULL_5064 = 5064; + public static final int NULL_5065 = 5065; + public static final int NULL_5071 = 5071; + public static final int NULL_5183 = 5183; + public static final int NULL_5227 = 5227; + public static final int NULL_5236 = 5236; + public static final int NULL_5285 = 5285; + public static final int NULL_5286 = 5286; + public static final int NULL_5287 = 5287; + public static final int NULL_5292 = 5292; + public static final int NULL_5298 = 5298; + public static final int NULL_5301 = 5301; + public static final int NULL_5310 = 5310; + public static final int NULL_5311 = 5311; + public static final int NULL_5312 = 5312; + public static final int NULL_5314 = 5314; + public static final int NULL_5324 = 5324; + public static final int NULL_5325 = 5325; + public static final int NULL_5382 = 5382; + public static final int NULL_5411 = 5411; + public static final int NULL_5424 = 5424; + public static final int NULL_5425 = 5425; + public static final int NULL_5446 = 5446; + public static final int NULL_5490 = 5490; + public static final int NULL_5494 = 5494; + public static final int NULL_5495 = 5495; + public static final int NULL_5496 = 5496; + public static final int NULL_5497 = 5497; + public static final int NULL_5498 = 5498; + public static final int NULL_5499 = 5499; + public static final int NULL_5501 = 5501; + public static final int NULL_5516 = 5516; + public static final int NULL_5530 = 5530; + public static final int NULL_5664 = 5664; + public static final int NULL_5733 = 5733; + public static final int NULL_5849 = 5849; + public static final int NULL_5850 = 5850; + public static final int NULL_5851 = 5851; + public static final int NULL_5852 = 5852; + public static final int NULL_5857 = 5857; + public static final int NULL_5858 = 5858; + public static final int NULL_5859 = 5859; + public static final int NULL_5865 = 5865; + public static final int NULL_5885 = 5885; + public static final int NULL_5898 = 5898; + public static final int NULL_5899 = 5899; + public static final int NULL_5900 = 5900; + public static final int NULL_5901 = 5901; + public static final int NULL_5902 = 5902; + public static final int NULL_5903 = 5903; + public static final int NULL_5930 = 5930; + public static final int NULL_5953 = 5953; + public static final int NULL_6093 = 6093; + public static final int NULL_6104 = 6104; + public static final int NULL_6105 = 6105; + public static final int NULL_6106 = 6106; + public static final int NULL_6107 = 6107; + public static final int NULL_6108 = 6108; + public static final int NULL_6109 = 6109; + public static final int NULL_6110 = 6110; + public static final int NULL_6111 = 6111; + public static final int NULL_6112 = 6112; + public static final int NULL_6113 = 6113; + public static final int NULL_6114 = 6114; + public static final int NULL_6115 = 6115; + public static final int NULL_6116 = 6116; + public static final int NULL_6117 = 6117; + public static final int NULL_6122 = 6122; + public static final int NULL_6123 = 6123; + public static final int NULL_6124 = 6124; + public static final int NULL_6125 = 6125; + public static final int NULL_6126 = 6126; + public static final int NULL_6127 = 6127; + public static final int NULL_6128 = 6128; + public static final int NULL_6129 = 6129; + public static final int NULL_6130 = 6130; + public static final int NULL_6131 = 6131; + public static final int NULL_6132 = 6132; + public static final int NULL_6133 = 6133; + public static final int NULL_6134 = 6134; + public static final int NULL_6135 = 6135; + public static final int NULL_6136 = 6136; + public static final int NULL_6137 = 6137; + public static final int NULL_6138 = 6138; + public static final int NULL_6139 = 6139; + public static final int NULL_6140 = 6140; + public static final int NULL_6141 = 6141; + public static final int NULL_6142 = 6142; + public static final int NULL_6143 = 6143; + public static final int NULL_6144 = 6144; + public static final int NULL_6145 = 6145; + public static final int NULL_6146 = 6146; + public static final int NULL_6147 = 6147; + public static final int NULL_6148 = 6148; + public static final int NULL_6149 = 6149; + public static final int NULL_6150 = 6150; + public static final int NULL_6151 = 6151; + public static final int NULL_6152 = 6152; + public static final int NULL_6153 = 6153; + public static final int NULL_6154 = 6154; + public static final int NULL_6155 = 6155; + public static final int NULL_6156 = 6156; + public static final int NULL_6157 = 6157; + public static final int NULL_6158 = 6158; + public static final int NULL_6159 = 6159; + public static final int NULL_6160 = 6160; + public static final int NULL_6161 = 6161; + public static final int NULL_6162 = 6162; + public static final int NULL_6163 = 6163; + public static final int NULL_6164 = 6164; + public static final int NULL_6165 = 6165; + public static final int NULL_6166 = 6166; + public static final int NULL_6167 = 6167; + public static final int NULL_6168 = 6168; + public static final int NULL_6169 = 6169; + public static final int NULL_6170 = 6170; + public static final int NULL_6171 = 6171; + public static final int NULL_6172 = 6172; + public static final int NULL_6173 = 6173; + public static final int NULL_6174 = 6174; + public static final int NULL_6175 = 6175; + public static final int NULL_6176 = 6176; + public static final int NULL_6179 = 6179; + public static final int NULL_6180 = 6180; + public static final int NULL_6181 = 6181; + public static final int NULL_6182 = 6182; + public static final int NULL_6183 = 6183; + public static final int NULL_6184 = 6184; + public static final int NULL_6185 = 6185; + public static final int NULL_6186 = 6186; + public static final int NULL_6187 = 6187; + public static final int NULL_6188 = 6188; + public static final int NULL_6189 = 6189; + public static final int NULL_6190 = 6190; + public static final int NULL_6191 = 6191; + public static final int NULL_6192 = 6192; + public static final int NULL_6193 = 6193; + public static final int NULL_6194 = 6194; + public static final int NULL_6195 = 6195; + public static final int NULL_6196 = 6196; + public static final int NULL_6197 = 6197; + public static final int NULL_6198 = 6198; + public static final int NULL_6199 = 6199; + public static final int NULL_6200 = 6200; + public static final int NULL_6201 = 6201; + public static final int NULL_6202 = 6202; + public static final int NULL_6203 = 6203; + public static final int NULL_6204 = 6204; + public static final int NULL_6205 = 6205; + public static final int NULL_6206 = 6206; + public static final int NULL_6207 = 6207; + public static final int NULL_6208 = 6208; + public static final int NULL_6209 = 6209; + public static final int NULL_6210 = 6210; + public static final int NULL_6211 = 6211; + public static final int NULL_6212 = 6212; + public static final int NULL_6213 = 6213; + public static final int NULL_6214 = 6214; + public static final int NULL_6215 = 6215; + public static final int NULL_6216 = 6216; + public static final int NULL_6217 = 6217; + public static final int NULL_6218 = 6218; + public static final int NULL_6219 = 6219; + public static final int NULL_6220 = 6220; + public static final int NULL_6221 = 6221; + public static final int NULL_6222 = 6222; + public static final int NULL_6223 = 6223; + public static final int NULL_6224 = 6224; + public static final int NULL_6225 = 6225; + public static final int NULL_6226 = 6226; + public static final int NULL_6227 = 6227; + public static final int NULL_6228 = 6228; + public static final int NULL_6229 = 6229; + public static final int NULL_6230 = 6230; + public static final int NULL_6231 = 6231; + public static final int NULL_6232 = 6232; + public static final int NULL_6233 = 6233; + public static final int NULL_6234 = 6234; + public static final int NULL_6235 = 6235; + public static final int NULL_6236 = 6236; + public static final int NULL_6237 = 6237; + public static final int NULL_6238 = 6238; + public static final int NULL_6239 = 6239; + public static final int NULL_6240 = 6240; + public static final int NULL_6241 = 6241; + public static final int NULL_6242 = 6242; + public static final int NULL_6243 = 6243; + public static final int NULL_6244 = 6244; + public static final int NULL_6245 = 6245; + public static final int NULL_6246 = 6246; + public static final int NULL_6247 = 6247; + public static final int NULL_6248 = 6248; + public static final int NULL_6249 = 6249; + public static final int NULL_6250 = 6250; + public static final int NULL_6251 = 6251; + public static final int NULL_6252 = 6252; + public static final int NULL_6253 = 6253; + public static final int NULL_6254 = 6254; + public static final int NULL_6255 = 6255; + public static final int NULL_6256 = 6256; + public static final int NULL_6257 = 6257; + public static final int NULL_6258 = 6258; + public static final int NULL_6259 = 6259; + public static final int NULL_6260 = 6260; + public static final int NULL_6261 = 6261; + public static final int NULL_6262 = 6262; + public static final int NULL_6263 = 6263; + public static final int NULL_6264 = 6264; + public static final int NULL_6265 = 6265; + public static final int NULL_6266 = 6266; + public static final int NULL_6268 = 6268; + public static final int NULL_6269 = 6269; + public static final int NULL_6270 = 6270; + public static final int NULL_6274 = 6274; + public static final int NULL_6275 = 6275; + public static final int NULL_6276 = 6276; + public static final int NULL_6277 = 6277; + public static final int NULL_6278 = 6278; + public static final int NULL_6279 = 6279; + public static final int NULL_6280 = 6280; + public static final int NULL_6281 = 6281; + public static final int NULL_6282 = 6282; + public static final int NULL_6283 = 6283; + public static final int NULL_6284 = 6284; + public static final int NULL_6285 = 6285; + public static final int NULL_6286 = 6286; + public static final int NULL_6287 = 6287; + public static final int NULL_6288 = 6288; + public static final int NULL_6289 = 6289; + public static final int NULL_6290 = 6290; + public static final int NULL_6403 = 6403; + public static final int NULL_6404 = 6404; + public static final int NULL_6405 = 6405; + public static final int NULL_6486 = 6486; + public static final int NULL_6487 = 6487; + public static final int NULL_6489 = 6489; + public static final int NULL_6507 = 6507; + public static final int NULL_6508 = 6508; + public static final int NULL_6511 = 6511; + public static final int NULL_6520 = 6520; + public static final int NULL_6521 = 6521; + public static final int NULL_6522 = 6522; + public static final int NULL_6523 = 6523; + public static final int NULL_6528 = 6528; + public static final int NULL_6534 = 6534; + public static final int NULL_6535 = 6535; + public static final int NULL_6536 = 6536; + public static final int NULL_6537 = 6537; + public static final int NULL_6538 = 6538; + public static final int NULL_6539 = 6539; + public static final int NULL_6540 = 6540; + public static final int NULL_6541 = 6541; + public static final int NULL_6542 = 6542; + public static final int NULL_6543 = 6543; + public static final int NULL_6544 = 6544; + public static final int NULL_6545 = 6545; + public static final int NULL_6546 = 6546; + public static final int NULL_6547 = 6547; + public static final int NULL_6548 = 6548; + public static final int NULL_6549 = 6549; + public static final int NULL_6550 = 6550; + public static final int NULL_6551 = 6551; + public static final int NULL_6552 = 6552; + public static final int NULL_6553 = 6553; + public static final int NULL_6554 = 6554; + public static final int NULL_6555 = 6555; + public static final int NULL_6556 = 6556; + public static final int NULL_6557 = 6557; + public static final int NULL_6558 = 6558; + public static final int NULL_6559 = 6559; + public static final int NULL_6560 = 6560; + public static final int NULL_6563 = 6563; + public static final int NULL_6573 = 6573; + public static final int NULL_6577 = 6577; + public static final int NULL_6578 = 6578; + public static final int NULL_6585 = 6585; + public static final int NULL_6622 = 6622; + public static final int NULL_6623 = 6623; + public static final int NULL_6704 = 6704; + public static final int NULL_6705 = 6705; + public static final int NULL_6706 = 6706; + public static final int NULL_6707 = 6707; + public static final int NULL_6708 = 6708; + public static final int NULL_6709 = 6709; + public static final int NULL_6710 = 6710; + public static final int NULL_6711 = 6711; + public static final int NULL_6712 = 6712; + public static final int NULL_6713 = 6713; + public static final int NULL_6714 = 6714; + public static final int NULL_6760 = 6760; + public static final int NULL_6761 = 6761; + public static final int NULL_6763 = 6763; + public static final int NULL_6764 = 6764; + public static final int NULL_6765 = 6765; + public static final int NULL_6778 = 6778; + public static final int NULL_6782 = 6782; + public static final int NULL_6783 = 6783; + public static final int NULL_6786 = 6786; + public static final int NULL_6787 = 6787; + public static final int NULL_6788 = 6788; + public static final int NULL_6789 = 6789; + public static final int NULL_6790 = 6790; + public static final int NULL_6791 = 6791; + public static final int NULL_6796 = 6796; + public static final int NULL_6807 = 6807; + public static final int NULL_6808 = 6808; + public static final int NULL_6809 = 6809; + public static final int NULL_6810 = 6810; + public static final int NULL_6819 = 6819; + public static final int NULL_6820 = 6820; + public static final int NULL_6821 = 6821; + public static final int NULL_6822 = 6822; + public static final int NULL_7070 = 7070; + public static final int NULL_7175 = 7175; + public static final int NULL_7177 = 7177; + public static final int NULL_7179 = 7179; + public static final int NULL_7180 = 7180; + public static final int NULL_7181 = 7181; + public static final int NULL_7182 = 7182; + public static final int NULL_7183 = 7183; + public static final int NULL_7184 = 7184; + public static final int NULL_7185 = 7185; + public static final int NULL_7186 = 7186; + public static final int NULL_7187 = 7187; + public static final int NULL_7188 = 7188; + public static final int NULL_7189 = 7189; + public static final int NULL_7190 = 7190; + public static final int NULL_7191 = 7191; + public static final int NULL_7192 = 7192; + public static final int NULL_7193 = 7193; + public static final int NULL_7194 = 7194; + public static final int NULL_7195 = 7195; + public static final int NULL_7196 = 7196; + public static final int NULL_7197 = 7197; + public static final int NULL_7198 = 7198; + public static final int NULL_7208 = 7208; + public static final int NULL_7210 = 7210; + public static final int NULL_7211 = 7211; + public static final int NULL_7227 = 7227; + public static final int NULL_7228 = 7228; + public static final int NULL_7229 = 7229; + public static final int NULL_7230 = 7230; + public static final int NULL_7231 = 7231; + public static final int NULL_7313 = 7313; + public static final int NULL_7314 = 7314; + public static final int NULL_7315 = 7315; + public static final int NULL_7318 = 7318; + public static final int NULL_7319 = 7319; + public static final int NULL_7320 = 7320; + public static final int NULL_7322 = 7322; + public static final int NULL_7325 = 7325; + public static final int NULL_7326 = 7326; + public static final int NULL_7373 = 7373; + public static final int NULL_7375 = 7375; + public static final int NULL_7382 = 7382; + public static final int NULL_7428 = 7428; + public static final int NULL_7429 = 7429; + public static final int NULL_7430 = 7430; + public static final int NULL_7431 = 7431; + public static final int NULL_7432 = 7432; + public static final int NULL_7433 = 7433; + public static final int NULL_7434 = 7434; + public static final int NULL_7435 = 7435; + public static final int NULL_7436 = 7436; + public static final int NULL_7457 = 7457; + public static final int NULL_7458 = 7458; + public static final int NULL_7489 = 7489; + public static final int NULL_7492 = 7492; + public static final int NULL_7493 = 7493; + public static final int NULL_7494 = 7494; + public static final int NULL_7495 = 7495; + public static final int NULL_7496 = 7496; + public static final int NULL_7497 = 7497; + public static final int NULL_7498 = 7498; + public static final int NULL_7499 = 7499; + public static final int NULL_7500 = 7500; + public static final int NULL_7501 = 7501; + public static final int NULL_7502 = 7502; + public static final int NULL_7503 = 7503; + public static final int NULL_7504 = 7504; + public static final int NULL_7505 = 7505; + public static final int NULL_7506 = 7506; + public static final int NULL_7507 = 7507; + public static final int NULL_7508 = 7508; + public static final int NULL_7547 = 7547; + public static final int NULL_7556 = 7556; + public static final int NULL_7557 = 7557; + public static final int NULL_7596 = 7596; + public static final int NULL_7617 = 7617; + public static final int NULL_7618 = 7618; + public static final int NULL_7619 = 7619; + public static final int NULL_7634 = 7634; + public static final int NULL_7639 = 7639; + public static final int NULL_7655 = 7655; + public static final int NULL_7735 = 7735; + public static final int NULL_7767 = 7767; + public static final int NULL_7819 = 7819; + public static final int NULL_7820 = 7820; + public static final int NULL_7821 = 7821; + public static final int NULL_7822 = 7822; + public static final int NULL_7823 = 7823; + public static final int NULL_7824 = 7824; + public static final int NULL_7825 = 7825; + public static final int NULL_7826 = 7826; + public static final int NULL_7827 = 7827; + public static final int NULL_7828 = 7828; + public static final int NULL_7829 = 7829; + public static final int NULL_7830 = 7830; + public static final int NULL_7831 = 7831; + public static final int NULL_7832 = 7832; + public static final int NULL_7833 = 7833; + public static final int NULL_7834 = 7834; + public static final int NULL_7835 = 7835; + public static final int NULL_7836 = 7836; + public static final int NULL_7837 = 7837; + public static final int NULL_7838 = 7838; + public static final int NULL_7839 = 7839; + public static final int NULL_7840 = 7840; + public static final int NULL_7841 = 7841; + public static final int NULL_7842 = 7842; + public static final int NULL_7843 = 7843; + public static final int NULL_7844 = 7844; + public static final int NULL_7845 = 7845; + public static final int NULL_7846 = 7846; + public static final int NULL_7847 = 7847; + public static final int NULL_7848 = 7848; + public static final int NULL_7856 = 7856; + public static final int NULL_7857 = 7857; + public static final int NULL_7925 = 7925; + public static final int NULL_7926 = 7926; + public static final int NULL_7927 = 7927; + public static final int NULL_7928 = 7928; + public static final int NULL_7929 = 7929; + public static final int NULL_7930 = 7930; + public static final int NULL_7942 = 7942; + public static final int NULL_7944 = 7944; + public static final int NULL_7945 = 7945; + public static final int NULL_7959 = 7959; + public static final int NULL_7960 = 7960; + public static final int NULL_7962 = 7962; + public static final int NULL_7968 = 7968; + public static final int NULL_7973 = 7973; + public static final int NULL_7974 = 7974; + public static final int NULL_7977 = 7977; + public static final int NULL_7978 = 7978; + public static final int NULL_7980 = 7980; + public static final int NULL_7993 = 7993; + public static final int NULL_7994 = 7994; + public static final int NULL_8014 = 8014; + public static final int NULL_8015 = 8015; + public static final int NULL_8016 = 8016; + public static final int NULL_8017 = 8017; + public static final int NULL_8018 = 8018; + public static final int NULL_8032 = 8032; + public static final int NULL_8109 = 8109; + public static final int NULL_8110 = 8110; + public static final int NULL_8141 = 8141; + public static final int NULL_8190 = 8190; + public static final int NULL_8191 = 8191; + public static final int NULL_8192 = 8192; + public static final int NULL_8234 = 8234; + public static final int NULL_8265 = 8265; + public static final int NULL_8266 = 8266; + public static final int NULL_8272 = 8272; + public static final int NULL_8277 = 8277; + public static final int NULL_8278 = 8278; + public static final int NULL_8279 = 8279; + public static final int NULL_8280 = 8280; + public static final int NULL_8281 = 8281; + public static final int NULL_8282 = 8282; + public static final int NULL_8283 = 8283; + public static final int NULL_8284 = 8284; + public static final int NULL_8285 = 8285; + public static final int NULL_8286 = 8286; + public static final int NULL_8289 = 8289; + public static final int NULL_8290 = 8290; + public static final int NULL_8291 = 8291; + public static final int NULL_8292 = 8292; + public static final int NULL_8293 = 8293; + public static final int NULL_8294 = 8294; + public static final int NULL_8295 = 8295; + public static final int NULL_8296 = 8296; + public static final int NULL_8308 = 8308; + public static final int NULL_8309 = 8309; + public static final int NULL_8310 = 8310; + public static final int NULL_8311 = 8311; + public static final int NULL_8312 = 8312; + public static final int NULL_8313 = 8313; + public static final int NULL_8314 = 8314; + public static final int NULL_8315 = 8315; + public static final int NULL_8316 = 8316; + public static final int NULL_8317 = 8317; + public static final int NULL_8318 = 8318; + public static final int NULL_8319 = 8319; + public static final int NULL_8358 = 8358; + public static final int NULL_8380 = 8380; + public static final int NULL_8386 = 8386; + public static final int NULL_8389 = 8389; + public static final int NULL_8392 = 8392; + public static final int NULL_8393 = 8393; + public static final int NULL_8394 = 8394; + public static final int NULL_8395 = 8395; + public static final int NULL_8396 = 8396; + public static final int NULL_8397 = 8397; + public static final int NULL_8398 = 8398; + public static final int NULL_8399 = 8399; + public static final int NULL_8406 = 8406; + public static final int NULL_8408 = 8408; + public static final int NULL_8412 = 8412; + public static final int NULL_8413 = 8413; + public static final int NULL_8414 = 8414; + public static final int NULL_8415 = 8415; + public static final int NULL_8416 = 8416; + public static final int NULL_8417 = 8417; + public static final int NULL_8418 = 8418; + public static final int NULL_8420 = 8420; + public static final int NULL_8421 = 8421; + public static final int NULL_8423 = 8423; + public static final int NULL_8427 = 8427; + public static final int NULL_8432 = 8432; + public static final int NULL_8433 = 8433; + public static final int NULL_8436 = 8436; + public static final int NULL_8437 = 8437; + public static final int NULL_8441 = 8441; + public static final int NULL_8443 = 8443; + public static final int NULL_8457 = 8457; + public static final int NULL_8458 = 8458; + public static final int NULL_8461 = 8461; + public static final int NULL_8462 = 8462; + public static final int NULL_8465 = 8465; + public static final int NULL_8466 = 8466; + public static final int NULL_8468 = 8468; + public static final int NULL_8469 = 8469; + public static final int NULL_8477 = 8477; + public static final int NULL_8478 = 8478; + public static final int NULL_8486 = 8486; + public static final int NULL_8488 = 8488; + public static final int NULL_8489 = 8489; + public static final int NULL_8490 = 8490; + public static final int NULL_8516 = 8516; + public static final int NULL_8624 = 8624; + public static final int NULL_8625 = 8625; + public static final int NULL_8626 = 8626; + public static final int NULL_8627 = 8627; + public static final int NULL_8628 = 8628; + public static final int NULL_8632 = 8632; + public static final int NULL_8639 = 8639; + public static final int NULL_8640 = 8640; + public static final int NULL_8641 = 8641; + public static final int NULL_8642 = 8642; + public static final int NULL_8643 = 8643; + public static final int NULL_8645 = 8645; + public static final int NULL_8646 = 8646; + public static final int NULL_8647 = 8647; + public static final int NULL_8648 = 8648; + public static final int NULL_8649 = 8649; + public static final int NULL_8650 = 8650; + public static final int NULL_8651 = 8651; + public static final int NULL_8652 = 8652; + public static final int NULL_8653 = 8653; + public static final int NULL_8654 = 8654; + public static final int NULL_8655 = 8655; + public static final int NULL_8656 = 8656; + public static final int NULL_8657 = 8657; + public static final int NULL_8658 = 8658; + public static final int NULL_8659 = 8659; + public static final int NULL_8660 = 8660; + public static final int NULL_8661 = 8661; + public static final int NULL_8662 = 8662; + public static final int NULL_8663 = 8663; + public static final int NULL_8664 = 8664; + public static final int NULL_8668 = 8668; + public static final int NULL_8669 = 8669; + public static final int NULL_8670 = 8670; + public static final int NULL_8671 = 8671; + public static final int NULL_8672 = 8672; + public static final int NULL_8673 = 8673; + public static final int NULL_8674 = 8674; + public static final int NULL_8677 = 8677; + public static final int NULL_8689 = 8689; + public static final int NULL_8695 = 8695; + public static final int NULL_8716 = 8716; + public static final int NULL_8717 = 8717; + public static final int NULL_8718 = 8718; + public static final int NULL_8719 = 8719; + public static final int NULL_8720 = 8720; + public static final int NULL_8734 = 8734; + public static final int NULL_8735 = 8735; + public static final int NULL_8740 = 8740; + public static final int NULL_8785 = 8785; + public static final int NULL_8786 = 8786; + public static final int NULL_8787 = 8787; + public static final int NULL_8788 = 8788; + public static final int NULL_8789 = 8789; + public static final int NULL_8790 = 8790; + public static final int NULL_8796 = 8796; + public static final int NULL_8817 = 8817; + public static final int NULL_8820 = 8820; + public static final int NULL_8824 = 8824; + public static final int NULL_8826 = 8826; + public static final int NULL_8828 = 8828; + public static final int NULL_8896 = 8896; + public static final int NULL_8900 = 8900; + public static final int NULL_8905 = 8905; + public static final int NULL_8909 = 8909; + public static final int NULL_8912 = 8912; + public static final int NULL_8916 = 8916; + public static final int NULL_8977 = 8977; + public static final int NULL_9012 = 9012; + public static final int NULL_9025 = 9025; + public static final int NULL_9039 = 9039; + public static final int NULL_9147 = 9147; + public static final int NULL_9203 = 9203; + public static final int NULL_9204 = 9204; + public static final int NULL_9205 = 9205; + public static final int NULL_9206 = 9206; + public static final int NULL_9207 = 9207; + public static final int NULL_9208 = 9208; + public static final int NULL_9209 = 9209; + public static final int NULL_9210 = 9210; + public static final int NULL_9211 = 9211; + public static final int NULL_9212 = 9212; + public static final int NULL_9213 = 9213; + public static final int NULL_9214 = 9214; + public static final int NULL_9215 = 9215; + public static final int NULL_9216 = 9216; + public static final int NULL_9217 = 9217; + public static final int NULL_9218 = 9218; + public static final int NULL_9219 = 9219; + public static final int NULL_9220 = 9220; + public static final int NULL_9221 = 9221; + public static final int NULL_9222 = 9222; + public static final int NULL_9223 = 9223; + public static final int NULL_9224 = 9224; + public static final int NULL_9225 = 9225; + public static final int NULL_9226 = 9226; + public static final int NULL_9227 = 9227; + public static final int NULL_9228 = 9228; + public static final int NULL_9229 = 9229; + public static final int NULL_9230 = 9230; + public static final int NULL_9231 = 9231; + public static final int NULL_9232 = 9232; + public static final int NULL_9233 = 9233; + public static final int NULL_9234 = 9234; + public static final int NULL_9235 = 9235; + public static final int NULL_9236 = 9236; + public static final int NULL_9237 = 9237; + public static final int NULL_9238 = 9238; + public static final int NULL_9239 = 9239; + public static final int NULL_9240 = 9240; + public static final int NULL_9241 = 9241; + public static final int NULL_9242 = 9242; + public static final int NULL_9243 = 9243; + public static final int NULL_9245 = 9245; + public static final int NULL_9256 = 9256; + public static final int NULL_9269 = 9269; + public static final int NULL_9384 = 9384; + public static final int NULL_9385 = 9385; + public static final int NULL_9386 = 9386; + public static final int NULL_9387 = 9387; + public static final int NULL_9388 = 9388; + public static final int NULL_9389 = 9389; + public static final int NULL_9390 = 9390; + public static final int NULL_9391 = 9391; + public static final int NULL_9392 = 9392; + public static final int NULL_9393 = 9393; + public static final int NULL_9394 = 9394; + public static final int NULL_9395 = 9395; + public static final int NULL_9396 = 9396; + public static final int NULL_9397 = 9397; + public static final int NULL_9411 = 9411; + public static final int NULL_9412 = 9412; + public static final int NULL_9456 = 9456; + public static final int NULL_9457 = 9457; + public static final int NULL_9458 = 9458; + public static final int NULL_9459 = 9459; + public static final int NULL_9473 = 9473; + public static final int NULL_9475 = 9475; + public static final int NULL_9507 = 9507; + public static final int NULL_9508 = 9508; + public static final int NULL_9509 = 9509; + public static final int NULL_9510 = 9510; + public static final int NULL_9515 = 9515; + public static final int NULL_9516 = 9516; + public static final int NULL_9517 = 9517; + public static final int NULL_9518 = 9518; + public static final int NULL_9519 = 9519; + public static final int NULL_9520 = 9520; + public static final int NULL_9618 = 9618; + public static final int NULL_9620 = 9620; + public static final int NULL_9626 = 9626; + public static final int NULL_9628 = 9628; + public static final int NULL_9630 = 9630; + public static final int NULL_9647 = 9647; + public static final int NULL_9649 = 9649; + public static final int NULL_9651 = 9651; + public static final int NULL_9653 = 9653; + public static final int NULL_9655 = 9655; + public static final int NULL_9669 = 9669; + public static final int NULL_9670 = 9670; + public static final int NULL_9671 = 9671; + public static final int NULL_9672 = 9672; + public static final int NULL_9673 = 9673; + public static final int NULL_9674 = 9674; + public static final int NULL_9747 = 9747; + public static final int NULL_9748 = 9748; + public static final int NULL_9803 = 9803; + public static final int NULL_9804 = 9804; + public static final int NULL_9805 = 9805; + public static final int NULL_9806 = 9806; + public static final int NULL_9807 = 9807; + public static final int NULL_9808 = 9808; + public static final int NULL_9809 = 9809; + public static final int NULL_9810 = 9810; + public static final int NULL_9811 = 9811; + public static final int NULL_9812 = 9812; + public static final int NULL_9813 = 9813; + public static final int NULL_9814 = 9814; + public static final int NULL_9815 = 9815; + public static final int NULL_9816 = 9816; + public static final int NULL_9817 = 9817; + public static final int NULL_9818 = 9818; + public static final int NULL_9819 = 9819; + public static final int NULL_9820 = 9820; + public static final int NULL_9821 = 9821; + public static final int NULL_9822 = 9822; + public static final int NULL_9823 = 9823; + public static final int NULL_9824 = 9824; + public static final int NULL_9825 = 9825; + public static final int NULL_9826 = 9826; + public static final int NULL_9827 = 9827; + public static final int NULL_9828 = 9828; + public static final int NULL_9829 = 9829; + public static final int NULL_9830 = 9830; + public static final int NULL_9831 = 9831; + public static final int NULL_9832 = 9832; + public static final int NULL_9833 = 9833; + public static final int NULL_9834 = 9834; + public static final int NULL_9835 = 9835; + public static final int NULL_9836 = 9836; + public static final int NULL_9837 = 9837; + public static final int NULL_9838 = 9838; + public static final int NULL_9839 = 9839; + public static final int NULL_9840 = 9840; + public static final int NULL_9841 = 9841; + public static final int NULL_9842 = 9842; + public static final int NULL_9843 = 9843; + public static final int NULL_9844 = 9844; + public static final int NULL_9845 = 9845; + public static final int NULL_9846 = 9846; + public static final int NULL_9847 = 9847; + public static final int NULL_9848 = 9848; + public static final int NULL_9849 = 9849; + /* This file is automatically generated. Do not edit. */ +} From fb32b5842d03ee80a27dddc2cfa37bed7004f0de Mon Sep 17 00:00:00 2001 From: Max Weber Date: Thu, 7 May 2020 14:19:26 -0600 Subject: [PATCH 22/43] cache: emit null npc ids --- .../java/net/runelite/cache/ItemManager.java | 20 +++++++++---------- .../java/net/runelite/cache/NpcManager.java | 11 ++++++---- .../net/runelite/cache/ObjectManager.java | 20 +++++++++---------- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/cache/src/main/java/net/runelite/cache/ItemManager.java b/cache/src/main/java/net/runelite/cache/ItemManager.java index b3449a51a4..bff27593d6 100644 --- a/cache/src/main/java/net/runelite/cache/ItemManager.java +++ b/cache/src/main/java/net/runelite/cache/ItemManager.java @@ -96,20 +96,18 @@ public class ItemManager implements ItemProvider public void java(File java) throws IOException { java.mkdirs(); - try (IDClass ids = IDClass.create(java, "ItemID")) + try (IDClass ids = IDClass.create(java, "ItemID"); + IDClass nulls = IDClass.create(java, "NullItemID")) { - try (IDClass nulls = IDClass.create(java, "NullItemID")) + for (ItemDefinition def : items.values()) { - for (ItemDefinition def : items.values()) + if (def.name.equalsIgnoreCase("NULL")) { - if (def.name.equalsIgnoreCase("NULL")) - { - nulls.add(def.name, def.id); - } - else - { - ids.add(def.name, def.id); - } + nulls.add(def.name, def.id); + } + else + { + ids.add(def.name, def.id); } } } diff --git a/cache/src/main/java/net/runelite/cache/NpcManager.java b/cache/src/main/java/net/runelite/cache/NpcManager.java index 3124eb455f..04849de69f 100644 --- a/cache/src/main/java/net/runelite/cache/NpcManager.java +++ b/cache/src/main/java/net/runelite/cache/NpcManager.java @@ -95,16 +95,19 @@ public class NpcManager public void java(File java) throws IOException { java.mkdirs(); - try (IDClass ids = IDClass.create(java, "NpcID")) + try (IDClass ids = IDClass.create(java, "NpcID"); + IDClass nulls = IDClass.create(java, "NullNpcID")) { for (NpcDefinition def : npcs.values()) { if (def.name.equalsIgnoreCase("NULL")) { - continue; + nulls.add(def.name, def.id); + } + else + { + ids.add(def.name, def.id); } - - ids.add(def.name, def.id); } } } diff --git a/cache/src/main/java/net/runelite/cache/ObjectManager.java b/cache/src/main/java/net/runelite/cache/ObjectManager.java index cb1372ed65..ba39ae9239 100644 --- a/cache/src/main/java/net/runelite/cache/ObjectManager.java +++ b/cache/src/main/java/net/runelite/cache/ObjectManager.java @@ -95,20 +95,18 @@ public class ObjectManager public void java(File java) throws IOException { java.mkdirs(); - try (IDClass ids = IDClass.create(java, "ObjectID")) + try (IDClass ids = IDClass.create(java, "ObjectID"); + IDClass nulls = IDClass.create(java, "NullObjectID")) { - try (IDClass nulls = IDClass.create(java, "NullObjectID")) + for (ObjectDefinition def : objects.values()) { - for (ObjectDefinition def : objects.values()) + if ("null".equals(def.getName())) { - if ("null".equals(def.getName())) - { - nulls.add(def.getName(), def.getId()); - } - else - { - ids.add(def.getName(), def.getId()); - } + nulls.add(def.getName(), def.getId()); + } + else + { + ids.add(def.getName(), def.getId()); } } } From db3b32c09380d2d7b197e4f468d068312243f05e Mon Sep 17 00:00:00 2001 From: melkypie <5113962+melkypie@users.noreply.github.com> Date: Thu, 7 May 2020 23:25:08 +0300 Subject: [PATCH 23/43] timetracking: add farming contract functionality Co-authored-by: Koekkruimels --- .../timetracking/OverviewItemPanel.java | 58 +++- .../timetracking/OverviewTabPanel.java | 27 +- .../plugins/timetracking/SummaryState.java | 1 + .../plugins/timetracking/TabContentPanel.java | 2 +- .../timetracking/TimeTrackingPanel.java | 9 +- .../timetracking/TimeTrackingPlugin.java | 31 +- .../plugins/timetracking/TimeablePanel.java | 12 +- .../farming/FarmingContractInfoBox.java | 110 ++++++ .../farming/FarmingContractManager.java | 326 ++++++++++++++++++ .../timetracking/farming/FarmingTabPanel.java | 17 +- .../timetracking/farming/FarmingTracker.java | 4 +- .../timetracking/farming/FarmingWorld.java | 5 +- .../plugins/timetracking/farming/Produce.java | 177 +++++++--- 13 files changed, 691 insertions(+), 88 deletions(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingContractInfoBox.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingContractManager.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewItemPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewItemPanel.java index 47484a669d..a029d0b5d9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewItemPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewItemPanel.java @@ -31,6 +31,7 @@ import java.awt.Dimension; import java.awt.GridLayout; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.util.function.BooleanSupplier; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JPanel; @@ -47,7 +48,12 @@ class OverviewItemPanel extends JPanel private static final Color HOVER_COLOR = ColorScheme.DARKER_GRAY_HOVER_COLOR; + private final JPanel textContainer; private final JLabel statusLabel; + private final JLabel arrowLabel; + private final BooleanSupplier isSelectable; + + private boolean isHighlighted; static { @@ -56,16 +62,23 @@ class OverviewItemPanel extends JPanel OverviewItemPanel(ItemManager itemManager, TimeTrackingPanel pluginPanel, Tab tab, String title) { + this(itemManager, () -> pluginPanel.switchTab(tab), () -> true, tab.getItemID(), title); + } + + OverviewItemPanel(ItemManager itemManager, Runnable onTabSwitched, BooleanSupplier isSelectable, int iconItemID, String title) + { + this.isSelectable = isSelectable; + setBackground(ColorScheme.DARKER_GRAY_COLOR); setLayout(new BorderLayout()); setBorder(new EmptyBorder(7, 7, 7, 7)); JLabel iconLabel = new JLabel(); iconLabel.setMinimumSize(new Dimension(Constants.ITEM_SPRITE_WIDTH, Constants.ITEM_SPRITE_HEIGHT)); - itemManager.getImage(tab.getItemID()).addTo(iconLabel); + itemManager.getImage(iconItemID).addTo(iconLabel); add(iconLabel, BorderLayout.WEST); - JPanel textContainer = new JPanel(); + textContainer = new JPanel(); textContainer.setBackground(ColorScheme.DARKER_GRAY_COLOR); textContainer.setLayout(new GridLayout(2, 1)); textContainer.setBorder(new EmptyBorder(5, 7, 5, 7)); @@ -75,32 +88,27 @@ class OverviewItemPanel extends JPanel @Override public void mousePressed(MouseEvent mouseEvent) { - pluginPanel.switchTab(tab); - setBackground(ColorScheme.DARKER_GRAY_COLOR); - textContainer.setBackground(ColorScheme.DARKER_GRAY_COLOR); + onTabSwitched.run(); + + setHighlighted(false); } @Override public void mouseReleased(MouseEvent e) { - setBackground(HOVER_COLOR); - textContainer.setBackground(HOVER_COLOR); + setHighlighted(true); } @Override public void mouseEntered(MouseEvent e) { - setBackground(HOVER_COLOR); - textContainer.setBackground(HOVER_COLOR); - setCursor(new Cursor(Cursor.HAND_CURSOR)); + setHighlighted(true); } @Override public void mouseExited(MouseEvent e) { - setBackground(ColorScheme.DARKER_GRAY_COLOR); - textContainer.setBackground(ColorScheme.DARKER_GRAY_COLOR); - setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); + setHighlighted(false); } }); @@ -117,7 +125,8 @@ class OverviewItemPanel extends JPanel add(textContainer, BorderLayout.CENTER); - JLabel arrowLabel = new JLabel(ARROW_RIGHT_ICON); + arrowLabel = new JLabel(ARROW_RIGHT_ICON); + arrowLabel.setVisible(isSelectable.getAsBoolean()); add(arrowLabel, BorderLayout.EAST); } @@ -125,5 +134,26 @@ class OverviewItemPanel extends JPanel { statusLabel.setText(text); statusLabel.setForeground(color); + + arrowLabel.setVisible(isSelectable.getAsBoolean()); + + if (isHighlighted && !isSelectable.getAsBoolean()) + { + setHighlighted(false); + } + } + + private void setHighlighted(boolean highlighted) + { + if (highlighted && !isSelectable.getAsBoolean()) + { + return; + } + + setBackground(highlighted ? HOVER_COLOR : ColorScheme.DARKER_GRAY_COLOR); + setCursor(new Cursor(highlighted && getMousePosition(true) != null ? Cursor.HAND_CURSOR : Cursor.DEFAULT_CURSOR)); + textContainer.setBackground(highlighted ? HOVER_COLOR : ColorScheme.DARKER_GRAY_COLOR); + + isHighlighted = highlighted; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewTabPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewTabPanel.java index f736c49fef..432bf3b87c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewTabPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewTabPanel.java @@ -31,8 +31,11 @@ import java.time.Instant; import java.util.Map; import java.util.function.Function; import java.util.stream.Stream; +import javax.annotation.Nullable; +import net.runelite.api.ItemID; import net.runelite.client.game.ItemManager; import net.runelite.client.plugins.timetracking.clocks.ClockManager; +import net.runelite.client.plugins.timetracking.farming.FarmingContractManager; import net.runelite.client.plugins.timetracking.farming.FarmingTracker; import net.runelite.client.plugins.timetracking.hunter.BirdHouseTracker; import net.runelite.client.ui.ColorScheme; @@ -43,19 +46,23 @@ class OverviewTabPanel extends TabContentPanel private final FarmingTracker farmingTracker; private final BirdHouseTracker birdHouseTracker; private final ClockManager clockManager; + private final FarmingContractManager farmingContractManager; private final OverviewItemPanel timerOverview; private final OverviewItemPanel stopwatchOverview; private final Map farmingOverviews; private final OverviewItemPanel birdHouseOverview; + private final OverviewItemPanel farmingContractOverview; OverviewTabPanel(ItemManager itemManager, TimeTrackingConfig config, TimeTrackingPanel pluginPanel, - FarmingTracker farmingTracker, BirdHouseTracker birdHouseTracker, ClockManager clockManager) + FarmingTracker farmingTracker, BirdHouseTracker birdHouseTracker, ClockManager clockManager, + FarmingContractManager farmingContractManager) { this.config = config; this.farmingTracker = farmingTracker; this.birdHouseTracker = birdHouseTracker; this.clockManager = clockManager; + this.farmingContractManager = farmingContractManager; setLayout(new GridLayout(0, 1, 0, 8)); setBackground(ColorScheme.DARK_GRAY_COLOR); @@ -80,6 +87,10 @@ class OverviewTabPanel extends TabContentPanel return p; } )); + + farmingContractOverview = new OverviewItemPanel(itemManager, () -> pluginPanel.switchTab(farmingContractManager.getContractTab()), + farmingContractManager::hasContract, ItemID.SEED_PACK, "Farming Contract"); + add(farmingContractOverview); } @Override @@ -113,12 +124,14 @@ class OverviewTabPanel extends TabContentPanel } farmingOverviews.forEach((patchType, panel) -> - updateItemPanel(panel, farmingTracker.getSummary(patchType), farmingTracker.getCompletionTime(patchType))); + updateItemPanel(panel, farmingTracker.getSummary(patchType), farmingTracker.getCompletionTime(patchType), null)); - updateItemPanel(birdHouseOverview, birdHouseTracker.getSummary(), birdHouseTracker.getCompletionTime()); + updateItemPanel(birdHouseOverview, birdHouseTracker.getSummary(), birdHouseTracker.getCompletionTime(), null); + updateItemPanel(farmingContractOverview, farmingContractManager.getSummary(), farmingContractManager.getCompletionTime(), + farmingContractManager.getContractName()); } - private void updateItemPanel(OverviewItemPanel panel, SummaryState summary, long completionTime) + private void updateItemPanel(OverviewItemPanel panel, SummaryState summary, long completionTime, @Nullable String farmingContract) { switch (summary) { @@ -135,11 +148,13 @@ class OverviewTabPanel extends TabContentPanel { panel.updateStatus("Ready " + getFormattedEstimate(duration, config.estimateRelative()), Color.GRAY); } - break; } case EMPTY: - panel.updateStatus("Empty", Color.GRAY); + panel.updateStatus(farmingContract == null ? "Empty" : farmingContract, Color.GRAY); + break; + case OCCUPIED: + panel.updateStatus(farmingContract == null ? "" : farmingContract, Color.RED); break; case UNKNOWN: default: diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/SummaryState.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/SummaryState.java index 3dc659f53e..96c4ecdae4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/SummaryState.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/SummaryState.java @@ -28,6 +28,7 @@ public enum SummaryState { COMPLETED, IN_PROGRESS, + OCCUPIED, EMPTY, UNKNOWN } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TabContentPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TabContentPanel.java index 47740a8b17..f10a00594b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TabContentPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TabContentPanel.java @@ -48,7 +48,7 @@ public abstract class TabContentPanel extends JPanel return super.getPreferredSize(); } - protected static String getFormattedEstimate(long remainingSeconds, boolean useRelativeTime) + public static String getFormattedEstimate(long remainingSeconds, boolean useRelativeTime) { if (useRelativeTime) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeTrackingPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeTrackingPanel.java index b984927202..9c99ed27cd 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeTrackingPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeTrackingPanel.java @@ -41,6 +41,7 @@ import javax.swing.border.EmptyBorder; import net.runelite.client.util.AsyncBufferedImage; import net.runelite.client.game.ItemManager; import net.runelite.client.plugins.timetracking.clocks.ClockManager; +import net.runelite.client.plugins.timetracking.farming.FarmingContractManager; import net.runelite.client.plugins.timetracking.farming.FarmingTracker; import net.runelite.client.plugins.timetracking.hunter.BirdHouseTracker; import net.runelite.client.ui.ColorScheme; @@ -64,7 +65,8 @@ class TimeTrackingPanel extends PluginPanel private TabContentPanel activeTabPanel = null; TimeTrackingPanel(ItemManager itemManager, TimeTrackingConfig config, - FarmingTracker farmingTracker, BirdHouseTracker birdHouseTracker, ClockManager clockManager) + FarmingTracker farmingTracker, BirdHouseTracker birdHouseTracker, ClockManager clockManager, + FarmingContractManager farmingContractManager) { super(false); @@ -82,13 +84,14 @@ class TimeTrackingPanel extends PluginPanel add(tabGroup, BorderLayout.NORTH); add(display, BorderLayout.CENTER); - addTab(Tab.OVERVIEW, new OverviewTabPanel(itemManager, config, this, farmingTracker, birdHouseTracker, clockManager)); + addTab(Tab.OVERVIEW, new OverviewTabPanel(itemManager, config, this, farmingTracker, birdHouseTracker, clockManager, + farmingContractManager)); addTab(Tab.CLOCK, clockManager.getClockTabPanel()); addTab(Tab.BIRD_HOUSE, birdHouseTracker.createBirdHouseTabPanel()); for (Tab tab : Tab.FARMING_TABS) { - addTab(tab, farmingTracker.createTabPanel(tab)); + addTab(tab, farmingTracker.createTabPanel(tab, farmingContractManager)); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeTrackingPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeTrackingPlugin.java index c3def0d822..93eef61337 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeTrackingPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeTrackingPlugin.java @@ -33,10 +33,12 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import javax.inject.Inject; +import net.runelite.api.ChatMessageType; import net.runelite.api.Client; import net.runelite.api.GameState; import net.runelite.api.coords.WorldPoint; import net.runelite.client.events.ConfigChanged; +import net.runelite.api.events.ChatMessage; import net.runelite.api.events.GameTick; import net.runelite.api.events.UsernameChanged; import net.runelite.api.widgets.Widget; @@ -50,11 +52,13 @@ import static net.runelite.client.plugins.timetracking.TimeTrackingConfig.CONFIG import static net.runelite.client.plugins.timetracking.TimeTrackingConfig.STOPWATCHES; import static net.runelite.client.plugins.timetracking.TimeTrackingConfig.TIMERS; import net.runelite.client.plugins.timetracking.clocks.ClockManager; +import net.runelite.client.plugins.timetracking.farming.FarmingContractManager; import net.runelite.client.plugins.timetracking.farming.FarmingTracker; import net.runelite.client.plugins.timetracking.hunter.BirdHouseTracker; import net.runelite.client.task.Schedule; import net.runelite.client.ui.ClientToolbar; import net.runelite.client.ui.NavigationButton; +import net.runelite.client.ui.overlay.infobox.InfoBoxManager; import net.runelite.client.util.ImageUtil; @PluginDescriptor( @@ -64,6 +68,8 @@ import net.runelite.client.util.ImageUtil; ) public class TimeTrackingPlugin extends Plugin { + private static final String CONTRACT_COMPLETED = "You've completed a Farming Guild Contract. You should return to Guildmaster Jane."; + @Inject private ClientToolbar clientToolbar; @@ -76,6 +82,9 @@ public class TimeTrackingPlugin extends Plugin @Inject private BirdHouseTracker birdHouseTracker; + @Inject + private FarmingContractManager farmingContractManager; + @Inject private ClockManager clockManager; @@ -85,6 +94,9 @@ public class TimeTrackingPlugin extends Plugin @Inject private TimeTrackingConfig config; + @Inject + private InfoBoxManager infoBoxManager; + @Inject private ScheduledExecutorService executorService; @@ -113,7 +125,7 @@ public class TimeTrackingPlugin extends Plugin final BufferedImage icon = ImageUtil.getResourceStreamFromClass(getClass(), "watch.png"); - panel = new TimeTrackingPanel(itemManager, config, farmingTracker, birdHouseTracker, clockManager); + panel = new TimeTrackingPanel(itemManager, config, farmingTracker, birdHouseTracker, clockManager, farmingContractManager); navButton = NavigationButton.builder() .tooltip("Time Tracking") @@ -140,6 +152,8 @@ public class TimeTrackingPlugin extends Plugin } clientToolbar.removeNavigation(navButton); + infoBoxManager.removeInfoBox(farmingContractManager.getInfoBox()); + farmingContractManager.setInfoBox(null); } @Subscribe @@ -193,8 +207,9 @@ public class TimeTrackingPlugin extends Plugin boolean birdHouseDataChanged = birdHouseTracker.updateData(loc); boolean farmingDataChanged = farmingTracker.updateData(loc); + boolean farmingContractDataChanged = farmingContractManager.updateData(loc); - if (birdHouseDataChanged || farmingDataChanged) + if (birdHouseDataChanged || farmingDataChanged || farmingContractDataChanged) { panel.update(); } @@ -205,9 +220,21 @@ public class TimeTrackingPlugin extends Plugin { farmingTracker.loadCompletionTimes(); birdHouseTracker.loadFromConfig(); + farmingContractManager.loadContractFromConfig(); panel.update(); } + @Subscribe + public void onChatMessage(ChatMessage event) + { + if (event.getType() != ChatMessageType.GAMEMESSAGE || !event.getMessage().equals(CONTRACT_COMPLETED)) + { + return; + } + + farmingContractManager.setContract(null); + } + @Schedule(period = 10, unit = ChronoUnit.SECONDS) public void checkCompletion() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeablePanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeablePanel.java index c01f770063..e7584a6e27 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeablePanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeablePanel.java @@ -44,8 +44,10 @@ public class TimeablePanel extends JPanel { private final T timeable; private final JLabel icon = new JLabel(); + private final JLabel farmingContractIcon = new JLabel(); private final JLabel estimate = new JLabel(); private final ThinProgressBar progress = new ThinProgressBar(); + private final JLabel text; public TimeablePanel(T timeable, String title, int maximumProgressValue) { @@ -60,23 +62,25 @@ public class TimeablePanel extends JPanel topContainer.setBackground(ColorScheme.DARKER_GRAY_COLOR); icon.setMinimumSize(new Dimension(Constants.ITEM_SPRITE_WIDTH, Constants.ITEM_SPRITE_HEIGHT)); + farmingContractIcon.setMinimumSize(new Dimension(Constants.ITEM_SPRITE_WIDTH, Constants.ITEM_SPRITE_HEIGHT)); JPanel infoPanel = new JPanel(); infoPanel.setBackground(ColorScheme.DARKER_GRAY_COLOR); infoPanel.setLayout(new GridLayout(2, 1)); infoPanel.setBorder(new EmptyBorder(4, 4, 4, 0)); - final JLabel location = new JShadowedLabel(title); - location.setFont(FontManager.getRunescapeSmallFont()); - location.setForeground(Color.WHITE); + text = new JShadowedLabel(title); + text.setFont(FontManager.getRunescapeSmallFont()); + text.setForeground(Color.WHITE); estimate.setFont(FontManager.getRunescapeSmallFont()); estimate.setForeground(Color.GRAY); - infoPanel.add(location); + infoPanel.add(text); infoPanel.add(estimate); topContainer.add(icon, BorderLayout.WEST); + topContainer.add(farmingContractIcon, BorderLayout.EAST); topContainer.add(infoPanel, BorderLayout.CENTER); progress.setValue(0); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingContractInfoBox.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingContractInfoBox.java new file mode 100644 index 0000000000..1c6fb1a19d --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingContractInfoBox.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2019, Koekkruimels + * Copyright (c) 2020, melky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.timetracking.farming; + +import java.awt.Color; +import java.awt.image.BufferedImage; +import java.time.Instant; +import lombok.Getter; +import net.runelite.client.plugins.Plugin; +import net.runelite.client.plugins.timetracking.SummaryState; +import net.runelite.client.plugins.timetracking.TabContentPanel; +import net.runelite.client.plugins.timetracking.TimeTrackingConfig; +import net.runelite.client.ui.ColorScheme; +import net.runelite.client.ui.overlay.infobox.InfoBox; +import net.runelite.client.util.ColorUtil; + +class FarmingContractInfoBox extends InfoBox +{ + @Getter + private final Produce contract; + private final FarmingContractManager manager; + private final TimeTrackingConfig config; + + FarmingContractInfoBox(BufferedImage image, Plugin plugin, Produce contract, TimeTrackingConfig config, FarmingContractManager manager) + { + super(image, plugin); + this.contract = contract; + this.config = config; + this.manager = manager; + } + + @Override + public String getText() + { + return null; + } + + @Override + public Color getTextColor() + { + return null; + } + + @Override + public String getTooltip() + { + SummaryState summary = manager.getSummary(); + + Color contractColor; + String contractDescription; + switch (summary) + { + case COMPLETED: + contractDescription = "Ready"; + contractColor = ColorScheme.PROGRESS_COMPLETE_COLOR; + break; + case OCCUPIED: + contractDescription = "Occupied"; + contractColor = ColorScheme.PROGRESS_ERROR_COLOR; + break; + case IN_PROGRESS: + contractDescription = "Ready " + TabContentPanel.getFormattedEstimate(manager.getCompletionTime() - Instant.now().getEpochSecond(), + config.estimateRelative()); + contractColor = Color.GRAY; + break; + case EMPTY: + case UNKNOWN: + default: + contractDescription = null; + contractColor = Color.GRAY; + break; + } + + StringBuilder sb = new StringBuilder(); + sb.append(ColorUtil.wrapWithColorTag("Farming Contract", Color.WHITE)); + sb.append("
"); + sb.append(ColorUtil.wrapWithColorTag(contract.getName(), contractColor)); + + if (contractDescription != null) + { + sb.append("
"); + sb.append(ColorUtil.wrapWithColorTag(contractDescription, contractColor)); + } + + return sb.toString(); + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingContractManager.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingContractManager.java new file mode 100644 index 0000000000..77ab730ef8 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingContractManager.java @@ -0,0 +1,326 @@ +/* + * Copyright (c) 2019, Koekkruimels + * Copyright (c) 2020, melky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.timetracking.farming; + +import java.time.Instant; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import javax.inject.Inject; +import lombok.Getter; +import lombok.Setter; +import net.runelite.api.Client; +import net.runelite.api.NullNpcID; +import net.runelite.api.coords.WorldPoint; +import net.runelite.api.widgets.Widget; +import net.runelite.api.widgets.WidgetInfo; +import net.runelite.client.config.ConfigManager; +import net.runelite.client.game.ItemManager; +import net.runelite.client.plugins.timetracking.SummaryState; +import net.runelite.client.plugins.timetracking.Tab; +import net.runelite.client.plugins.timetracking.TimeTrackingConfig; +import net.runelite.client.plugins.timetracking.TimeTrackingPlugin; +import net.runelite.client.ui.overlay.infobox.InfoBoxManager; +import net.runelite.client.util.Text; + +public class FarmingContractManager +{ + private static final int GUILDMASTER_JANE_NPC_ID = NullNpcID.NULL_8628; + private static final int FARMING_GUILD_REGION_ID = 4922; + private static final Pattern CONTRACT_ASSIGN_PATTERN = Pattern.compile("(?:We need you to grow|Please could you grow) (?:some|a|an) ([a-zA-Z ]+)(?: for us\\?|\\.)"); + private static final String CONTRACT_REWARDED = "You'll be wanting a reward then. Here you go."; + private static final String CONFIG_KEY_CONTRACT = "contract"; + + @Getter + private SummaryState summary = SummaryState.UNKNOWN; + + @Inject + private Client client; + + @Inject + private ItemManager itemManager; + + @Inject + private TimeTrackingConfig config; + + @Inject + private TimeTrackingPlugin plugin; + + @Inject + private FarmingWorld farmingWorld; + + @Inject + private FarmingTracker farmingTracker; + + @Inject + private InfoBoxManager infoBoxManager; + + @Inject + private ConfigManager configManager; + + @Getter + private Produce contract = null; + + @Getter + @Setter + private FarmingContractInfoBox infoBox; + + @Getter + private long completionTime; + + public void setContract(@Nullable Produce contract) + { + this.contract = contract; + setStoredContract(contract); + handleContractState(); + } + + public boolean hasContract() + { + return contract != null; + } + + @Nullable + public Tab getContractTab() + { + return hasContract() ? contract.getPatchImplementation().getTab() : null; + } + + @Nullable + public String getContractName() + { + return hasContract() ? contract.getContractName() : null; + } + + public boolean shouldHighlightFarmingTabPanel(@Nonnull FarmingPatch patch) + { + PatchPrediction patchPrediction = farmingTracker.predictPatch(patch); + if (contract != null && + patch.getRegion().getRegionID() == FARMING_GUILD_REGION_ID && + contract.getPatchImplementation() == patch.getImplementation() && + patchPrediction != null && + (summary == SummaryState.EMPTY && + (patchPrediction.getProduce() == null || patchPrediction.getProduce() == Produce.WEEDS) + || patchPrediction.getProduce().equals(contract))) + { + return true; + } + return false; + } + + public void loadContractFromConfig() + { + contract = getStoredContract(); + handleContractState(); + } + + public boolean updateData(WorldPoint loc) + { + SummaryState oldSummary = summary; + + handleContractState(); + if (loc.getRegionID() == FARMING_GUILD_REGION_ID) + { + handleGuildmasterJaneWidgetDialog(); + handleInfoBox(); + } + else + { + if (infoBox != null) + { + infoBoxManager.removeInfoBox(infoBox); + infoBox = null; + } + } + return oldSummary != summary; + } + + private void handleInfoBox() + { + if (infoBox != null) + { + if (contract == null) + { + infoBoxManager.removeInfoBox(infoBox); + infoBox = null; + } + else if (infoBox.getContract() != contract) + { + infoBoxManager.removeInfoBox(infoBox); + infoBox = new FarmingContractInfoBox(itemManager.getImage(contract.getItemID()), plugin, contract, config, this); + infoBoxManager.addInfoBox(infoBox); + } + } + else if (contract != null) + { + infoBox = new FarmingContractInfoBox(itemManager.getImage(contract.getItemID()), plugin, contract, config, this); + infoBoxManager.addInfoBox(infoBox); + } + } + + private void handleGuildmasterJaneWidgetDialog() + { + Widget npcDialog = client.getWidget(WidgetInfo.DIALOG_NPC_HEAD_MODEL); + + if (npcDialog == null || npcDialog.getModelId() != GUILDMASTER_JANE_NPC_ID) + { + return; + } + + String dialogText = Text.removeTags(client.getWidget(WidgetInfo.DIALOG_NPC_TEXT).getText()); + + if (dialogText.equals(CONTRACT_REWARDED)) + { + setContract(null); + } + + Matcher matcher = CONTRACT_ASSIGN_PATTERN.matcher(dialogText); + + if (!matcher.find()) + { + return; + } + + String name = matcher.group(1); + + Produce farmingContract = Produce.getByContractName(name); + + if (farmingContract == null) + { + return; + } + + Produce currentFarmingContract = contract; + + if (farmingContract == currentFarmingContract) + { + return; + } + + setContract(farmingContract); + } + + private void handleContractState() + { + if (contract == null) + { + summary = SummaryState.UNKNOWN; + return; + } + + PatchImplementation patchImplementation = contract.getPatchImplementation(); + + boolean hasEmptyPatch = false; + completionTime = Long.MAX_VALUE; + for (FarmingPatch patch : farmingWorld.getFarmingGuildRegion().getPatches()) + { + if (patch.getImplementation() != patchImplementation) + { + continue; + } + + PatchPrediction prediction = farmingTracker.predictPatch(patch); + if (prediction == null) + { + continue; + } + + Produce produce = prediction.getProduce(); + if (completionTime == Long.MAX_VALUE) + { + if (produce == null || produce == Produce.WEEDS) + { + summary = SummaryState.EMPTY; + hasEmptyPatch = true; + continue; + } + + if ((contract.requiresHealthCheck() && prediction.getCropState() == CropState.HARVESTABLE) + && !hasEmptyPatch) + { + summary = SummaryState.OCCUPIED; + } + } + + if (produce != contract) + { + if (!hasEmptyPatch && completionTime == Long.MAX_VALUE) + { + summary = SummaryState.OCCUPIED; + } + } + else + { + long estimatedTime = Math.min(prediction.getDoneEstimate(), completionTime); + + if (estimatedTime <= Instant.now().getEpochSecond()) + { + summary = SummaryState.COMPLETED; + completionTime = 0; + break; + } + else + { + summary = SummaryState.IN_PROGRESS; + completionTime = estimatedTime; + } + } + } + } + + + @Nullable + private Produce getStoredContract() + { + try + { + return Produce.getByItemID(Integer.parseInt(configManager.getConfiguration(getConfigGroup(), CONFIG_KEY_CONTRACT))); + } + catch (NumberFormatException ignored) + { + return null; + } + } + + private void setStoredContract(@Nullable Produce contract) + { + if (contract != null) + { + configManager.setConfiguration(getConfigGroup(), CONFIG_KEY_CONTRACT, String.valueOf(contract.getItemID())); + } + else + { + configManager.unsetConfiguration(getConfigGroup(), CONFIG_KEY_CONTRACT); + } + } + + @Nonnull + private String getConfigGroup() + { + return TimeTrackingConfig.CONFIG_GROUP + "." + client.getUsername(); + } +} 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 fa6852082d..f51bc9af8e 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,6 +34,7 @@ import java.util.List; import java.util.Set; import javax.swing.JLabel; import javax.swing.border.EmptyBorder; +import net.runelite.api.ItemID; import net.runelite.client.game.ItemManager; import net.runelite.client.plugins.timetracking.TabContentPanel; import net.runelite.client.plugins.timetracking.TimeTrackingConfig; @@ -47,18 +48,21 @@ public class FarmingTabPanel extends TabContentPanel private final ItemManager itemManager; private final TimeTrackingConfig config; private final List> patchPanels; + private final FarmingContractManager farmingContractManager; FarmingTabPanel( FarmingTracker farmingTracker, ItemManager itemManager, TimeTrackingConfig config, - Set patches + Set patches, + FarmingContractManager farmingContractManager ) { this.farmingTracker = farmingTracker; this.itemManager = itemManager; this.config = config; this.patchPanels = new ArrayList<>(); + this.farmingContractManager = farmingContractManager; setLayout(new GridBagLayout()); setBackground(ColorScheme.DARK_GRAY_COLOR); @@ -187,6 +191,17 @@ public class FarmingTabPanel extends TabContentPanel { panel.getProgress().setVisible(false); } + JLabel farmingContractIcon = panel.getFarmingContractIcon(); + if (farmingContractManager.shouldHighlightFarmingTabPanel(patch)) + { + itemManager.getImage(ItemID.SEED_PACK).addTo(farmingContractIcon); + farmingContractIcon.setToolTipText(farmingContractManager.getContract().getName()); + } + else + { + farmingContractIcon.setIcon(null); + farmingContractIcon.setToolTipText(""); + } } } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingTracker.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingTracker.java index ec32d63379..c45a9309d7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingTracker.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingTracker.java @@ -70,9 +70,9 @@ public class FarmingTracker } - public FarmingTabPanel createTabPanel(Tab tab) + public FarmingTabPanel createTabPanel(Tab tab, FarmingContractManager farmingContractManager) { - return new FarmingTabPanel(this, itemManager, config, farmingWorld.getTabs().get(tab)); + return new FarmingTabPanel(this, itemManager, config, farmingWorld.getTabs().get(tab), farmingContractManager); } /** diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingWorld.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingWorld.java index 4683f2feb9..51a08292fb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingWorld.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingWorld.java @@ -52,6 +52,9 @@ class FarmingWorld .thenComparing((FarmingPatch p) -> p.getRegion().getName()) .thenComparing(FarmingPatch::getName); + @Getter + private final FarmingRegion farmingGuildRegion; + FarmingWorld() { // Some of these patches get updated in multiple regions. @@ -229,7 +232,7 @@ class FarmingWorld new FarmingPatch("Hespori", Varbits.FARMING_7908, PatchImplementation.HESPORI) )); - add(new FarmingRegion("Farming Guild", 4922, + add(farmingGuildRegion = new FarmingRegion("Farming Guild", 4922, new FarmingPatch("", Varbits.FARMING_7905, PatchImplementation.TREE), new FarmingPatch("", Varbits.FARMING_4775, PatchImplementation.HERB), new FarmingPatch("", Varbits.FARMING_4772, PatchImplementation.BUSH), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java index bcb4e5ab0b..e80912552c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/Produce.java @@ -25,6 +25,7 @@ */ package net.runelite.client.plugins.timetracking.farming; +import javax.annotation.Nullable; import lombok.Getter; import lombok.RequiredArgsConstructor; import net.runelite.api.ItemID; @@ -38,30 +39,30 @@ public enum Produce SCARECROW("Scarecrow", ItemID.SCARECROW, 5, 4), // Allotment crops - POTATO("Potato", ItemID.POTATO, 10, 5, 0, 3), - ONION("Onion", ItemID.ONION, 10, 5, 0, 3), - CABBAGE("Cabbage", ItemID.CABBAGE, 10, 5, 0, 3), - TOMATO("Tomato", ItemID.TOMATO, 10, 5, 0, 3), - SWEETCORN("Sweetcorn", ItemID.SWEETCORN, 10, 6, 0, 3), - STRAWBERRY("Strawberry", ItemID.STRAWBERRY, 10, 7, 0, 3), - WATERMELON("Watermelon", ItemID.WATERMELON, 10, 8, 0, 3), - SNAPE_GRASS("Snape grass", ItemID.SNAPE_GRASS, 10, 8, 0, 3), + POTATO("Potato", "Potatoes", PatchImplementation.ALLOTMENT, ItemID.POTATO, 10, 5, 0, 3), + ONION("Onion", "Onions", PatchImplementation.ALLOTMENT, ItemID.ONION, 10, 5, 0, 3), + CABBAGE("Cabbage", "Cabbages", PatchImplementation.ALLOTMENT, ItemID.CABBAGE, 10, 5, 0, 3), + TOMATO("Tomato", "Tomatoes", PatchImplementation.ALLOTMENT, ItemID.TOMATO, 10, 5, 0, 3), + SWEETCORN("Sweetcorn", PatchImplementation.ALLOTMENT, ItemID.SWEETCORN, 10, 6, 0, 3), + STRAWBERRY("Strawberry", "Strawberries", PatchImplementation.ALLOTMENT, ItemID.STRAWBERRY, 10, 7, 0, 3), + WATERMELON("Watermelon", "Watermelons", PatchImplementation.ALLOTMENT, ItemID.WATERMELON, 10, 8, 0, 3), + SNAPE_GRASS("Snape grass", PatchImplementation.ALLOTMENT, ItemID.SNAPE_GRASS, 10, 8, 0, 3), // Flower crops - MARIGOLD("Marigold", ItemID.MARIGOLDS, 5, 5), - ROSEMARY("Rosemary", ItemID.ROSEMARY, 5, 5), - NASTURTIUM("Nasturtium", ItemID.NASTURTIUMS, 5, 5), - WOAD("Woad", ItemID.WOAD_LEAF, 5, 5), - LIMPWURT("Limpwurt", ItemID.LIMPWURT_ROOT, 5, 5), - WHITE_LILY("While lily", ItemID.WHITE_LILY, 5, 5), + MARIGOLD("Marigold", "Marigolds", PatchImplementation.FLOWER, ItemID.MARIGOLDS, 5, 5), + ROSEMARY("Rosemary", PatchImplementation.FLOWER, ItemID.ROSEMARY, 5, 5), + NASTURTIUM("Nasturtium", "Nasturtiums", PatchImplementation.FLOWER, ItemID.NASTURTIUMS, 5, 5), + WOAD("Woad", PatchImplementation.FLOWER, ItemID.WOAD_LEAF, 5, 5), + LIMPWURT("Limpwurt", "Limpwurt roots", PatchImplementation.FLOWER, ItemID.LIMPWURT_ROOT, 5, 5), + WHITE_LILY("White lily", "White lillies", PatchImplementation.FLOWER, ItemID.WHITE_LILY, 5, 5), // Bush crops - REDBERRIES("Redberry", ItemID.REDBERRIES, 20, 6, 20, 5), - CADAVABERRIES("Cadavaberry", ItemID.CADAVA_BERRIES, 20, 7, 20, 5), - DWELLBERRIES("Dwellberry", ItemID.DWELLBERRIES, 20, 8, 20, 5), - JANGERBERRIES("Jangerberry", ItemID.JANGERBERRIES, 20, 9, 20, 5), - WHITEBERRIES("Whiteberry", ItemID.WHITE_BERRIES, 20, 9, 20, 5), - POISON_IVY("Poison", ItemID.POISON_IVY_BERRIES, 20, 9, 20, 5), + REDBERRIES("Redberry", "Redberries", PatchImplementation.BUSH, ItemID.REDBERRIES, 20, 6, 20, 5), + CADAVABERRIES("Cadavaberry", "Cadava berries", PatchImplementation.BUSH, ItemID.CADAVA_BERRIES, 20, 7, 20, 5), + DWELLBERRIES("Dwellberry", "Dwellberries", PatchImplementation.BUSH, ItemID.DWELLBERRIES, 20, 8, 20, 5), + JANGERBERRIES("Jangerberry", "Jangerberries", PatchImplementation.BUSH, ItemID.JANGERBERRIES, 20, 9, 20, 5), + WHITEBERRIES("Whiteberry", "White berries", PatchImplementation.BUSH, ItemID.WHITE_BERRIES, 20, 9, 20, 5), + POISON_IVY("Poison", "Poison ivy berries", PatchImplementation.BUSH, ItemID.POISON_IVY_BERRIES, 20, 9, 20, 5), // Hop crops BARLEY("Barley", ItemID.BARLEY, 10, 5, 0, 3), @@ -73,43 +74,43 @@ public enum Produce WILDBLOOD("Wildblood", ItemID.WILDBLOOD_HOPS, 10, 9, 0, 3), // Herb crops - GUAM("Guam", ItemID.GUAM_LEAF, 20, 5, 0, 3), - MARRENTILL("Marrentill", ItemID.MARRENTILL, 20, 5, 0, 3), - TARROMIN("Tarromin", ItemID.TARROMIN, 20, 5, 0, 3), - HARRALANDER("Harralander", ItemID.HARRALANDER, 20, 5, 0, 3), - RANARR("Ranarr", ItemID.RANARR_WEED, 20, 5, 0, 3), - TOADFLAX("Toadflax", ItemID.TOADFLAX, 20, 5, 0, 3), - IRIT("Irit", ItemID.IRIT_LEAF, 20, 5, 0, 3), - AVANTOE("Avantoe", ItemID.AVANTOE, 20, 5, 0, 3), - KWUARM("Kwuarm", ItemID.KWUARM, 20, 5, 0, 3), - SNAPDRAGON("Snapdragon", ItemID.SNAPDRAGON, 20, 5, 0, 3), - CADANTINE("Cadantine", ItemID.CADANTINE, 20, 5, 0, 3), - LANTADYME("Lantadyme", ItemID.LANTADYME, 20, 5, 0, 3), - DWARF_WEED("Dwarf Weed", ItemID.DWARF_WEED, 20, 5, 0, 3), - TORSTOL("Torstol", ItemID.TORSTOL, 20, 5, 0, 3), - GOUTWEED("Goutweed", ItemID.GOUTWEED, 20, 5, 0, 2), - ANYHERB("Any herb", ItemID.GUAM_LEAF, 20, 5, 0, 3), + GUAM("Guam", PatchImplementation.HERB, ItemID.GUAM_LEAF, 20, 5, 0, 3), + MARRENTILL("Marrentill", PatchImplementation.HERB, ItemID.MARRENTILL, 20, 5, 0, 3), + TARROMIN("Tarromin", PatchImplementation.HERB, ItemID.TARROMIN, 20, 5, 0, 3), + HARRALANDER("Harralander", PatchImplementation.HERB, ItemID.HARRALANDER, 20, 5, 0, 3), + RANARR("Ranarr", PatchImplementation.HERB, ItemID.RANARR_WEED, 20, 5, 0, 3), + TOADFLAX("Toadflax", PatchImplementation.HERB, ItemID.TOADFLAX, 20, 5, 0, 3), + IRIT("Irit", PatchImplementation.HERB, ItemID.IRIT_LEAF, 20, 5, 0, 3), + AVANTOE("Avantoe", PatchImplementation.HERB, ItemID.AVANTOE, 20, 5, 0, 3), + KWUARM("Kwuarm", PatchImplementation.HERB, ItemID.KWUARM, 20, 5, 0, 3), + SNAPDRAGON("Snapdragon", PatchImplementation.HERB, ItemID.SNAPDRAGON, 20, 5, 0, 3), + CADANTINE("Cadantine", PatchImplementation.HERB, ItemID.CADANTINE, 20, 5, 0, 3), + LANTADYME("Lantadyme", PatchImplementation.HERB, ItemID.LANTADYME, 20, 5, 0, 3), + DWARF_WEED("Dwarf Weed", PatchImplementation.HERB, ItemID.DWARF_WEED, 20, 5, 0, 3), + TORSTOL("Torstol", PatchImplementation.HERB, ItemID.TORSTOL, 20, 5, 0, 3), + GOUTWEED("Goutweed", PatchImplementation.HERB, ItemID.GOUTWEED, 20, 5, 0, 2), + ANYHERB("Any herb", PatchImplementation.HERB, ItemID.GUAM_LEAF, 20, 5, 0, 3), // Tree crops - OAK("Oak", ItemID.OAK_LOGS, 40, 5), - WILLOW("Willow", ItemID.WILLOW_LOGS, 40, 7), - MAPLE("Maple", ItemID.MAPLE_LOGS, 40, 9), - YEW("Yew", ItemID.YEW_LOGS, 40, 11), - MAGIC("Magic", ItemID.MAGIC_LOGS, 40, 13), + OAK("Oak", "Oak tree", PatchImplementation.TREE, ItemID.OAK_LOGS, 40, 5), + WILLOW("Willow", "Willow tree", PatchImplementation.TREE, ItemID.WILLOW_LOGS, 40, 7), + MAPLE("Maple", "Maple tree", PatchImplementation.TREE, ItemID.MAPLE_LOGS, 40, 9), + YEW("Yew", "Yew tree", PatchImplementation.TREE, ItemID.YEW_LOGS, 40, 11), + MAGIC("Magic", "Magic tree", PatchImplementation.TREE, ItemID.MAGIC_LOGS, 40, 13), // Fruit tree crops - APPLE("Apple", ItemID.COOKING_APPLE, 160, 7, 45, 7), - BANANA("Banana", ItemID.BANANA, 160, 7, 45, 7), - ORANGE("Orange", ItemID.ORANGE, 160, 7, 45, 7), - CURRY("Curry", ItemID.CURRY_LEAF, 160, 7, 45, 7), - PINEAPPLE("Pineapple", ItemID.PINEAPPLE, 160, 7, 45, 7), - PAPAYA("Papaya", ItemID.PAPAYA_FRUIT, 160, 7, 45, 7), - PALM("Palm", ItemID.COCONUT, 160, 7, 45, 7), - DRAGONFRUIT("Dragonfruit", ItemID.DRAGONFRUIT, 160, 7, 45, 7), + APPLE("Apple", "Apple tree", PatchImplementation.FRUIT_TREE, ItemID.COOKING_APPLE, 160, 7, 45, 7), + BANANA("Banana", "Banana tree", PatchImplementation.FRUIT_TREE, ItemID.BANANA, 160, 7, 45, 7), + ORANGE("Orange", "Orange tree", PatchImplementation.FRUIT_TREE, ItemID.ORANGE, 160, 7, 45, 7), + CURRY("Curry", "Curry tree", PatchImplementation.FRUIT_TREE, ItemID.CURRY_LEAF, 160, 7, 45, 7), + PINEAPPLE("Pineapple", "Pineapple plant", PatchImplementation.FRUIT_TREE, ItemID.PINEAPPLE, 160, 7, 45, 7), + PAPAYA("Papaya", "Papaya tree", PatchImplementation.FRUIT_TREE, ItemID.PAPAYA_FRUIT, 160, 7, 45, 7), + PALM("Palm", "Palm tree", PatchImplementation.FRUIT_TREE, ItemID.COCONUT, 160, 7, 45, 7), + DRAGONFRUIT("Dragonfruit", "Dragonfruit tree", PatchImplementation.FRUIT_TREE, ItemID.DRAGONFRUIT, 160, 7, 45, 7), // Cactus - CACTUS("Cactus", ItemID.CACTUS_SPINE, 80, 8, 20, 4), - POTATO_CACTUS("Potato cactus", ItemID.POTATO_CACTUS, 10, 8, 5, 7), + CACTUS("Cactus", PatchImplementation.CACTUS, ItemID.CACTUS_SPINE, 80, 8, 20, 4), + POTATO_CACTUS("Potato cactus", "Potato cacti", PatchImplementation.CACTUS, ItemID.POTATO_CACTUS, 10, 8, 5, 7), // Hardwood TEAK("Teak", ItemID.TEAK_LOGS, 560, 8), @@ -127,8 +128,8 @@ public enum Produce BELLADONNA("Belladonna", ItemID.CAVE_NIGHTSHADE, 80, 5), CALQUAT("Calquat", ItemID.CALQUAT_FRUIT, 160, 9, 0, 7), SPIRIT_TREE("Spirit tree", ItemID.SPIRIT_TREE, 320, 13), - CELASTRUS("Celastrus", ItemID.BATTLESTAFF, 160, 6, 0, 4), - REDWOOD("Redwood", ItemID.REDWOOD_LOGS, 640, 11), + CELASTRUS("Celastrus", "Celastrus tree", PatchImplementation.CELASTRUS, ItemID.BATTLESTAFF, 160, 6, 0, 4), + REDWOOD("Redwood", "Redwood tree", PatchImplementation.REDWOOD, ItemID.REDWOOD_LOGS, 640, 11), HESPORI("Hespori", NullItemID.NULL_23044, 640, 4, 0, 2), CRYSTAL_TREE("Crystal tree", ItemID.CRYSTAL_SHARDS, 80, 7); @@ -136,6 +137,14 @@ public enum Produce * User-visible name */ private final String name; + /** + * Farming contract names + */ + private final String contractName; + /** + * Patch type for the crop + */ + private final PatchImplementation patchImplementation; /** * User-visible item icon */ @@ -158,8 +167,68 @@ public enum Produce */ private final int harvestStages; + Produce(String name, int itemID, int tickrate, int stages, int regrowTickrate, int harvestStages) + { + this(name, name, null, itemID, tickrate, stages, regrowTickrate, harvestStages); + } + + Produce(String name, PatchImplementation patchImplementation, int itemID, int tickrate, int stages, int regrowTickrate, int harvestStages) + { + this(name, name, patchImplementation, itemID, tickrate, stages, regrowTickrate, harvestStages); + } + + Produce(String name, String contractName, PatchImplementation patchImplementation, int itemID, int tickrate, int stages) + { + this(name, contractName, patchImplementation, itemID, tickrate, stages, 0, 1); + } + + Produce(String name, PatchImplementation patchImplementation, int itemID, int tickrate, int stages) + { + this(name, name, patchImplementation, itemID, tickrate, stages, 0, 1); + } + Produce(String name, int itemID, int tickrate, int stages) { - this(name, itemID, tickrate, stages, 0, 1); + this(name, name, null, itemID, tickrate, stages, 0, 1); + } + + boolean requiresHealthCheck() + { + switch (this.patchImplementation) + { + case BUSH: + case TREE: + case CACTUS: + case REDWOOD: + case CELASTRUS: + return true; + } + return false; + } + + @Nullable + static Produce getByItemID(int itemId) + { + for (Produce produce : Produce.values()) + { + if (produce.getItemID() == itemId) + { + return produce; + } + } + return null; + } + + @Nullable + static Produce getByContractName(String contractName) + { + for (Produce produce : Produce.values()) + { + if (produce.getContractName().equalsIgnoreCase(contractName)) + { + return produce; + } + } + return null; } } From 221c89c7b2e1c8e1e2735cb480e1d6e7867a5291 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Mon, 8 Jun 2020 18:07:42 -0400 Subject: [PATCH 24/43] poh: Add portal icons for Arceuus teleports --- .../net/runelite/client/plugins/poh/PohIcons.java | 11 +++++++++++ .../runelite/client/plugins/poh/PohOverlay.java | 7 +++++-- .../client/plugins/poh/apeatolldungeon.png | Bin 0 -> 268 bytes .../net/runelite/client/plugins/poh/barrows.png | Bin 0 -> 266 bytes .../runelite/client/plugins/poh/battlefront.png | Bin 0 -> 266 bytes .../net/runelite/client/plugins/poh/cemetery.png | Bin 0 -> 265 bytes .../runelite/client/plugins/poh/draynormanor.png | Bin 0 -> 264 bytes .../client/plugins/poh/fenkenstrainscastle.png | Bin 0 -> 268 bytes .../runelite/client/plugins/poh/harmonyisland.png | Bin 0 -> 270 bytes .../client/plugins/poh/lumbridgegraveyard.png | Bin 0 -> 259 bytes .../net/runelite/client/plugins/poh/mindaltar.png | Bin 0 -> 261 bytes .../client/plugins/poh/salvegraveyard.png | Bin 0 -> 270 bytes .../runelite/client/plugins/poh/westardougne.png | Bin 0 -> 268 bytes 13 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/poh/apeatolldungeon.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/poh/barrows.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/poh/battlefront.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/poh/cemetery.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/poh/draynormanor.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/poh/fenkenstrainscastle.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/poh/harmonyisland.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/poh/lumbridgegraveyard.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/poh/mindaltar.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/poh/salvegraveyard.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/poh/westardougne.png diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohIcons.java b/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohIcons.java index d9ebe6754b..cd47e2e894 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohIcons.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohIcons.java @@ -54,6 +54,17 @@ public enum PohIcons CARRALLANGAR("carrallangar", CARRALLANGAR_PORTAL, CARRALLANGAR_PORTAL_33437, CARRALLANGAR_PORTAL_33440), CATHERBY("catherby", CATHERBY_PORTAL, CATHERBY_PORTAL_33435, CATHERBY_PORTAL_33438), WEISS("weiss", WEISS_PORTAL, WEISS_PORTAL_37593, WEISS_PORTAL_37605), + APEATOLLDUNGEON("apeatolldungeon", APE_ATOLL_DUNGEON_PORTAL, APE_ATOLL_DUNGEON_PORTAL_37604, APE_ATOLL_DUNGEON_PORTAL_37616), + BARROWS("barrows", BARROWS_PORTAL, BARROWS_PORTAL_37603, BARROWS_PORTAL_37615), + BATTLEFRONT("battlefront", BATTLEFRONT_PORTAL, BATTLEFRONT_PORTAL_37596, BATTLEFRONT_PORTAL_37608), + CEMETERY("cemetery", CEMETERY_PORTAL, CEMETERY_PORTAL_37602, CEMETERY_PORTAL_37614), + DRAYNORMANOR("draynormanor", DRAYNOR_MANOR_PORTAL, DRAYNOR_MANOR_PORTAL_37595, DRAYNOR_MANOR_PORTAL_37607), + FENKENSTRAINSCASTLE("fenkenstrainscastle", FENKENSTRAINS_CASTLE_PORTAL, FENKENSTRAINS_CASTLE_PORTAL_37599, FENKENSTRAINS_CASTLE_PORTAL_37611), + HARMONYISLAND("harmonyisland", HARMONY_ISLAND_PORTAL, HARMONY_ISLAND_PORTAL_37601, HARMONY_ISLAND_PORTAL_37613), + LUMBRIDGEGRAVEYARD("lumbridgegraveyard", LUMBRIDGE_GRAVEYARD_PORTAL, LUMBRIDGE_GRAVEYARD_PORTAL_37594, LUMBRIDGE_GRAVEYARD_PORTAL_37606), + MINDALTAR("mindaltar", MIND_ALTAR_PORTAL, MIND_ALTAR_PORTAL_37597, MIND_ALTAR_PORTAL_37609), + SALVEGRAVEYARD("salvegraveyard", SALVE_GRAVEYARD_PORTAL, SALVE_GRAVEYARD_PORTAL_37598, SALVE_GRAVEYARD_PORTAL_37610), + WESTARDOUGNE("westardougne", WEST_ARDOUGNE_PORTAL, WEST_ARDOUGNE_PORTAL_37600, WEST_ARDOUGNE_PORTAL_37612), ALTAR("altar", ALTAR_13179, ALTAR_13180, ALTAR_13181, ALTAR_13182, ALTAR_13183, ALTAR_13184, ALTAR_13185, ALTAR_13186, ALTAR_13187, ALTAR_13188, ALTAR_13189, ALTAR_13190, ALTAR_13191, ALTAR_13192, ALTAR_13193, ALTAR_13194, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohOverlay.java index b9870ff737..717071b866 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohOverlay.java @@ -44,8 +44,11 @@ public class PohOverlay extends Overlay { PohIcons.LUMBRIDGE, PohIcons.FALADOR, PohIcons.VARROCK, PohIcons.CAMELOT, PohIcons.ARDOUGNE, PohIcons.YANILLE, PohIcons.LUNARISLE, PohIcons.WATERBIRTH, PohIcons.FISHINGGUILD, - PohIcons.SENNTISTEN, PohIcons.KHARYLL, PohIcons.ANNAKARL, PohIcons.KOUREND, PohIcons.MARIM, PohIcons.TROLLSTRONGHOLD, PohIcons.CARRALLANGAR, PohIcons.CATHERBY, PohIcons.WEISS, PohIcons.GHORROCK - + PohIcons.SENNTISTEN, PohIcons.KHARYLL, PohIcons.ANNAKARL, PohIcons.KOUREND, PohIcons.MARIM, + PohIcons.TROLLSTRONGHOLD, PohIcons.CARRALLANGAR, PohIcons.CATHERBY, PohIcons.WEISS, PohIcons.GHORROCK, + PohIcons.APEATOLLDUNGEON, PohIcons.BARROWS, PohIcons.BATTLEFRONT, PohIcons.CEMETERY, PohIcons.DRAYNORMANOR, + PohIcons.FENKENSTRAINSCASTLE, PohIcons.HARMONYISLAND, PohIcons.LUMBRIDGEGRAVEYARD, PohIcons.MINDALTAR, PohIcons.SALVEGRAVEYARD, + PohIcons.WESTARDOUGNE, }; private static final int MAX_DISTANCE = 2350; diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/poh/apeatolldungeon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/poh/apeatolldungeon.png new file mode 100644 index 0000000000000000000000000000000000000000..b83aa0bc08bd65f1b25865a5e83c0e08b494efad GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>lU zE{-7@6MKWaxta|GYFFBKeB*e>a(CB9A0O-758%Q&Y9`w}m(hR$>{<==?{2YhS@L? N@O1TaS?83{1OVPCWM=>X literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/poh/barrows.png b/runelite-client/src/main/resources/net/runelite/client/plugins/poh/barrows.png new file mode 100644 index 0000000000000000000000000000000000000000..696c1a0cf6848ee055b9e32f43156e1e6d377a01 GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>l4w^BqzUk$I!P@GHl=SvPXc_qM3aJ0#G5<%`r?RhvfkiF!V#iWjOXOn9ZD za=;+}8KVQsQjriZM?<^bF1_WYo~z_<`a3ZM92Qy3z!0}Ih^y+}yK`~(OgVO1owzk? zOWd4^TT8cuKR#CB7^Q!t;^CS7`lnuA?Au|JcEp0=#?3sli6JtcNB6qS`w+h*TlMwb zJu6;*Y}k|i!P0q^{LIUbweH2AU$%TtcFsgb?wz@gyqB$CUDM}$$og+{xDO+z!*QTL O7(8A5T-G@yGywnxL1{Js literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/poh/battlefront.png b/runelite-client/src/main/resources/net/runelite/client/plugins/poh/battlefront.png new file mode 100644 index 0000000000000000000000000000000000000000..696c1a0cf6848ee055b9e32f43156e1e6d377a01 GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>l4w^BqzUk$I!P@GHl=SvPXc_qM3aJ0#G5<%`r?RhvfkiF!V#iWjOXOn9ZD za=;+}8KVQsQjriZM?<^bF1_WYo~z_<`a3ZM92Qy3z!0}Ih^y+}yK`~(OgVO1owzk? zOWd4^TT8cuKR#CB7^Q!t;^CS7`lnuA?Au|JcEp0=#?3sli6JtcNB6qS`w+h*TlMwb zJu6;*Y}k|i!P0q^{LIUbweH2AU$%TtcFsgb?wz@gyqB$CUDM}$$og+{xDO+z!*QTL O7(8A5T-G@yGywnxL1{Js literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/poh/cemetery.png b/runelite-client/src/main/resources/net/runelite/client/plugins/poh/cemetery.png new file mode 100644 index 0000000000000000000000000000000000000000..64d5571c15cfa43505000153e14cc8298fa4b581 GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>l#7lkLOBWij#v6G) z|NJakp<&U=l^I!FKOZZ+tda}8l&k+wiK*dT+XQZg4JSfOO!vO$KR->2bKR=;C0Zw= z9(x8&Js25lIx#(Et>VP=d)50^WUM+9&C+n!F1@yI$F?dxwJ2^DhR-z{zg3(u*?GH3 zV1A#+)Fb+BCAYcX_bLA@*u7(Bkm_<3_Jg6fo8GnMua4f|a+tmTM7W`$Tjn~THyAu! L{an^LB{Ts5?4D&m literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/poh/draynormanor.png b/runelite-client/src/main/resources/net/runelite/client/plugins/poh/draynormanor.png new file mode 100644 index 0000000000000000000000000000000000000000..5ade949f892b48f5d0642cec80a00512ef05d901 GIT binary patch literal 264 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>lbW@GZ_pWv7p_A4~eVZ=8kaG8z2E&1*peQkulD!+npG)RkZ+(2> zYsG!}UH5WaFGTJ(oOr>c_lQf4H$_m}Si`hvmJ L)z4*}Q$iB}cx-8r literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/poh/fenkenstrainscastle.png b/runelite-client/src/main/resources/net/runelite/client/plugins/poh/fenkenstrainscastle.png new file mode 100644 index 0000000000000000000000000000000000000000..06cca2eac1120afd5da3f79400bd7c129cc687c7 GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>lU zE{-7@6Q>59=503MsnxXCydbzk@!(W$Z;_S3AuE&>uQjMzIkGFtXsNzyT;`=9_;zwl z!MyqNh1owSyp8hOJ*}qZh3H*9E7gnrZ`2hTIubtxGBm_4-;(|EYeiIgVerAHS&FN; zgS?^yueN?)7jJ${ILJ%rai{3*cB`44mW$?ypQtP>npSYz@PtKE&wI5ZtAEV_1!1q@on|z?W{|=Cb#uR&3+}FVusgRK7P%zJ9jFyWy*eiF@47ewuv(WS8opy+yL|m NgQu&X%Q~loCIAX8WDo!V literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/poh/harmonyisland.png b/runelite-client/src/main/resources/net/runelite/client/plugins/poh/harmonyisland.png new file mode 100644 index 0000000000000000000000000000000000000000..01e32ea4b4a48c241739c87e141367088c39983e GIT binary patch literal 270 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>lLZ-qiVy-;~cxmipH2ey-Av#{^UEyjHj} zdClIpvrows20y&*yh#3LR{yM;eer_Rc3MWOFqbWP)+Dj4|LWrSM~9?y-2FRWc-5Ez P{lehs>gTe~DWM4fH2-85 literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/poh/lumbridgegraveyard.png b/runelite-client/src/main/resources/net/runelite/client/plugins/poh/lumbridgegraveyard.png new file mode 100644 index 0000000000000000000000000000000000000000..4c8a1578e268e40442e01345fc8167734c8ebe0f GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>l8AGcoM!eEh?9*Ws2-Ymc7zYFB%Raq~;c2b6kt-zJ) z?|%M`3|y)!1134uNQuOrPxIWBbtB%1;XN&SjI{BSrfp@&YngXJ9kFlb8U>zn70WrB%e^aazx&-^s@XpnK4-XS9u9pT2=oAhr>mdKI;Vst E0KFGrz5oCK literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/poh/mindaltar.png b/runelite-client/src/main/resources/net/runelite/client/plugins/poh/mindaltar.png new file mode 100644 index 0000000000000000000000000000000000000000..4c8936f022aa86ccc68f056a1a954ea63f49abad GIT binary patch literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>lIy!(wwui45@axkou4;Eoa2=|O~o`2oi>T%S=71=F|R-X9X8KK!R zwQ0}%6&b5it}Tr=sI+%|{npi0^1AZ9cd9`$3@NYkmOsuhxjFL#Pvr`cd%jz~`l;NK ziqZaK@?=+|t7P-c?5!z}qFiGbZvUC&UGVpZ?AQDHmWOz_%LAo!UKE`GdV#^y)z4*} HQ$iB}=Eh~z literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/poh/salvegraveyard.png b/runelite-client/src/main/resources/net/runelite/client/plugins/poh/salvegraveyard.png new file mode 100644 index 0000000000000000000000000000000000000000..9dc9a999d5fdbee3d2b1f4db6bd00772e5015e60 GIT binary patch literal 270 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>l3$^$!Yt{K8@OC8xQfKd5@& z+PZ#yEW68sTWuk?19bEjFS&hm*OJ|ie_UA@?)GmKU`Pn{+{(LG-oI@6HC3loJf5Kw z42`WlLtWBKvy{%Cm@(63o?-RR0PFi3b>Hz@KD+)T$9|iVp7yUN0erz*K3tua!kwvI zS)H81FyXoIrCmq#+e^$jwz+%T-CLixY>Qs)q-KtlxsKl-Z@;=WUg!|}oZJM%_fO^h QfPP`{boFyt=akR{02#n#82|tP literal 0 HcmV?d00001 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/poh/westardougne.png b/runelite-client/src/main/resources/net/runelite/client/plugins/poh/westardougne.png new file mode 100644 index 0000000000000000000000000000000000000000..c40f91499b3d01e3e256415c9b60c7385541212d GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^d>}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>lU zE{-7@6MKUk`I;33WY%1CxuyPPO}Vgr;G}(v6l*7al>WsTpK$(fQ-uL*RfeMI5i3s4 z4c5jf5ef{aW-goaGQgH^Ql5D6l|^|c^^_PomT^yIV3;TL)aU%)4LiJ7F|Awu+~PZP zT>tZBv)ND04D-sGw6uHalrK$PG1~?1%u>yB-G5EEb=DIL$G+eI6*I4A_b(Z>%c#rr z%@p-GE#n#b;PztIyOUg3wbks37kr++`@dqOK)P3%qsiUpEB`M`;msH2@$)ge@o+iN OCk&phelF{r5}E*5OJ&0V literal 0 HcmV?d00001 From 48e62c66ae9a41a01dca39686ccca8c09771890f Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Mon, 8 Jun 2020 18:08:47 -0400 Subject: [PATCH 25/43] agility plugin: add reset option to overlay --- .../client/plugins/agility/AgilityPlugin.java | 15 +++++++++++++++ .../client/plugins/agility/LapCounterOverlay.java | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityPlugin.java index 6752fbfdf4..b0aecc8234 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityPlugin.java @@ -37,6 +37,7 @@ import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; import net.runelite.api.ItemID; import static net.runelite.api.ItemID.AGILITY_ARENA_TICKET; +import net.runelite.api.MenuAction; import net.runelite.api.Player; import net.runelite.api.Skill; import static net.runelite.api.Skill.AGILITY; @@ -65,6 +66,7 @@ import net.runelite.client.Notifier; import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.events.ConfigChanged; +import net.runelite.client.events.OverlayMenuClicked; import net.runelite.client.game.AgilityShortcut; import net.runelite.client.game.ItemManager; import net.runelite.client.plugins.Plugin; @@ -73,6 +75,7 @@ import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.xptracker.XpTrackerPlugin; import net.runelite.client.plugins.xptracker.XpTrackerService; import net.runelite.client.ui.overlay.OverlayManager; +import net.runelite.client.ui.overlay.OverlayMenuEntry; import net.runelite.client.ui.overlay.infobox.InfoBoxManager; @PluginDescriptor( @@ -157,6 +160,18 @@ public class AgilityPlugin extends Plugin stickTile = null; } + @Subscribe + public void onOverlayMenuClicked(OverlayMenuClicked overlayMenuClicked) + { + OverlayMenuEntry overlayMenuEntry = overlayMenuClicked.getEntry(); + if (overlayMenuEntry.getMenuAction() == MenuAction.RUNELITE_OVERLAY + && overlayMenuClicked.getOverlay() == lapCounterOverlay + && overlayMenuClicked.getEntry().getOption().equals(LapCounterOverlay.AGILITY_RESET)) + { + session = null; + } + } + @Subscribe public void onGameStateChanged(GameStateChanged event) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/LapCounterOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/LapCounterOverlay.java index 15ae21223d..e1e8863fbf 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/LapCounterOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/LapCounterOverlay.java @@ -29,6 +29,7 @@ import java.awt.Graphics2D; import java.time.Duration; import java.time.Instant; import javax.inject.Inject; +import static net.runelite.api.MenuAction.RUNELITE_OVERLAY; import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG; import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE; import net.runelite.client.ui.overlay.OverlayMenuEntry; @@ -39,6 +40,8 @@ import net.runelite.client.ui.overlay.components.LineComponent; class LapCounterOverlay extends OverlayPanel { + static final String AGILITY_RESET = "Reset"; + private final AgilityPlugin plugin; private final AgilityConfig config; @@ -51,6 +54,7 @@ class LapCounterOverlay extends OverlayPanel this.plugin = plugin; this.config = config; getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY_CONFIG, OPTION_CONFIGURE, "Agility overlay")); + getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY, AGILITY_RESET, "Agility overlay")); } @Override From 3379494a67aaf7db4e1d952255c581ba2592dee0 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Thu, 4 Jun 2020 22:27:51 -0700 Subject: [PATCH 26/43] util: Add removeFormattingTags text function --- .../client/plugins/emojis/EmojiPlugin.java | 30 ++----------------- .../java/net/runelite/client/util/Text.java | 27 +++++++++++++++++ .../net/runelite/client/util/TextTest.java | 14 +++++++++ 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/emojis/EmojiPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/emojis/EmojiPlugin.java index 06b97428bb..e63a97c3cc 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/emojis/EmojiPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/emojis/EmojiPlugin.java @@ -26,7 +26,6 @@ package net.runelite.client.plugins.emojis; import java.awt.image.BufferedImage; import java.util.Arrays; -import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.annotation.Nullable; import javax.inject.Inject; @@ -46,6 +45,7 @@ import net.runelite.client.eventbus.Subscribe; import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.util.ImageUtil; +import net.runelite.client.util.Text; @PluginDescriptor( name = "Emojis", @@ -55,7 +55,6 @@ import net.runelite.client.util.ImageUtil; @Slf4j public class EmojiPlugin extends Plugin { - private static final Pattern TAG_REGEXP = Pattern.compile("<[^>]*>"); private static final Pattern WHITESPACE_REGEXP = Pattern.compile("[\\s\\u00A0]"); @Inject @@ -179,7 +178,7 @@ public class EmojiPlugin extends Plugin for (int i = 0; i < messageWords.length; i++) { // Remove tags except for and - final String trigger = removeTags(messageWords[i]); + final String trigger = Text.removeFormattingTags(messageWords[i]); final Emoji emoji = Emoji.getEmoji(trigger); if (emoji == null) @@ -201,29 +200,4 @@ public class EmojiPlugin extends Plugin return Strings.join(messageWords, " "); } - - /** - * Remove tags, except for <lt> and <gt> - * - * @return - */ - private static String removeTags(String str) - { - StringBuffer stringBuffer = new StringBuffer(); - Matcher matcher = TAG_REGEXP.matcher(str); - while (matcher.find()) - { - matcher.appendReplacement(stringBuffer, ""); - String match = matcher.group(0); - switch (match) - { - case "": - case "": - stringBuffer.append(match); - break; - } - } - matcher.appendTail(stringBuffer); - return stringBuffer.toString(); - } } diff --git a/runelite-client/src/main/java/net/runelite/client/util/Text.java b/runelite-client/src/main/java/net/runelite/client/util/Text.java index 6fc303a97e..b98b8dbe8e 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/Text.java +++ b/runelite-client/src/main/java/net/runelite/client/util/Text.java @@ -30,6 +30,7 @@ import com.google.common.base.Joiner; import com.google.common.base.Splitter; import java.util.Collection; import java.util.List; +import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.text.WordUtils; import org.apache.commons.text.similarity.JaroWinklerDistance; @@ -83,6 +84,32 @@ public class Text return TAG_REGEXP.matcher(str).replaceAll(""); } + /** + * Remove tags from the given string, except for <lt> and <gt> + * + * @param str The string to remove formatting tags from. + * @return The given string with all formatting tags removed from it. + */ + public static String removeFormattingTags(String str) + { + StringBuffer stringBuffer = new StringBuffer(); + Matcher matcher = TAG_REGEXP.matcher(str); + while (matcher.find()) + { + matcher.appendReplacement(stringBuffer, ""); + String match = matcher.group(0); + switch (match) + { + case "": + case "": + stringBuffer.append(match); + break; + } + } + matcher.appendTail(stringBuffer); + return stringBuffer.toString(); + } + /** * In addition to removing all tags, replaces nbsp with space, trims string and lowercases it * @param str The string to standardize diff --git a/runelite-client/src/test/java/net/runelite/client/util/TextTest.java b/runelite-client/src/test/java/net/runelite/client/util/TextTest.java index af5815b0a3..f4aa704684 100644 --- a/runelite-client/src/test/java/net/runelite/client/util/TextTest.java +++ b/runelite-client/src/test/java/net/runelite/client/util/TextTest.java @@ -39,7 +39,21 @@ public class TextTest assertEquals("Not so much.", Text.removeTags("Not so much.")); assertEquals("Use Item -> Man", Text.removeTags("Use Item -> Man")); assertEquals("a < b", Text.removeTags("a < b")); + assertEquals("a b", Text.removeTags("a b")); assertEquals("Remove no tags", Text.removeTags("Remove no tags")); } + @Test + public void removeFormattingTags() + { + assertEquals("Test", Text.removeFormattingTags("Test")); + assertEquals("Test", Text.removeFormattingTags("Test")); + assertEquals("Zezima (level-126)", Text.removeFormattingTags("Zezima (level-126)")); + assertEquals("", Text.removeFormattingTags("")); + assertEquals("Not so much.", Text.removeFormattingTags("Not so much.")); + assertEquals("Use Item -> Man", Text.removeFormattingTags("Use Item -> Man")); + assertEquals("a < b", Text.removeFormattingTags("a < b")); + assertEquals("a b", Text.removeFormattingTags("a b")); + assertEquals("Remove no tags", Text.removeFormattingTags("Remove no tags")); + } } From bd116e99e64c3ddc4566eaa323d262ac7b7096c5 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Thu, 4 Jun 2020 22:31:01 -0700 Subject: [PATCH 27/43] chatnotifications: Add notification for broadcast messages --- .../ChatNotificationsConfig.java | 11 +++++++++++ .../ChatNotificationsPlugin.java | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsConfig.java index ff1c45e2e9..8ef956df8d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsConfig.java @@ -97,4 +97,15 @@ public interface ChatNotificationsConfig extends Config { return false; } + + @ConfigItem( + position = 6, + keyName = "notifyOnBroadcast", + name = "Notify on broadcast", + description = "Notifies you whenever you receive a broadcast message" + ) + default boolean notifyOnBroadcast() + { + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java index f4dcab1ea5..dc663ca462 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java @@ -144,6 +144,22 @@ public class ChatNotificationsPlugin extends Plugin notifier.notify(chatMessage.getMessage()); } break; + case BROADCAST: + if (config.notifyOnBroadcast()) + { + // Some broadcasts have links attached, notated by `|` followed by a number, while others contain color tags. + // We don't want to see either in the printed notification. + String broadcast = chatMessage.getMessage(); + + int urlTokenIndex = broadcast.lastIndexOf('|'); + if (urlTokenIndex != -1) + { + broadcast = broadcast.substring(0, urlTokenIndex); + } + + notifier.notify(Text.removeFormattingTags(broadcast)); + } + break; case CONSOLE: // Don't notify for notification messages if (chatMessage.getName().equals(RuneLiteProperties.getTitle())) From 66ca5a74eb72bcabbcf4b0084150503cddac9f3d Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 8 Jun 2020 22:10:14 -0400 Subject: [PATCH 28/43] api: add spawn time to tileitem --- runelite-api/src/main/java/net/runelite/api/TileItem.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runelite-api/src/main/java/net/runelite/api/TileItem.java b/runelite-api/src/main/java/net/runelite/api/TileItem.java index 8c1b08541e..87d820241c 100644 --- a/runelite-api/src/main/java/net/runelite/api/TileItem.java +++ b/runelite-api/src/main/java/net/runelite/api/TileItem.java @@ -36,4 +36,10 @@ public interface TileItem extends Renderable int getId(); int getQuantity(); + + /** + * Time in game ticks when the item spawned (relative to us) + * @return + */ + int getSpawnTime(); } From 4b4720751c6845d11219ac6d3351b8377464e98b Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Wed, 27 May 2020 21:29:06 -0700 Subject: [PATCH 29/43] infoboxmanager: Test infoboxes with same plugin and priority See: 406c2bc7dbb8b9db70e8e525fb51aad5f3f56e0d --- .../overlay/infobox/InfoBoxManagerTest.java | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/test/java/net/runelite/client/ui/overlay/infobox/InfoBoxManagerTest.java b/runelite-client/src/test/java/net/runelite/client/ui/overlay/infobox/InfoBoxManagerTest.java index ee968280b7..e0ce1e6a6e 100644 --- a/runelite-client/src/test/java/net/runelite/client/ui/overlay/infobox/InfoBoxManagerTest.java +++ b/runelite-client/src/test/java/net/runelite/client/ui/overlay/infobox/InfoBoxManagerTest.java @@ -40,6 +40,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; import org.mockito.junit.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) @@ -60,16 +61,31 @@ public class InfoBoxManagerTest private static class TestInfobox extends InfoBox { - public TestInfobox(InfoBoxPriority infoBoxPriority) + private static final Plugin PLUGIN = mock(Plugin.class); + + static { - super(null, mock(Plugin.class)); + when(PLUGIN.getName()).thenReturn(""); + } + + private final String text; + + private TestInfobox(InfoBoxPriority infoBoxPriority) + { + this(infoBoxPriority, null); + } + + private TestInfobox(InfoBoxPriority infoBoxPriority, String text) + { + super(null, PLUGIN); setPriority(infoBoxPriority); + this.text = text; } @Override public String getText() { - return null; + return text; } @Override @@ -89,4 +105,14 @@ public class InfoBoxManagerTest List order = infoBoxManager.getInfoBoxes().stream().map(InfoBox::getPriority).collect(Collectors.toList()); assertEquals(Arrays.asList(InfoBoxPriority.HIGH, InfoBoxPriority.MED, InfoBoxPriority.LOW), order); } + + @Test + public void testSamePluginAndPriority() + { + infoBoxManager.addInfoBox(new TestInfobox(InfoBoxPriority.MED, "one")); + infoBoxManager.addInfoBox(new TestInfobox(InfoBoxPriority.MED, "two")); + infoBoxManager.addInfoBox(new TestInfobox(InfoBoxPriority.MED, "three")); + + assertEquals(3, infoBoxManager.getInfoBoxes().size()); + } } \ No newline at end of file From db46662b1d7678eaa9ea0f9cbb9a1a6255da96a2 Mon Sep 17 00:00:00 2001 From: emerald000 Date: Tue, 9 Jun 2020 15:39:49 -0400 Subject: [PATCH 30/43] worldmap: Fix Asgarnian Ice Dungeon spelling (#11864) --- .../net/runelite/client/plugins/worldmap/DungeonLocation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java index 13e4c59233..8505cf70b1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java @@ -40,7 +40,7 @@ enum DungeonLocation ARDOUGNE_SEWERS_N("Ardougne Sewers", new WorldPoint(2631, 3294, 0)), ARDOUGNE_SEWERS_S("Ardougne Sewers", new WorldPoint(2586, 3235, 0)), ARDOUGNE_SEWERS_W("Ardougne Sewers", new WorldPoint(2528, 3303, 0)), - ASGARDIA_ICE("Asgardia Ice Dungeon", new WorldPoint(3007, 3150, 0)), + ASGARNIAN_ICE("Asgarnian Ice Dungeon", new WorldPoint(3007, 3150, 0)), BRIMHAVEN_AGILITY("Brimhaven Agility Arena", new WorldPoint(2808, 3194, 0)), BRIMHAVEN_N("Brimhaven Dungeon", new WorldPoint(2743, 3154, 0)), BRIMHAVEN_S("Brimhaven Dungeon", new WorldPoint(2759, 3062, 0)), From 2492857fbaca45aa3e5d621e524e0601494822bc Mon Sep 17 00:00:00 2001 From: Nathan Leba Date: Tue, 9 Jun 2020 14:49:03 -0500 Subject: [PATCH 31/43] worldhopper: Fix unfavorite removing all favorited worlds (#11739) --- .../client/plugins/worldhopper/WorldHopperPlugin.java | 1 - .../client/plugins/worldhopper/WorldSwitcherPanel.java | 9 --------- 2 files changed, 10 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java index 905ad32601..1bf97a8f2e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java @@ -298,7 +298,6 @@ public class WorldHopperPlugin extends Plugin private void clearFavoriteConfig(int world) { configManager.unsetConfiguration(WorldHopperConfig.GROUP, "favorite_" + world); - panel.resetAllFavoriteMenus(); } boolean isFavorite(World world) 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 9f15b8a068..7d3102127b 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 @@ -223,15 +223,6 @@ class WorldSwitcherPanel extends PluginPanel } } - void resetAllFavoriteMenus() - { - for (WorldTableRow row : rows) - { - row.setFavoriteMenu(false); - } - - } - void populate(List worlds) { rows.clear(); From 5ac99a54a1b67f0303b86d82ffd4dee9d5b25a08 Mon Sep 17 00:00:00 2001 From: Max Weber Date: Tue, 9 Jun 2020 19:26:54 -0600 Subject: [PATCH 32/43] rl-api/Widget: export animation and sprite tiling --- .../java/net/runelite/api/widgets/Widget.java | 34 ++++++++++++++++--- .../devtools/WidgetInfoTableModel.java | 2 ++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/Widget.java b/runelite-api/src/main/java/net/runelite/api/widgets/Widget.java index d2aa872e46..5b7cdec58d 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/Widget.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/Widget.java @@ -242,16 +242,18 @@ public interface Widget void setName(String name); /** - * Gets the model ID displayed in the widget. + * Gets the Model/NPC/Item ID displayed in the widget. + * + * @see WidgetModelType */ int getModelId(); /** - * Sets the model ID displayed in the widget. + * Sets the Model/NPC/Item ID displayed in the widget. * - * @param modelId the new model ID + * @see WidgetModelType */ - void setModelId(int modelId); + void setModelId(int id); /** * Gets the model type of the widget. @@ -268,6 +270,20 @@ public interface Widget */ void setModelType(int type); + /** + * Gets the sequence ID used to animate the model in the widget + * + * @see net.runelite.api.AnimationID + */ + int getAnimationId(); + + /** + * Sets the sequence ID used to animate the model in the widget + * + * @see net.runelite.api.AnimationID + */ + void setAnimationId(int animationId); + /** * Gets the x rotation of the model displayed in the widget. * 0 = no rotation, 2047 = full rotation @@ -336,6 +352,16 @@ public interface Widget */ int getSpriteId(); + /** + * Gets if sprites are repeated or stretched + */ + boolean getSpriteTiling(); + + /** + * Sets if sprites are repeated or stretched + */ + void setSpriteTiling(boolean tiling); + /** * Sets the sprite ID displayed in the widget. * diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInfoTableModel.java b/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInfoTableModel.java index 6623838871..a08323eba3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInfoTableModel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInfoTableModel.java @@ -157,11 +157,13 @@ public class WidgetInfoTableModel extends AbstractTableModel out.add(new WidgetField<>("ItemQuantityMode", Widget::getItemQuantityMode, Widget::setItemQuantityMode, Integer.class)); out.add(new WidgetField<>("ModelId", Widget::getModelId, Widget::setModelId, Integer.class)); out.add(new WidgetField<>("ModelType", Widget::getModelType, Widget::setModelType, Integer.class)); + out.add(new WidgetField<>("AnimationId", Widget::getAnimationId, Widget::setAnimationId, Integer.class)); out.add(new WidgetField<>("RotationX", Widget::getRotationX, Widget::setRotationX, Integer.class)); out.add(new WidgetField<>("RotationY", Widget::getRotationY, Widget::setRotationY, Integer.class)); out.add(new WidgetField<>("RotationZ", Widget::getRotationZ, Widget::setRotationZ, Integer.class)); out.add(new WidgetField<>("ModelZoom", Widget::getModelZoom, Widget::setModelZoom, Integer.class)); out.add(new WidgetField<>("SpriteId", Widget::getSpriteId, Widget::setSpriteId, Integer.class)); + out.add(new WidgetField<>("SpriteTiling", Widget::getSpriteTiling, Widget::setSpriteTiling, Boolean.class)); out.add(new WidgetField<>("BorderType", Widget::getBorderType, Widget::setBorderType, Integer.class)); out.add(new WidgetField<>("IsIf3", Widget::isIf3)); out.add(new WidgetField<>("HasListener", Widget::hasListener, Widget::setHasListener, Boolean.class)); From 248179a82c4272e907ffa11b1861adc8bb61b67f Mon Sep 17 00:00:00 2001 From: Hydrox Date: Wed, 10 Jun 2020 04:36:00 +0100 Subject: [PATCH 33/43] gpu: fix major visual glitches on linux (#11389) Putting this if statement behind `localId < size` causes major visual glitches with the Mesa graphics driver on AMD cards. We think this is a compiler bug as this change shouldn't be affecting anything. --- .../client/plugins/gpu/priority_render.glsl | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.glsl b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.glsl index 8a3d4474d2..90af8d41f0 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.glsl +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.glsl @@ -113,28 +113,35 @@ int count_prio_offset(int priority) { void get_face(uint localId, modelinfo minfo, int cameraYaw, int cameraPitch, out int prio, out int dis, out ivec4 o1, out ivec4 o2, out ivec4 o3) { int size = minfo.size; + int offset = minfo.offset; + int flags = minfo.flags; + uint ssboOffset; + + if (localId < size) { + ssboOffset = localId; + } else { + ssboOffset = 0; + } + + ivec4 thisA; + ivec4 thisB; + ivec4 thisC; + + // Grab triangle vertices from the correct buffer + if (flags < 0) { + thisA = vb[offset + ssboOffset * 3]; + thisB = vb[offset + ssboOffset * 3 + 1]; + thisC = vb[offset + ssboOffset * 3 + 2]; + } else { + thisA = tempvb[offset + ssboOffset * 3]; + thisB = tempvb[offset + ssboOffset * 3 + 1]; + thisC = tempvb[offset + ssboOffset * 3 + 2]; + } if (localId < size) { - int offset = minfo.offset; - int flags = minfo.flags; int radius = (flags & 0x7fffffff) >> 12; int orientation = flags & 0x7ff; - ivec4 thisA; - ivec4 thisB; - ivec4 thisC; - - // Grab triangle vertices from the correct buffer - if (flags < 0) { - thisA = vb[offset + localId * 3]; - thisB = vb[offset + localId * 3 + 1]; - thisC = vb[offset + localId * 3 + 2]; - } else { - thisA = tempvb[offset + localId * 3]; - thisB = tempvb[offset + localId * 3 + 1]; - thisC = tempvb[offset + localId * 3 + 2]; - } - // rotate for model orientation ivec4 thisrvA = rotate(thisA, orientation); ivec4 thisrvB = rotate(thisB, orientation); From 3050bd7ca92c02355d03bef1702d1578fa30b5a4 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 10 Jun 2020 12:13:33 -0400 Subject: [PATCH 34/43] agility plugin: highlight Sepulchre arrows and swords --- .../client/plugins/agility/AgilityConfig.java | 22 ++++++++++++ .../plugins/agility/AgilityOverlay.java | 22 ++++++++++++ .../client/plugins/agility/AgilityPlugin.java | 36 ++++++++++++++++++- 3 files changed, 79 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityConfig.java index 6e100b2bf9..b6eae25fe1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityConfig.java @@ -220,4 +220,26 @@ public interface AgilityConfig extends Config { return Color.RED; } + + @ConfigItem( + keyName = "highlightSepulchreNpcs", + name = "Highlight Sepulchre Projectiles", + description = "Highlights arrows and swords in the Sepulchre", + position = 15 + ) + default boolean highlightSepulchreNpcs() + { + return true; + } + + @ConfigItem( + keyName = "sepulchreHighlightColor", + name = "Sepulchre Highlight", + description = "Overlay color for arrows and swords", + position = 16 + ) + default Color sepulchreHighlightColor() + { + return Color.GREEN; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java index 6f3bb34a34..258f06e0da 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java @@ -31,8 +31,12 @@ import java.awt.Graphics2D; import java.awt.Polygon; import java.awt.Shape; import java.util.List; +import java.util.Set; import javax.inject.Inject; import net.runelite.api.Client; +import net.runelite.api.NPC; +import net.runelite.api.NPCComposition; +import net.runelite.api.Perspective; import net.runelite.api.Point; import net.runelite.api.Tile; import net.runelite.api.coords.LocalPoint; @@ -138,6 +142,24 @@ class AgilityOverlay extends Overlay highlightTile(graphics, playerLocation, stickTile, config.stickHighlightColor()); } + Set npcs = plugin.getNpcs(); + if (!npcs.isEmpty() && config.highlightSepulchreNpcs()) + { + Color color = config.getOverlayColor(); + for (NPC npc : npcs) + { + NPCComposition npcComposition = npc.getComposition(); + int size = npcComposition.getSize(); + LocalPoint lp = npc.getLocalLocation(); + + Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size); + if (tilePoly != null) + { + OverlayUtil.renderPolygon(graphics, tilePoly, color); + } + } + } + return null; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityPlugin.java index b0aecc8234..a430c0e6d7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityPlugin.java @@ -24,12 +24,15 @@ */ package net.runelite.client.plugins.agility; +import com.google.common.collect.ImmutableSet; import com.google.inject.Provides; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import javax.inject.Inject; import lombok.AccessLevel; import lombok.Getter; @@ -38,6 +41,8 @@ import net.runelite.api.Client; import net.runelite.api.ItemID; import static net.runelite.api.ItemID.AGILITY_ARENA_TICKET; import net.runelite.api.MenuAction; +import net.runelite.api.NPC; +import net.runelite.api.NullNpcID; import net.runelite.api.Player; import net.runelite.api.Skill; import static net.runelite.api.Skill.AGILITY; @@ -58,6 +63,8 @@ import net.runelite.api.events.GroundObjectDespawned; import net.runelite.api.events.GroundObjectSpawned; import net.runelite.api.events.ItemDespawned; import net.runelite.api.events.ItemSpawned; +import net.runelite.api.events.NpcDespawned; +import net.runelite.api.events.NpcSpawned; import net.runelite.api.events.StatChanged; import net.runelite.api.events.WallObjectChanged; import net.runelite.api.events.WallObjectDespawned; @@ -81,13 +88,17 @@ import net.runelite.client.ui.overlay.infobox.InfoBoxManager; @PluginDescriptor( name = "Agility", description = "Show helpful information about agility courses and obstacles", - tags = {"grace", "marks", "overlay", "shortcuts", "skilling", "traps"} + tags = {"grace", "marks", "overlay", "shortcuts", "skilling", "traps", "sepulchre"} ) @PluginDependency(XpTrackerPlugin.class) @Slf4j public class AgilityPlugin extends Plugin { private static final int AGILITY_ARENA_REGION_ID = 11157; + private static final Set SEPULCHRE_NPCS = ImmutableSet.of( + NullNpcID.NULL_9672, NullNpcID.NULL_9673, NullNpcID.NULL_9674, // arrows + NullNpcID.NULL_9669, NullNpcID.NULL_9670, NullNpcID.NULL_9671 // swords + ); @Getter private final Map obstacles = new HashMap<>(); @@ -95,6 +106,9 @@ public class AgilityPlugin extends Plugin @Getter private final List marksOfGrace = new ArrayList<>(); + @Getter + private final Set npcs = new HashSet<>(); + @Inject private OverlayManager overlayManager; @@ -158,6 +172,7 @@ public class AgilityPlugin extends Plugin session = null; agilityLevel = 0; stickTile = null; + npcs.clear(); } @Subscribe @@ -182,6 +197,7 @@ public class AgilityPlugin extends Plugin session = null; lastArenaTicketPosition = null; removeAgilityArenaTimer(); + npcs.clear(); break; case LOADING: marksOfGrace.clear(); @@ -457,4 +473,22 @@ public class AgilityPlugin extends Plugin } } } + + @Subscribe + public void onNpcSpawned(NpcSpawned npcSpawned) + { + NPC npc = npcSpawned.getNpc(); + + if (SEPULCHRE_NPCS.contains(npc.getId())) + { + npcs.add(npc); + } + } + + @Subscribe + public void onNpcDespawned(NpcDespawned npcDespawned) + { + NPC npc = npcDespawned.getNpc(); + npcs.remove(npc); + } } From 243c48bdbf83eafe1148c95e156ea72ded73afd4 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Wed, 10 Jun 2020 12:41:25 -0400 Subject: [PATCH 35/43] agility plugin: highlight platforms and stairs in Sepulchre --- .../net/runelite/client/plugins/agility/Obstacles.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/Obstacles.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/Obstacles.java index 7d500f4e03..bda6037a6c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/Obstacles.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/Obstacles.java @@ -94,7 +94,12 @@ class Obstacles ZIP_LINE_11645, ZIP_LINE_11646, // Prifddinas LADDER_36221, TIGHTROPE_36225, CHIMNEY_36227, ROOF_EDGE, DARK_HOLE_36229, LADDER_36231, LADDER_36232, - ROPE_BRIDGE_36233, TIGHTROPE_36234, ROPE_BRIDGE_36235, TIGHTROPE_36236, TIGHTROPE_36237, DARK_HOLE_36238 + ROPE_BRIDGE_36233, TIGHTROPE_36234, ROPE_BRIDGE_36235, TIGHTROPE_36236, TIGHTROPE_36237, DARK_HOLE_36238, + // Hallowed Sepulchre + GATE_38460, PLATFORM_38455, PLATFORM_38456, PLATFORM_38457, PLATFORM_38458, PLATFORM_38459, + PLATFORM_38470, PLATFORM_38477, STAIRS_38462, STAIRS_38463, STAIRS_38464, STAIRS_38465, + STAIRS_38466, STAIRS_38467, STAIRS_38468, STAIRS_38469, STAIRS_38471, STAIRS_38472, + STAIRS_38473, STAIRS_38474, STAIRS_38475, STAIRS_38476 ); static final Set PORTAL_OBSTACLE_IDS = ImmutableSet.of( From c196cdb430cccb37412fd5e40c28cf153ad68e54 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 10 Jun 2020 12:48:38 -0400 Subject: [PATCH 36/43] loottrackerpanel: use setComponentZOrder instead of remove+add --- .../client/plugins/loottracker/LootTrackerPanel.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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 d3ca782f64..343fb198bc 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 @@ -503,13 +503,7 @@ class LootTrackerPanel extends PluginPanel if (box.matches(record)) { // float the matched box to the top of the UI list if it's not already first - int idx = logsContainer.getComponentZOrder(box); - if (idx > 0) - { - logsContainer.remove(idx); - logsContainer.add(box, 0); - } - + logsContainer.setComponentZOrder(box, 0); box.addKill(record); return box; } From 7b5c483c3c189a6110cd4b784d1891c3c1dc24dc Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 5 Jun 2020 12:42:30 -0400 Subject: [PATCH 37/43] config panel: add option to reset individual config options --- .../client/plugins/config/ConfigPanel.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java index db39c25e50..93f3e77287 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java @@ -67,6 +67,7 @@ import javax.swing.event.ChangeListener; import javax.swing.text.JTextComponent; import lombok.extern.slf4j.Slf4j; import net.runelite.client.config.ConfigDescriptor; +import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; import net.runelite.client.config.ConfigItemDescriptor; import net.runelite.client.config.ConfigManager; @@ -329,6 +330,7 @@ class ConfigPanel extends PluginPanel JLabel configEntryName = new JLabel(name); configEntryName.setForeground(Color.WHITE); configEntryName.setToolTipText("" + name + ":
" + cid.getItem().description() + ""); + PluginListItem.addLabelPopupMenu(configEntryName, createResetMenuItem(pluginConfig, cid)); item.add(configEntryName, BorderLayout.CENTER); if (cid.getType() == boolean.class) @@ -652,4 +654,21 @@ class ConfigPanel extends PluginPanel } SwingUtilities.invokeLater(this::rebuild); } + + private JMenuItem createResetMenuItem(PluginConfigurationDescriptor pluginConfig, ConfigItemDescriptor configItemDescriptor) + { + JMenuItem menuItem = new JMenuItem("Reset"); + menuItem.addActionListener(e -> { + ConfigDescriptor configDescriptor = pluginConfig.getConfigDescriptor(); + ConfigGroup configGroup = configDescriptor.getGroup(); + ConfigItem configItem = configItemDescriptor.getItem(); + + // To reset one item we'll just unset it and then apply defaults over the whole group + configManager.unsetConfiguration(configGroup.value(), configItem.keyName()); + configManager.setDefaultConfiguration(pluginConfig.getConfig(), false); + + rebuild(); + }); + return menuItem; + } } From b6204d0a44e19c1753545267b04584248c925c8e Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Wed, 10 Jun 2020 10:53:03 -0700 Subject: [PATCH 38/43] ConfigPanel: Fix checkstyle violation --- .../java/net/runelite/client/plugins/config/ConfigPanel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java index 93f3e77287..f17d41a2cb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java @@ -658,7 +658,8 @@ class ConfigPanel extends PluginPanel private JMenuItem createResetMenuItem(PluginConfigurationDescriptor pluginConfig, ConfigItemDescriptor configItemDescriptor) { JMenuItem menuItem = new JMenuItem("Reset"); - menuItem.addActionListener(e -> { + menuItem.addActionListener(e -> + { ConfigDescriptor configDescriptor = pluginConfig.getConfigDescriptor(); ConfigGroup configGroup = configDescriptor.getGroup(); ConfigItem configItem = configItemDescriptor.getItem(); From 15d06d840682554fc50213469d878254736fc369 Mon Sep 17 00:00:00 2001 From: Su-Shing Chen Date: Thu, 11 Jun 2020 07:06:03 +1200 Subject: [PATCH 39/43] xptracker: Add drag and drop reordering for tracker panel bars (#4118) This commit implements a custom component which extends JLayeredPane, allowing reordering child components via drag and drop. This requires its children components to forward the necessary MouseEvents. --- .../client/plugins/xptracker/XpInfoBox.java | 14 +- .../client/plugins/xptracker/XpPanel.java | 5 +- .../ui/components/DragAndDropReorderPane.java | 199 ++++++++++++++++++ .../components/MouseDragEventForwarder.java | 70 ++++++ 4 files changed, 283 insertions(+), 5 deletions(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/ui/components/DragAndDropReorderPane.java create mode 100644 runelite-client/src/main/java/net/runelite/client/ui/components/MouseDragEventForwarder.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpInfoBox.java b/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpInfoBox.java index cbc0be4520..a1aab90b80 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpInfoBox.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpInfoBox.java @@ -35,6 +35,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.swing.ImageIcon; +import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JMenuItem; import javax.swing.JPanel; @@ -54,6 +55,7 @@ import net.runelite.client.ui.ColorScheme; import net.runelite.client.ui.DynamicGridLayout; import net.runelite.client.ui.FontManager; import net.runelite.client.ui.SkillColor; +import net.runelite.client.ui.components.MouseDragEventForwarder; import net.runelite.client.ui.components.ProgressBar; import net.runelite.client.util.ColorUtil; import net.runelite.client.util.LinkBrowser; @@ -80,7 +82,7 @@ class XpInfoBox extends JPanel private static final String ADD_STATE = "Add to canvas"; // Instance members - private final JPanel panel; + private final JComponent panel; @Getter(AccessLevel.PACKAGE) private final Skill skill; @@ -107,7 +109,7 @@ class XpInfoBox extends JPanel private boolean paused = false; - XpInfoBox(XpTrackerPlugin xpTrackerPlugin, XpTrackerConfig xpTrackerConfig, Client client, JPanel panel, Skill skill, SkillIconManager iconManager) + XpInfoBox(XpTrackerPlugin xpTrackerPlugin, XpTrackerConfig xpTrackerConfig, Client client, JComponent panel, Skill skill, SkillIconManager iconManager) { this.xpTrackerConfig = xpTrackerConfig; this.panel = panel; @@ -217,13 +219,19 @@ class XpInfoBox extends JPanel container.setComponentPopupMenu(popupMenu); progressBar.setComponentPopupMenu(popupMenu); + // forward mouse drag events to parent panel for drag and drop reordering + MouseDragEventForwarder mouseDragEventForwarder = new MouseDragEventForwarder(panel); + container.addMouseListener(mouseDragEventForwarder); + container.addMouseMotionListener(mouseDragEventForwarder); + progressBar.addMouseListener(mouseDragEventForwarder); + progressBar.addMouseMotionListener(mouseDragEventForwarder); + add(container, BorderLayout.NORTH); } void reset() { canvasItem.setText(ADD_STATE); - container.remove(statsPanel); panel.remove(this); panel.revalidate(); } 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 87c272c842..3c63ccf76e 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 @@ -31,6 +31,7 @@ import java.util.HashMap; import java.util.Map; import javax.swing.BoxLayout; import javax.swing.ImageIcon; +import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JMenuItem; import javax.swing.JPanel; @@ -44,6 +45,7 @@ import net.runelite.client.game.SkillIconManager; import net.runelite.client.ui.ColorScheme; import net.runelite.client.ui.FontManager; import net.runelite.client.ui.PluginPanel; +import net.runelite.client.ui.components.DragAndDropReorderPane; import net.runelite.client.ui.components.PluginErrorPanel; import net.runelite.client.util.LinkBrowser; import okhttp3.HttpUrl; @@ -120,9 +122,8 @@ class XpPanel extends PluginPanel overallPanel.add(overallIcon, BorderLayout.WEST); overallPanel.add(overallInfo, BorderLayout.CENTER); + final JComponent infoBoxPanel = new DragAndDropReorderPane(); - final JPanel infoBoxPanel = new JPanel(); - infoBoxPanel.setLayout(new BoxLayout(infoBoxPanel, BoxLayout.Y_AXIS)); layoutPanel.add(overallPanel); layoutPanel.add(infoBoxPanel); diff --git a/runelite-client/src/main/java/net/runelite/client/ui/components/DragAndDropReorderPane.java b/runelite-client/src/main/java/net/runelite/client/ui/components/DragAndDropReorderPane.java new file mode 100644 index 0000000000..32ecaaf69c --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/ui/components/DragAndDropReorderPane.java @@ -0,0 +1,199 @@ +/* + * Copyright (c) 2020, Shingyx + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.ui.components; + +import java.awt.Component; +import java.awt.Container; +import java.awt.LayoutManager; +import java.awt.Point; +import java.awt.dnd.DragSource; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import javax.swing.BoxLayout; +import javax.swing.JLayeredPane; +import javax.swing.SwingUtilities; + +/** + * Pane which allows reordering its components via drag and drop. + */ +public class DragAndDropReorderPane extends JLayeredPane +{ + private Point dragStartPoint; + private Component draggingComponent; + private int dragYOffset = 0; + private int dragIndex = -1; + + public DragAndDropReorderPane() + { + super(); + setLayout(new DragAndDropReorderLayoutManager()); + MouseAdapter mouseAdapter = new DragAndDropReorderMouseAdapter(); + addMouseListener(mouseAdapter); + addMouseMotionListener(mouseAdapter); + } + + @Override + public void setLayout(LayoutManager layoutManager) + { + if (layoutManager != null && !(layoutManager instanceof DragAndDropReorderLayoutManager)) + { + throw new IllegalArgumentException("DragAndDropReorderPane only supports DragAndDropReorderLayoutManager"); + } + super.setLayout(layoutManager); + } + + private void startDragging(Point point) + { + draggingComponent = getDefaultLayerComponentAt(dragStartPoint); + if (draggingComponent == null) + { + dragStartPoint = null; + return; + } + dragYOffset = SwingUtilities.convertPoint(this, dragStartPoint, draggingComponent).y; + dragIndex = getPosition(draggingComponent); + setLayer(draggingComponent, DRAG_LAYER); + moveDraggingComponent(point); + } + + private void drag(Point point) + { + moveDraggingComponent(point); + + // reorder components overlapping with the dragging components mid-point + Point draggingComponentMidPoint = SwingUtilities.convertPoint( + draggingComponent, + new Point(draggingComponent.getWidth() / 2, draggingComponent.getHeight() / 2), + this + ); + Component component = getDefaultLayerComponentAt(draggingComponentMidPoint); + if (component != null) + { + int index = getPosition(component); + dragIndex = index < dragIndex ? index : index + 1; + revalidate(); + } + } + + private void finishDragging() + { + if (draggingComponent != null) + { + setLayer(draggingComponent, DEFAULT_LAYER, dragIndex); + draggingComponent = null; + dragYOffset = 0; + dragIndex = -1; + revalidate(); + } + dragStartPoint = null; + } + + private void moveDraggingComponent(Point point) + { + // shift the dragging component to match it's earlier y offset with the mouse + int y = point.y - dragYOffset; + // clamp the height to stay within the pane + y = Math.max(y, 0); + y = Math.min(y, getHeight() - draggingComponent.getHeight()); + + draggingComponent.setLocation(new Point(0, y)); + } + + private Component getDefaultLayerComponentAt(Point point) + { + for (Component component : getComponentsInLayer(DEFAULT_LAYER)) + { + if (component.contains(point.x - component.getX(), point.y - component.getY())) + { + return component; + } + } + return null; + } + + private class DragAndDropReorderLayoutManager extends BoxLayout + { + private DragAndDropReorderLayoutManager() + { + super(DragAndDropReorderPane.this, BoxLayout.Y_AXIS); + } + + @Override + public void layoutContainer(Container target) + { + if (draggingComponent != null) + { + // temporarily move the dragging component to the default layer for correct layout calculation + Point location = draggingComponent.getLocation(); + setLayer(draggingComponent, DEFAULT_LAYER, dragIndex); + super.layoutContainer(target); + setLayer(draggingComponent, DRAG_LAYER); + draggingComponent.setLocation(location); + } + else + { + super.layoutContainer(target); + } + } + } + + private class DragAndDropReorderMouseAdapter extends MouseAdapter + { + @Override + public void mousePressed(MouseEvent e) + { + if (SwingUtilities.isLeftMouseButton(e) && getComponentCount() > 1) + { + dragStartPoint = e.getPoint(); + } + } + + @Override + public void mouseDragged(MouseEvent e) + { + if (SwingUtilities.isLeftMouseButton(e) && dragStartPoint != null) + { + Point point = e.getPoint(); + if (draggingComponent != null) + { + drag(point); + } + else if (point.distance(dragStartPoint) > DragSource.getDragThreshold()) + { + startDragging(point); + } + } + } + + @Override + public void mouseReleased(MouseEvent e) + { + if (SwingUtilities.isLeftMouseButton(e)) + { + finishDragging(); + } + } + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/ui/components/MouseDragEventForwarder.java b/runelite-client/src/main/java/net/runelite/client/ui/components/MouseDragEventForwarder.java new file mode 100644 index 0000000000..2e97f66d01 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/ui/components/MouseDragEventForwarder.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020, Shingyx + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.ui.components; + +import java.awt.Component; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import javax.swing.SwingUtilities; + +/** + * Forwards left mouse button drag events to the target Component. + */ +public class MouseDragEventForwarder extends MouseAdapter +{ + private final Component target; + + public MouseDragEventForwarder(Component target) + { + this.target = target; + } + + @Override + public void mousePressed(MouseEvent e) + { + processEvent(e); + } + + @Override + public void mouseDragged(MouseEvent e) + { + processEvent(e); + } + + @Override + public void mouseReleased(MouseEvent e) + { + processEvent(e); + } + + private void processEvent(MouseEvent e) + { + if (SwingUtilities.isLeftMouseButton(e)) + { + MouseEvent eventForTarget = SwingUtilities.convertMouseEvent((Component) e.getSource(), e, target); + target.dispatchEvent(eventForTarget); + } + } +} From 9a7881377c4c878bcc7f0ca5381e4751276d73a4 Mon Sep 17 00:00:00 2001 From: Blackberry0Pie Date: Wed, 10 Jun 2020 15:48:34 -0400 Subject: [PATCH 40/43] raids: Add "cox" to plugin tags (#11873) --- .../java/net/runelite/client/plugins/raids/RaidsPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java index c75b15f69b..3325308c8a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java @@ -105,7 +105,7 @@ import net.runelite.http.api.ws.messages.party.PartyChatMessage; @PluginDescriptor( name = "Chambers Of Xeric", description = "Show helpful information for the Chambers of Xeric raid", - tags = {"combat", "raid", "overlay", "pve", "pvm", "bosses"} + tags = {"combat", "raid", "overlay", "pve", "pvm", "bosses", "cox"} ) @Slf4j public class RaidsPlugin extends Plugin From a37da4bc7a01d42aa9f441a135d73b0288f5e87c Mon Sep 17 00:00:00 2001 From: MarbleTurtle <60723971+MarbleTurtle@users.noreply.github.com> Date: Thu, 11 Jun 2020 00:08:12 -0700 Subject: [PATCH 41/43] CrypticClue: Improve various clue hints (#11852) --- .../cluescrolls/clues/CrypticClue.java | 128 +++++++++--------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java index 6f92de9a85..7c3a5b22c0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java @@ -54,15 +54,15 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc public static final Set CLUES = ImmutableSet.of( new CrypticClue("Show this to Sherlock.", "Sherlock", new WorldPoint(2733, 3415, 0), "Sherlock is located to the east of the Sorcerer's tower in Seers' Village."), new CrypticClue("Talk to the bartender of the Rusty Anchor in Port Sarim.", "Bartender", new WorldPoint(3045, 3256, 0), "The Rusty Anchor is located in the north of Port Sarim."), - new CrypticClue("The keeper of Melzars... Spare? Skeleton? Anar?", "Oziach", new WorldPoint(3068, 3516, 0), "Speak to Oziach in Edgeville"), - new CrypticClue("Speak to Ulizius.", "Ulizius", new WorldPoint(3444, 3461, 0), "Ulizius is the monk who guards the gate into Mort Myre Swamp. South of fairy ring CKS"), - new CrypticClue("Search for a crate in a building in Hemenster.", CRATE_357, new WorldPoint(2636, 3453, 0), "House north of the Fishing Contest quest area. West of Grandpa Jack."), + new CrypticClue("The keeper of Melzars... Spare? Skeleton? Anar?", "Oziach", new WorldPoint(3068, 3516, 0), "Speak to Oziach in Edgeville."), + new CrypticClue("Speak to Ulizius.", "Ulizius", new WorldPoint(3444, 3461, 0), "Ulizius is the monk who guards the gate into Mort Myre Swamp. South of fairy ring CKS."), + new CrypticClue("Search for a crate in a building in Hemenster.", CRATE_357, new WorldPoint(2636, 3453, 0), "House northwest of the Ranging Guild. West of Grandpa Jack."), new CrypticClue("A reck you say; let's pray there aren't any ghosts.", "Father Aereck", new WorldPoint(3242, 3207, 0), "Speak to Father Aereck in Lumbridge."), new CrypticClue("Search the bucket in the Port Sarim jail.", BUCKET_9568, new WorldPoint(3013, 3179, 0), "Talk to Shantay & identify yourself as an outlaw, refuse to pay the 5gp fine twice and you will be sent to the Port Sarim jail."), new CrypticClue("Search the crates in a bank in Varrock.", CRATE_5107, new WorldPoint(3187, 9825, 0), "Search in the basement of the West Varrock bank."), new CrypticClue("Falo the bard wants to see you.", "Falo the Bard", new WorldPoint(2689, 3550, 0), "Speak to Falo the Bard located between Seer's Village and Rellekka. Southwest of fairy ring CJR."), - new CrypticClue("Search a bookcase in the Wizards tower.", BOOKCASE_12539, new WorldPoint(3113, 3159, 0), "The bookcase located on the ground floor."), - new CrypticClue("Come have a cip with this great soot covered denizen.", "Miner Magnus", new WorldPoint(2527, 3891, 0), "Talk to Miner Magnus east of the fairy ring CIP. Answer: 8", "How many coal rocks are around here?"), + new CrypticClue("Search a bookcase in the Wizards tower.", BOOKCASE_12539, new WorldPoint(3113, 3159, 0), "The bookcase located on the ground floor of the Wizards' Tower."), + new CrypticClue("Come have a cip with this great soot covered denizen.", "Miner Magnus", new WorldPoint(2527, 3891, 0), "Talk to Miner Magnus on Miscellania, east of the fairy ring CIP. Answer: 8", "How many coal rocks are around here?"), new CrypticClue("Citric cellar.", "Heckel Funch", new WorldPoint(2490, 3488, 0), "Speak to Heckel Funch on the first floor in the Grand Tree."), new CrypticClue("I burn between heroes and legends.", "Candle maker", new WorldPoint(2799, 3438, 0), "Speak to the Candle maker in Catherby."), new CrypticClue("Speak to Sarah at Falador farm.", "Sarah", new WorldPoint(3038, 3292, 0), "Talk to Sarah at Falador farm, north of Port Sarim."), @@ -70,47 +70,47 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Snah? I feel all confused, like one of those cakes...", "Hans", new WorldPoint(3211, 3219, 0), "Talk to Hans roaming around Lumbridge Castle."), new CrypticClue("Speak to Sir Kay in Camelot Castle.", "Sir Kay", new WorldPoint(2759, 3497, 0), "Sir Kay can be found in the courtyard at Camelot castle."), new CrypticClue("Gold I see, yet gold I require. Give me 875 if death you desire.", "Saniboch", new WorldPoint(2745, 3151, 0), "Speak to Saniboch at the Brimhaven Dungeon entrance."), - new CrypticClue("Find a crate close to the monks that like to paaarty!", CRATE_354, new WorldPoint(2614, 3204, 0), "The crate is in the east side of the Kandarin monastery, near Brother Omad"), - new CrypticClue("Identify the back of this over-acting brother. (He's a long way from home.)", "Hamid", new WorldPoint(3376, 3284, 0), "Talk to Hamid, the monk at the altar in the Duel Arena"), + new CrypticClue("Find a crate close to the monks that like to paaarty!", CRATE_354, new WorldPoint(2614, 3204, 0), "The crate is in the east side of the Ardougne monastery, near Brother Omad."), + new CrypticClue("Identify the back of this over-acting brother. (He's a long way from home.)", "Hamid", new WorldPoint(3376, 3284, 0), "Talk to Hamid, the monk at the altar in the Duel Arena."), new CrypticClue("In a town where thieves steal from stalls, search for some drawers in the upstairs of a house near the bank.", "Guard", DRAWERS, new WorldPoint(2611, 3324, 1), "Kill any Guard located around East Ardougne for a medium key. Then search the drawers in the upstairs hallway of Jerico's house, which is the house with pigeon cages located south of the northern East Ardougne bank."), new CrypticClue("His bark is worse than his bite.", "Barker", new WorldPoint(3499, 3503, 0), "Speak to the Barker at Canifis's Barkers' Haberdashery."), new CrypticClue("The beasts to my east snap claws and tails, The rest to my west can slide and eat fish. The force to my north will jump and they'll wail, Come dig by my fire and make a wish.", new WorldPoint(2598, 3267, 0), "Dig by the torch in the Ardougne Zoo, between the penguins and the scorpions."), new CrypticClue("A town with a different sort of night-life is your destination. Search for some crates in one of the houses.", CRATE_24344, new WorldPoint(3498, 3507, 0), "Search the crate inside of the clothes shop in Canifis."), - new CrypticClue("Stop crying! Talk to the head.", "Head mourner", new WorldPoint(2042, 4630, 0), "Talk to the Head mourner in the mourner headquarters in West Ardougne"), + new CrypticClue("Stop crying! Talk to the head.", "Head mourner", new WorldPoint(2042, 4630, 0), "Talk to the Head mourner in the mourner headquarters in West Ardougne."), new CrypticClue("Search the crate near a cart in Port Khazard.", CRATE_366, new WorldPoint(2660, 3149, 0), "Search by the southern Khazard General Store in Port Khazard."), new CrypticClue("Speak to the bartender of the Blue Moon Inn in Varrock.", "Bartender", new WorldPoint(3226, 3399, 0), "Talk to the bartender in Blue Moon Inn in Varrock."), new CrypticClue("This aviator is at the peak of his profession.", "Captain Bleemadge", new WorldPoint(2846, 1749, 0), "Captain Bleemadge, the gnome glider pilot, is found at the top of White Wolf Mountain."), new CrypticClue("Search the crates in the shed just north of East Ardougne.", CRATE_355, new WorldPoint(2617, 3347, 0), "The crates in the shed north of the northern Ardougne bank."), - new CrypticClue("I wouldn't wear this jean on my legs.", "Father Jean", new WorldPoint(1734, 3576, 0), "Talk to father Jean in the Hosidius church"), + new CrypticClue("I wouldn't wear this jean on my legs.", "Father Jean", new WorldPoint(1734, 3576, 0), "Talk to father Jean in the Hosidius church."), new CrypticClue("Search the crate in the Toad and Chicken pub.", CRATE_354, new WorldPoint(2913, 3536, 0), "The Toad and Chicken pub is located in Burthorpe."), - new CrypticClue("Search chests found in the upstairs of shops in Port Sarim.", CLOSED_CHEST_375, new WorldPoint(3016, 3205, 1), "Search the chest in the upstairs of Wydin's Food Store, on the east wall."), + new CrypticClue("Search chests found in the upstairs of shops in Port Sarim.", CLOSED_CHEST_375, new WorldPoint(3016, 3205, 1), "Search the chest on the east wall found upstairs of Wydin's Food Store in Port Sarim."), new CrypticClue("Right on the blessed border, cursed by the evil ones. On the spot inaccessible by both; I will be waiting. The bugs' imminent possession holds the answer.", new WorldPoint(3410, 3324, 0), "B I P. Dig right under the fairy ring."), new CrypticClue("The dead, red dragon watches over this chest. He must really dig the view.", "Barbarian", 375, new WorldPoint(3353, 3332, 0), "Search the chest underneath the Red Dragon's head in the Exam Centre. Kill a MALE Barbarian in Barbarian Village or Barbarian Outpost to receive the key."), new CrypticClue("My home is grey, and made of stone; A castle with a search for a meal. Hidden in some drawers I am, across from a wooden wheel.", DRAWERS_5618, new WorldPoint(3213, 3216, 1), "Open the drawers inside the room with the spinning wheel on the first floor of Lumbridge Castle."), new CrypticClue("Come to the evil ledge, Yew know yew want to. Try not to get stung.", new WorldPoint(3089, 3468, 0), "Dig in Edgeville, just east of the Southern Yew tree."), - new CrypticClue("Look in the ground floor crates of houses in Falador.", CRATES_24088, new WorldPoint(3029, 3355, 0), "The house east of the east bank."), + new CrypticClue("Look in the ground floor crates of houses in Falador.", CRATES_24088, new WorldPoint(3029, 3355, 0), "The house east of the eastern bank in Falador."), new CrypticClue("You were 3 and I was the 6th. Come speak to me.", "Vannaka", new WorldPoint(3146, 9913, 0), "Speak to Vannaka in Edgeville Dungeon."), - new CrypticClue("Search the crates in Draynor Manor.", CRATE_11485, new WorldPoint(3106, 3369, 2), "Top floor of the manor"), + new CrypticClue("Search the crates in Draynor Manor.", CRATE_11485, new WorldPoint(3106, 3369, 2), "Top floor of the Draynor Manor."), new CrypticClue("Search the crates near a cart in Varrock.", CRATE_5107, new WorldPoint(3226, 3452, 0), "South east of Varrock Palace, south of the tree farming patch."), - new CrypticClue("A Guthixian ring lies between two peaks. Search the stones and you'll find what you seek.", STONES_26633, new WorldPoint(2922, 3484, 0), "Search the stones several steps west of the Guthixian stone circle in Taverley"), - new CrypticClue("Search the boxes in the house near the south entrance to Varrock.", BOXES_5111, new WorldPoint(3203, 3384, 0), "The first house on the left when entering the city from the southern entrance."), + new CrypticClue("A Guthixian ring lies between two peaks. Search the stones and you'll find what you seek.", STONES_26633, new WorldPoint(2922, 3484, 0), "Search the stones several steps west of the Guthixian stone circle in Taverley."), + new CrypticClue("Search the boxes in the house near the south entrance to Varrock.", BOXES_5111, new WorldPoint(3203, 3384, 0), "The first house on the left when entering Varrock from the southern entrance."), new CrypticClue("His head might be hollow, but the crates nearby are filled with surprises.", CRATE_354, new WorldPoint(3478, 3091, 0), "Search the crates near the Clay golem in the ruins of Uzer."), new CrypticClue("One of the sailors in Port Sarim is your next destination.", "Captain Tobias", new WorldPoint(3026, 3216, 0), "Speak to Captain Tobias on the docks of Port Sarim."), new CrypticClue("THEY'RE EVERYWHERE!!!! But they were here first. Dig for treasure where the ground is rich with ore.", new WorldPoint(3081, 3421, 0), "Dig at Barbarian Village, next to the Stronghold of Security."), - new CrypticClue("Talk to the mother of a basement dwelling son.", "Doris", new WorldPoint(3079, 3493, 0), "Evil Dave's mother, Doris is located in the house west of Edgeville bank."), + new CrypticClue("Talk to the mother of a basement dwelling son.", "Doris", new WorldPoint(3079, 3493, 0), "Evil Dave's mother, Doris, is located in the house west of Edgeville bank."), new CrypticClue("Speak to Ned in Draynor Village.", "Ned", new WorldPoint(3098, 3258, 0), "Ned is found north of the Draynor bank."), new CrypticClue("Speak to Hans to solve the clue.", "Hans", new WorldPoint(3211, 3219, 0), "Hans can be found at Lumbridge Castle."), - new CrypticClue("Search the crates in Canifis.", CRATE_24344, new WorldPoint(3509, 3497, 0), "Search inside the shop, Rufus' Meat Emporium."), - new CrypticClue("Search the crates in the Dwarven mine.", CRATE_357, new WorldPoint(3035, 9849, 0), "Search the crate in the room east of the Ice Mountain ladder entrance in the Drogo's Mining Emporium."), - new CrypticClue("A crate found in the tower of a church is your next location.", CRATE_357, new WorldPoint(2612, 3304, 1), "Climb the ladder and search the crates on the first floor in the Church in Ardougne"), - new CrypticClue("Covered in shadows, the centre of the circle is where you will find the answer.", new WorldPoint(3488, 3289, 0), "Dig in the centre of Mort'ton, where the roads intersect"), + new CrypticClue("Search the crates in Canifis.", CRATE_24344, new WorldPoint(3509, 3497, 0), "Search inside Rufus' Meat Emporium in Canifis."), + new CrypticClue("Search the crates in the Dwarven mine.", CRATE_357, new WorldPoint(3035, 9849, 0), "Search the crate in the room east of the Ice Mountain ladder entrance in the Drogo's Mining Emporium in the Dwarven Mine."), + new CrypticClue("A crate found in the tower of a church is your next location.", CRATE_357, new WorldPoint(2612, 3304, 1), "Climb the ladder and search the crates on the first floor in the Church in Ardougne."), + new CrypticClue("Covered in shadows, the centre of the circle is where you will find the answer.", new WorldPoint(3488, 3289, 0), "Dig in the centre of Mort'ton, where the roads intersect."), new CrypticClue("I lie lonely and forgotten in mid wilderness, where the dead rise from their beds. Feel free to quarrel and wind me up, and dig while you shoot their heads.", new WorldPoint(3174, 3663, 0), "Directly under the crossbow respawn in the Graveyard of Shadows in level 18 Wilderness."), - new CrypticClue("In the city where merchants are said to have lived, talk to a man with a splendid cape, but a hat dropped by goblins.", "Head chef", new WorldPoint(3143, 3445, 0), "Talk to the Head chef in Cooks' Guild west of Varrock."), + new CrypticClue("In the city where merchants are said to have lived, talk to a man with a splendid cape, but a hat dropped by goblins.", "Head chef", new WorldPoint(3143, 3445, 0), "Talk to the Head chef in Cooks' Guild west of Varrock. You will need a chef hat or cooking cape to enter."), new CrypticClue("The mother of the reptilian sacrifice.", "Zul-Cheray", new WorldPoint(2204, 3050, 0), "Talk to Zul-Cheray in a house near the sacrificial boat at Zul-Andra."), new CrypticClue("I watch the sea. I watch you fish. I watch your tree.", "Ellena", new WorldPoint(2860, 3431, 0), "Speak to Ellena at Catherby fruit tree patch."), new CrypticClue("Dig between some ominous stones in Falador.", new WorldPoint(3040, 3399, 0), "Three standing stones inside a walled area. East of the northern Falador gate."), new CrypticClue("Speak to Rusty north of Falador.", "Rusty", new WorldPoint(2979, 3435, 0), "Rusty can be found northeast of Falador on the way to the Mind altar."), - new CrypticClue("Search a wardrobe in Draynor.", WARDROBE_5622, new WorldPoint(3087, 3261, 0), "Go to Aggie's house and search the wardrobe in northern wall."), + new CrypticClue("Search a wardrobe in Draynor.", WARDROBE_5622, new WorldPoint(3087, 3261, 0), "Go to Aggie's house in Draynor Village and search the wardrobe in northern wall."), new CrypticClue("I have many arms but legs, I have just one. I have little family but my seed you can grow on, I am not dead, yet I am but a spirit, and my power, on your quests, you will earn the right to free it.", NULL_1293, new WorldPoint(2544, 3170, 0), "Spirit Tree in Tree Gnome Village. Answer: 13112221", "What is the next number in the sequence? 1, 11, 21, 1211, 111221, 312211"), new CrypticClue("I am the one who watches the giants. The giants in turn watch me. I watch with two while they watch with one. Come seek where I may be.", "Kamfreena", new WorldPoint(2845, 3539, 0), "Speak to Kamfreena on the top floor of the Warriors' Guild."), new CrypticClue("In a town where wizards are known to gather, search upstairs in a large house to the north.", "Man", 375, new WorldPoint(2593, 3108, 1), "Search the chest upstairs in the house north of Yanille Wizard's Guild. Kill a man for the key."), @@ -122,7 +122,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc 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("And so on, and so on, and so on. Walking from the land of many unimportant things leads to a choice of paths.", new WorldPoint(2591, 3879, 0), "Dig on Etceteria next to the Evergreen tree in front of the castle walls."), - new CrypticClue("Speak to Donovan, the Family Handyman.", "Donovan the Family Handyman", new WorldPoint(2743, 3578, 0), "Donovan the Family Handyman is found on the first floor of Sinclair Mansion."), + new CrypticClue("Speak to Donovan, the Family Handyman.", "Donovan the Family Handyman", new WorldPoint(2743, 3578, 0), "Donovan the Family Handyman is found on the first floor of Sinclair Mansion, north of Seers' Village."), new CrypticClue("Search the crates in the Barbarian Village helmet shop.", CRATES_11600, new WorldPoint(3073, 3430, 0), "Peksa's Helmet Shop in Barbarian Village."), new CrypticClue("Search the boxes of Falador's general store.", CRATES_24088, new WorldPoint(2955, 3390, 0), "Falador general store."), new CrypticClue("In a village made of bamboo, look for some crates under one of the houses.", CRATE_356, new WorldPoint(2800, 3074, 0), "Search the crate by the house at the northern point of the broken jungle fence in Tai Bwo Wannai."), @@ -131,19 +131,19 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("In a town where the guards are armed with maces, search the upstairs rooms of the Public House.", "Guard dog", 348, new WorldPoint(2574, 3326, 1), "Search the drawers upstairs in the pub north of Ardougne Castle. Kill a Guard dog at Handelmort Mansion to obtain the key."), new CrypticClue("Four blades I have, yet draw no blood; Still I turn my prey to powder. If you are brave, come search my roof; It is there my blades are louder.", CRATE_12963, new WorldPoint(3166, 3309, 2), "Lumbridge windmill, search the crates on the top floor."), new CrypticClue("Search through some drawers in the upstairs of a house in Rimmington.", DRAWERS_352, new WorldPoint(2970, 3214, 1), "On the first floor of the house north of Hetty the Witch's house in Rimmington."), - new CrypticClue("Probably filled with books on magic.", BOOKCASE_380, new WorldPoint(3096, 9572, 0), "Search the bookcase in the basement of Wizard's Tower. Fairy ring DIS"), - new CrypticClue("If you look closely enough, it seems that the archers have lost more than their needles.", HAYSTACK, new WorldPoint(2672, 3416, 0), "Search the haystack by the south corner of the Rangers' Guild"), + new CrypticClue("Probably filled with books on magic.", BOOKCASE_380, new WorldPoint(3096, 9572, 0), "Search the bookcase in the basement of Wizards' Tower. Fairy ring DIS."), + new CrypticClue("If you look closely enough, it seems that the archers have lost more than their needles.", HAYSTACK, new WorldPoint(2672, 3416, 0), "Search the haystack by the south corner of the Ranging Guild."), new CrypticClue("Search the crate in the left-hand tower of Lumbridge Castle.", CRATE_357, new WorldPoint(3228, 3212, 1), "Located on the first floor of the southern tower at the Lumbridge Castle entrance."), new CrypticClue("'Small shoe.' Often found with rod on mushroom.", "Gnome trainer", new WorldPoint(2476, 3428, 0), "Talk to any Gnome trainer in the agility area of the Tree Gnome Stronghold."), new CrypticClue("I live in a deserted crack collecting soles.", "Genie", new WorldPoint(3371, 9320, 0), "Enter the crack west of Nardah Rug merchant, and talk to the Genie. You'll need a light source and a rope.", true), new CrypticClue("46 is my number. My body is the colour of burnt orange and crawls among those with eight. Three mouths I have, yet I cannot eat. My blinking blue eye hides my grave.", new WorldPoint(3170, 3885, 0), "Sapphire respawn in the Spider's Nest, lvl 46 Wilderness. Dig under the sapphire spawn."), - new CrypticClue("Green is the colour of my death as the winter-guise, I swoop towards the ground.", new WorldPoint(2780, 3783, 0), "Players need to slide down to where Trollweiss grows on Trollweiss Mountain. Bring a sled"), - new CrypticClue("Talk to a party-goer in Falador.", "Lucy", new WorldPoint(3046, 3382, 0), "Lucy is the bartender on the first floor of the party room."), + new CrypticClue("Green is the colour of my death as the winter-guise, I swoop towards the ground.", new WorldPoint(2780, 3783, 0), "Slide down to where Trollweiss grows on Trollweiss Mountain. Bring a sled."), + new CrypticClue("Talk to a party-goer in Falador.", "Lucy", new WorldPoint(3046, 3382, 0), "Lucy is the bartender on the first floor of the Falador party room."), new CrypticClue("He knows just how easy it is to lose track of time.", "Brother Kojo", new WorldPoint(2570, 3250, 0), "Speak to Brother Kojo in the Clock Tower. Answer: 22", "On a clock, how many times a day do the minute hand and the hour hand overlap?"), new CrypticClue("A great view - watch the rapidly drying hides get splashed. Check the box you are sitting on.", BOXES, new WorldPoint(2523, 3493, 1), "Almera's House north of Baxtorian Falls, search boxes on the first floor."), - new CrypticClue("Search the Coffin in Edgeville.", COFFIN, new WorldPoint(3091, 3477, 0), "Search the coffin located by the Wilderness teleport lever."), + new CrypticClue("Search the Coffin in Edgeville.", COFFIN, new WorldPoint(3091, 3477, 0), "Search the coffin located by the Edgeville Wilderness teleport lever."), new CrypticClue("When no weapons are at hand, then is the time to reflect. In Saradomin's name, redemption draws closer...", DRAWERS_350, new WorldPoint(2818, 3351, 0), "On Entrana, search the southern drawer in the house with the cooking range."), - new CrypticClue("Search the crates in a house in Yanille that has a piano.", CRATE_357, new WorldPoint(2598, 3105, 0), "The house is located northwest of the bank."), + new CrypticClue("Search the crates in a house in Yanille that has a piano.", CRATE_357, new WorldPoint(2598, 3105, 0), "The house is located northwest of the bank in Yanille."), new CrypticClue("Speak to the staff of Sinclair mansion.", "Louisa", new WorldPoint(2736, 3578, 0), "Speak to Louisa, on the ground floor, found at the Sinclair Mansion. Fairy ring CJR"), new CrypticClue("I am a token of the greatest love. I have no beginning or end. My eye is red, I can fit like a glove. Go to the place where it's money they lend, And dig by the gate to be my friend.", new WorldPoint(3191, 9825, 0), "Dig by the gate in the basement of the West Varrock bank."), new CrypticClue("Speak to Kangai Mau.", "Kangai Mau", new WorldPoint(2791, 3183, 0), "Kangai Mau is found in the Shrimp and Parrot in Brimhaven."), @@ -154,11 +154,11 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Search the crates in the Port Sarim Fishing shop.", CRATE_9534, new WorldPoint(3012, 3222, 0), "Search the crates, by the door, in Gerrant's Fishy Business in Port Sarim."), new CrypticClue("Speak to The Lady of the Lake.", "The Lady of the Lake", new WorldPoint(2924, 3405, 0), "Talk to The Lady of the Lake in Taverley."), new CrypticClue("Rotting next to a ditch. Dig next to the fish.", new WorldPoint(3547, 3183, 0), "Dig next to a fishing spot on the south-east side of Burgh de Rott."), - new CrypticClue("The King's magic won't be wasted by me.", "Guardian Mummy", new WorldPoint(1934, 4427, 0), "Talk to the Guardian mummy inside the Pyramid Plunder minigame in Sophanem"), - new CrypticClue("Dig where the forces of Zamorak and Saradomin collide.", new WorldPoint(3049, 4839, 0), "Dig next to the law rift in the Abyss"), - new CrypticClue("Search the boxes in the goblin house near Lumbridge.", BOXES, new WorldPoint(3245, 3245, 0), "Goblin house on the eastern side of the river."), - new CrypticClue("W marks the spot.", new WorldPoint(2867, 3546, 0), "Dig in the middle of the Warriors' Guild entrance hall"), - new CrypticClue("There is no 'worthier' lord.", "Lord Iorwerth", new WorldPoint(2205, 3252, 0), "Speak to Lord Iorwerth in the elven camp near Prifddinas"), + new CrypticClue("The King's magic won't be wasted by me.", "Guardian Mummy", new WorldPoint(1934, 4427, 0), "Talk to the Guardian mummy inside the Pyramid Plunder minigame in Sophanem."), + new CrypticClue("Dig where the forces of Zamorak and Saradomin collide.", new WorldPoint(3049, 4839, 0), "Dig next to the law rift in the Abyss."), + new CrypticClue("Search the boxes in the goblin house near Lumbridge.", BOXES, new WorldPoint(3245, 3245, 0), "Goblin house on the eastern side of the river outside of Lumbridge."), + new CrypticClue("W marks the spot.", new WorldPoint(2867, 3546, 0), "Dig in the middle of the Warriors' Guild entrance hall."), + new CrypticClue("There is no 'worthier' lord.", "Lord Iorwerth", new WorldPoint(2205, 3252, 0), "Speak to Lord Iorwerth in the elven camp southwest of Prifddinas."), new CrypticClue("Surviving.", "Sir Vyvin", new WorldPoint(2983, 3338, 0), "Talk to Sir Vyvin on the second floor of Falador castle."), new CrypticClue("My name is like a tree, yet it is spelt with a 'g'. Come see the fur which is right near me.", "Wilough", new WorldPoint(3221, 3435, 0), "Speak to Wilough, next to the Fur Merchant in Varrock Square."), new CrypticClue("Speak to Jatix in Taverley.", "Jatix", new WorldPoint(2898, 3428, 0), "Jatix is found in the middle of Taverley."), @@ -182,44 +182,44 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Between where the best are commemorated for a year, and a celebratory cup, not just for beer.", new WorldPoint(3388, 3152, 0), "Dig at the Clan Cup Trophy at Clan Wars."), new CrypticClue("'See you in your dreams' said the vegetable man.", "Dominic Onion", new WorldPoint(2608, 3116, 0), "Speak to Dominic Onion at the Nightmare Zone teleport spot."), new CrypticClue("Try not to step on any aquatic nasties while searching this crate.", CRATE_18204, new WorldPoint(2764, 3273, 0), "Search the crate in Bailey's house on the Fishing Platform."), - new CrypticClue("The cheapest water for miles around, but they react badly to religious icons.", CRATE_354, new WorldPoint(3178, 2987, 0), "Search the crates in the General Store tent in the Bandit Camp"), + new CrypticClue("The cheapest water for miles around, but they react badly to religious icons.", CRATE_354, new WorldPoint(3178, 2987, 0), "Search the crates in the General Store tent in the Desert Bandit Camp."), new CrypticClue("This village has a problem with cartloads of the undead. Try checking the bookcase to find an answer.", BOOKCASE_394, new WorldPoint(2833, 2992, 0), "Search the bookcase by the doorway of the building just south east of the Shilo Village Gem Mine."), new CrypticClue("Dobson is my last name, and with gardening I seek fame.", "Horacio", new WorldPoint(2635, 3310, 0), "Horacio, located in the garden of the Handelmort Mansion in East Ardougne."), new CrypticClue("The magic of 4 colours, an early experience you could learn. The large beast caged up top, rages, as his demised kin's loot now returns.", "Wizard Mizgog", new WorldPoint(3103, 3163, 2), "Speak to Wizard Mizgog at the top of the Wizard's Tower south of Draynor."), new CrypticClue("Aggie I see. Lonely and southern I feel. I am neither inside nor outside the house, yet no home would be complete without me. The treasure lies beneath me!", new WorldPoint(3085, 3255, 0), "Dig outside the window of Aggie's house in Draynor Village."), - new CrypticClue("Search the chest in Barbarian Village.", CLOSED_CHEST_375, new WorldPoint(3085, 3429, 0), "The chest located in the house with a spinning wheel."), - new CrypticClue("Search the crates in the outhouse of the long building in Taverley.", CRATE_357, new WorldPoint(2914, 3433, 0), "Located in the small building attached by a fence to the main building. Climb over the stile."), + new CrypticClue("Search the chest in Barbarian Village.", CLOSED_CHEST_375, new WorldPoint(3085, 3429, 0), "The chest located in the house with a spinning wheel in Barbarian Village."), + new CrypticClue("Search the crates in the outhouse of the long building in Taverley.", CRATE_357, new WorldPoint(2914, 3433, 0), "Located in the small building attached by a fence to the main building in Taverley. Climb over the stile."), new CrypticClue("Talk to Ermin.", "Ermin", new WorldPoint(2488, 3409, 1), "Ermin can be found on the first floor of the tree house south-east of the Gnome Agility Course."), new CrypticClue("Ghostly bones.", null, "Kill an Ankou."), new CrypticClue("Search through chests found in the upstairs of houses in eastern Falador.", CLOSED_CHEST_375, new WorldPoint(3041, 3364, 1), "The house is located southwest of the Falador Party Room. There are two chests in the room, search the northern chest."), new CrypticClue("Let's hope you don't meet a watery death when you encounter this fiend.", null, "Kill a waterfiend."), new CrypticClue("Reflection is the weakness for these eyes of evil.", null, "Kill a basilisk."), - new CrypticClue("Search a bookcase in Lumbridge swamp.", BOOKCASE_9523, new WorldPoint(3146, 3177, 0), "Located in Father Urhney's house."), + new CrypticClue("Search a bookcase in Lumbridge swamp.", BOOKCASE_9523, new WorldPoint(3146, 3177, 0), "Located in Father Urhney's house in Lumbridge Swamp."), new CrypticClue("Surround my bones in fire, ontop the wooden pyre. Finally lay me to rest, before my one last test.", null, "Kill a confused/lost barbarian to receive mangled bones. Construct and burn a pyre ship. Kill the ferocious barbarian spirit that spawns to receive a clue casket."), new CrypticClue("Fiendish cooks probably won't dig the dirty dishes.", new WorldPoint(3043, 4974, 1), "Dig by the fire in the Rogues' Den."), new CrypticClue("My life was spared but these voices remain, now guarding these iron gates is my bane.", "Key Master", new WorldPoint(1310, 1251, 0), "Speak to the Key Master in Cerberus' Lair."), - new CrypticClue("Search the boxes in one of the tents in Al Kharid.", BOXES_361, new WorldPoint(3308, 3206, 0), "Search the boxes in the tent east of the Silk trader."), + new CrypticClue("Search the boxes in one of the tents in Al Kharid.", BOXES_361, new WorldPoint(3308, 3206, 0), "Search the boxes in the tent east of the Al Kharid Silk trader."), new CrypticClue("One of several rhyming brothers, in business attire with an obsession for paper work.", "Piles", new WorldPoint(3186, 3936, 0), "Speak to Piles in the Wilderness Resource Area. An entry fee of 7,500 coins is required, or less if Wilderness Diaries have been completed."), - 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 East Ardougne 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("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("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("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 in one of Gertrude's bedrooms.", DRAWERS_7194, new WorldPoint(3156, 3406, 0), "Kanel's bedroom (southeastern room), outside of west Varrock."), + new CrypticClue("Search the drawers in one of Gertrude's bedrooms.", DRAWERS_7194, new WorldPoint(3156, 3406, 0), "Kanel's bedroom (southeastern room), in Gertrude's house south of the Cooking Guild."), new CrypticClue("Under a giant robotic bird that cannot fly.", new WorldPoint(1756, 4940, 0), "Dig next to the terrorbird display in the south exhibit of Varrock Museum's basement."), - new CrypticClue("Great demons, dragons and spiders protect this blue rock, beneath which, you may find what you seek.", new WorldPoint(3045, 10265, 0), "Dig by the runite rock in the Lava Maze Dungeon"), + new CrypticClue("Great demons, dragons and spiders protect this blue rock, beneath which, you may find what you seek.", new WorldPoint(3045, 10265, 0), "Dig by the runite rock in the Lava Maze Dungeon."), new CrypticClue("My giant guardians below the market streets would be fans of rock and roll, if only they could grab hold of it. Dig near my green bubbles!", new WorldPoint(3161, 9904, 0), "Dig near the cauldron by Moss Giants under Varrock Sewers"), - new CrypticClue("Varrock is where I reside, not the land of the dead, but I am so old, I should be there instead. Let's hope your reward is as good as it says, just 1 gold one and you can have it read.", "Gypsy Aris", new WorldPoint(3203, 3424, 0), "Talk to Gypsy Aris, West of varrock main square."), + new CrypticClue("Varrock is where I reside, not the land of the dead, but I am so old, I should be there instead. Let's hope your reward is as good as it says, just 1 gold one and you can have it read.", "Gypsy Aris", new WorldPoint(3203, 3424, 0), "Talk to Gypsy Aris, West of Varrock main square."), new CrypticClue("Speak to a referee.", "Gnome ball referee", new WorldPoint(2386, 3487, 0), "Talk to a Gnome ball referee found on the Gnome ball field in the Gnome Stronghold. Answer: 5096", "What is 57 x 89 + 23?"), new CrypticClue("This crate holds a better reward than a broken arrow.", CRATE_356, new WorldPoint(2671, 3437, 0), "Inside the Ranging Guild. Search the crate behind the northern most building."), - new CrypticClue("Search the drawers in the house next to the Port Sarim mage shop.", DRAWERS, new WorldPoint(3024, 3259, 0), "House east of Betty's. Contains a cooking sink."), + new CrypticClue("Search the drawers in the house next to the Port Sarim mage shop.", DRAWERS, new WorldPoint(3024, 3259, 0), "House east of Betty's Mage shop in Port Sarim. Contains a cooking sink."), new CrypticClue("With a name like that, you'd expect a little more than just a few scimitars.", "Daga", new WorldPoint(2759, 2775, 0), "Speak to Daga on Ape Atoll."), new CrypticClue("Strength potions with red spiders' eggs? He is quite a herbalist.", "Apothecary", new WorldPoint(3194, 3403, 0), "Talk to Apothecary in the South-western Varrock. (the) apothecary is just north-west of the Varrock Swordshop."), new CrypticClue("Robin wishes to see your finest ranged equipment.", "Robin", new WorldPoint(3673, 3492, 0), "Robin at the inn in Port Phasmatys. Speak to him with +182 in ranged attack bonus. Bonus granted by the toxic blowpipe is ignored."), new CrypticClue("You will need to under-cook to solve this one.", CRATE_357, new WorldPoint(3219, 9617, 0), "Search the crate in the Lumbridge basement."), - new CrypticClue("Search through some drawers found in Taverley's houses.", DRAWERS_350, new WorldPoint(2894, 3418, 0), "The south-eastern most house, south of Jatix's Herblore Shop."), + new CrypticClue("Search through some drawers found in Taverley's houses.", DRAWERS_350, new WorldPoint(2894, 3418, 0), "The south-eastern most house in Taverly, south of Jatix's Herblore Shop."), new CrypticClue("Anger Abbot Langley.", "Abbot Langley", new WorldPoint(3058, 3487, 0), "Speak to Abbot Langley in the Edgeville Monastery while you have a negative prayer bonus (currently only possible with an Ancient staff)."), new CrypticClue("Dig where only the skilled, the wealthy, or the brave can choose not to visit again.", new WorldPoint(3221, 3219, 0), "Dig at Lumbridge spawn"), new CrypticClue("Scattered coins and gems fill the floor. The chest you seek is in the north east.", "King Black Dragon", CLOSED_CHEST_375, new WorldPoint(2288, 4702, 0), "Kill the King Black Dragon for a key (elite), and then open the closed chest in the NE corner of the lair."), @@ -231,30 +231,30 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Talk to Cassie in Falador.", "Cassie", new WorldPoint(2975, 3383, 0), "Cassie is found just south-east of the northern Falador gate."), new CrypticClue("Faint sounds of 'Arr', fire giants found deep, the eastern tip of a lake, are the rewards you could reap.", new WorldPoint(3055, 10338, 0), "Dig south of the pillar in the Deep Wilderness Dungeon in the room with the fire giants."), new CrypticClue("If you're feeling brave, dig beneath the dragon's eye.", new WorldPoint(2410, 4714, 0), "Dig below the mossy rock under the Viyeldi caves (Legend's Quest). Items needed: Pickaxe, unpowered orb, lockpick, spade, any charge orb spell, and either 79 agility or an axe and machete."), - new CrypticClue("Search the tents in the Imperial Guard camp in Burthorpe for some boxes.", BOXES_3686, new WorldPoint(2885, 3540, 0), "Search in the tents in northwest corner of the camp."), - new CrypticClue("A dwarf, approaching death, but very much in the light.", "Thorgel", new WorldPoint(1863, 4639, 0), "Thorgel at the entrance to the Death altar"), - new CrypticClue("You must be 100 to play with me.", "Squire (Veteran)", new WorldPoint(2638, 2656, 0), "Speak to the Veteran boat squire at Pest Control"), + new CrypticClue("Search the tents in the Imperial Guard camp in Burthorpe for some boxes.", BOXES_3686, new WorldPoint(2885, 3540, 0), "Search in the tents in the northwest corner of the soldiers' camp in Burthrope."), + new CrypticClue("A dwarf, approaching death, but very much in the light.", "Thorgel", new WorldPoint(1863, 4639, 0), "Speak to Thorgel at the entrance to the Death altar."), + new CrypticClue("You must be 100 to play with me.", "Squire (Veteran)", new WorldPoint(2638, 2656, 0), "Speak to the Veteran boat squire at Pest Control."), new CrypticClue("Three rule below and three sit at top. Come dig at my entrance.", new WorldPoint(2523, 3739, 0), "Dig in front of the entrance to the Waterbirth Island Dungeon."), new CrypticClue("Search the drawers in the ground floor of a shop in Yanille.", DRAWERS_350, new WorldPoint(2570, 3085, 0), "Search the drawers in Yanille's hunting shop."), new CrypticClue("Search the drawers of houses in Burthorpe.", DRAWERS, new WorldPoint(2929, 3570, 0), "Inside Hild's house in the northeast corner of Burthorpe."), - new CrypticClue("Where safe to speak, the man who offers the pouch of smallest size wishes to see your alignment.", "Mage of Zamorak", new WorldPoint(3260, 3385, 0), "Speak to the Mage of Zamorak south of the Rune Shop in Varrock while wearing three zamorakian items"), - new CrypticClue("Search the crates in the guard house of the northern gate of East Ardougne.", CRATE_356, new WorldPoint(2645, 3338, 0), "The guard house is northeast of the Handelmort Mansion."), + new CrypticClue("Where safe to speak, the man who offers the pouch of smallest size wishes to see your alignment.", "Mage of Zamorak", new WorldPoint(3260, 3385, 0), "Speak to the Mage of Zamorak south of the Rune Shop in Varrock while wearing three Zamorakian items."), + new CrypticClue("Search the crates in the guard house of the northern gate of East Ardougne.", CRATE_356, new WorldPoint(2645, 3338, 0), "The guard house northwest of the East Ardougne market."), new CrypticClue("Go to the village being attacked by trolls, search the drawers in one of the houses.", "Penda", DRAWERS_350, new WorldPoint(2921, 3577, 0), "Go to Dunstan's house in the northeast corner of Burthorpe. Kill Penda in the Toad and Chicken to obtain the key."), new CrypticClue("You'll get licked.", null, "Kill a Bloodveld."), new CrypticClue("She's small but can build both literally and figuratively, as long as you have their favour.", "Lovada", new WorldPoint(1486, 3834, 0), "Speak to Lovada by the entrance to the blast mine in Lovakengj."), - new CrypticClue("Dig in front of the icy arena where 1 of 4 was fought.", new WorldPoint(2874, 3757, 0), "Where you fought Kamil from Desert Treasure."), + new CrypticClue("Dig in front of the icy arena where 1 of 4 was fought.", new WorldPoint(2874, 3757, 0), "North of Trollheim, where you fought Kamil from Desert Treasure."), new CrypticClue("Speak to Roavar.", "Roavar", new WorldPoint(3494, 3474, 0), "Talk to Roavar in the Canifis tavern."), - new CrypticClue("Search the drawers upstairs of houses in the eastern part of Falador.", DRAWERS_350, new WorldPoint(3035, 3347, 1), "House is located east of the eastern Falador bank and south of the fountain. The house is indicated by the icon on the minimap."), + new CrypticClue("Search the drawers upstairs of houses in the eastern part of Falador.", DRAWERS_350, new WorldPoint(3035, 3347, 1), "House is located east of the eastern Falador bank and south of the fountain. The house is indicated by a cooking range icon on the minimap."), new CrypticClue("Search the drawers found upstairs in East Ardougne's houses.", DRAWERS, new WorldPoint(2574, 3326, 1), "Upstairs of the pub north of the Ardougne Castle."), new CrypticClue("The far north eastern corner where 1 of 4 was defeated, the shadows still linger.", new WorldPoint(2744, 5116, 0), "Dig on the northeastern-most corner of the Shadow Dungeon. Bring a ring of visibility."), new CrypticClue("Search the drawers in a house in Draynor Village.", DRAWERS_350, new WorldPoint(3097, 3277, 0), "The drawer is located in the northernmost house in Draynor Village."), - new CrypticClue("Search the boxes in a shop in Taverley.", BOXES_360, new WorldPoint(2886, 3449, 0), "The box inside Gaius' Two Handed Shop."), + new CrypticClue("Search the boxes in a shop in Taverley.", BOXES_360, new WorldPoint(2886, 3449, 0), "The box inside Gaius' Two Handed Shop in Taverley."), new CrypticClue("I lie beneath the first descent to the holy encampment.", new WorldPoint(2914, 5300, 1), "Dig immediately after climbing down the first set of rocks towards Saradomin's encampment within the God Wars Dungeon."), new CrypticClue("Search the upstairs drawers of a house in a village where pirates are known to have a good time.", "Pirate", 348, new WorldPoint(2809, 3165, 1), "The house in the southeast corner of Brimhaven, northeast of Davon's Amulet Store. Kill any Pirate located around Brimhaven to obtain the key."), new CrypticClue("Search the chest in the Duke of Lumbridge's bedroom.", CLOSED_CHEST_375, new WorldPoint(3209, 3218, 1), "The Duke's room is on the first floor in Lumbridge Castle."), new CrypticClue("Talk to the Doomsayer.", "Doomsayer", new WorldPoint(3232, 3228, 0), "Doomsayer can be found just north of Lumbridge Castle entrance."), - new CrypticClue("Search the chests upstairs in Al Kharid Palace.", CLOSED_CHEST_375, new WorldPoint(3301, 3169, 1), "The chest is located, in the northeast corner, on the first floor of the Al Kharid Palace"), - new CrypticClue("Search the boxes just outside the Armour shop in East Ardougne.", BOXES_361, new WorldPoint(2654, 3299, 0), "Outside Zenesha's Plate Mail Body Shop"), + new CrypticClue("Search the chests upstairs in Al Kharid Palace.", CLOSED_CHEST_375, new WorldPoint(3301, 3169, 1), "The chest is located, in the northeast corner, on the first floor of the Al Kharid Palace."), + new CrypticClue("Search the boxes just outside the Armour shop in East Ardougne.", BOXES_361, new WorldPoint(2654, 3299, 0), "Outside Zenesha's Plate Mail Body Shop in East Ardougne."), new CrypticClue("Surrounded by white walls and gems.", "Herquin", new WorldPoint(2945, 3335, 0), "Talk to Herquin, the gem store owner in Falador."), new CrypticClue("Monk's residence in the far west. See robe storage device.", DRAWERS_350, new WorldPoint(1746, 3490, 0), "Search the drawers in the south tent of the monk's camp on the southern coast of Hosidius, directly south of the player-owned house portal."), new CrypticClue("Search the drawers in Catherby's Archery shop.", DRAWERS_350, new WorldPoint(2825, 3442, 0), "Hickton's Archery Emporium in Catherby."), @@ -270,9 +270,9 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Come brave adventurer, your sense is on fire. If you talk to me, it's an old god you desire.", "Viggora", null, "Speak to Viggora while wearing a ring of visibility and a Ghostspeak amulet."), new CrypticClue("2 musical birds. Dig in front of the spinning light.", new WorldPoint(2671, 10396, 0), "Dig in front of the spinning light in Ping and Pong's room inside the Iceberg"), new CrypticClue("Search the wheelbarrow in Rimmington mine.", WHEELBARROW_9625, new WorldPoint(2978, 3239, 0), "The Rimmington mining site is located north of Rimmington."), - new CrypticClue("Belladonna, my dear. If only I had gloves, then I could hold you at last.", "Tool Leprechaun", new WorldPoint(3088, 3357, 0), "Talk to Tool Leprechaun at Draynor Manor"), + new CrypticClue("Belladonna, my dear. If only I had gloves, then I could hold you at last.", "Tool Leprechaun", new WorldPoint(3088, 3357, 0), "Talk to Tool Leprechaun at Draynor Manor."), new CrypticClue("Impossible to make angry", "Abbot Langley", new WorldPoint(3059, 3486, 0), "Speak to Abbot Langley at the Edgeville Monastery."), - new CrypticClue("Search the crates in Horvik's armoury.", CRATE_5106, new WorldPoint(3228, 3433, 0), "Horvik's in Varrock"), + new CrypticClue("Search the crates in Horvik's armoury.", CRATE_5106, new WorldPoint(3228, 3433, 0), "Horvik's in Varrock."), new CrypticClue("Ghommal wishes to be impressed by how strong your equipment is.", "Ghommal", new WorldPoint(2878, 3546, 0), "Speak to Ghommal at the Warriors' Guild with a total Melee Strength bonus of over 100."), new CrypticClue("Shhhh!", "Logosia", new WorldPoint(1633, 3808, 0), "Speak to Logosia in the Arceuus Library's ground floor."), new CrypticClue("Salty peter.", "Konoo", new WorldPoint(1703, 3524, 0), "Talk to Konoo who is digging saltpetre in Hosidius, north-east of the Woodcutting Guild."), @@ -281,7 +281,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Search the drawers in the upstairs of a house in Catherby.", DRAWERS_350, new WorldPoint(2809, 3451, 1), "Perdu's house in Catherby."), new CrypticClue("Search a crate in the Haymaker's arms.", CRATE_27532, new WorldPoint(1720, 3652, 1), "Search the crate in the north-east corner of The Haymaker's Arms tavern east of Kourend Castle."), new CrypticClue("Desert insects is what I see. Taking care of them was my responsibility. Your solution is found by digging near me.", new WorldPoint(3307, 9505, 0), "Dig next to the Entomologist, Kalphite area, near Shantay Pass."), - new CrypticClue("Search the crates in the most north-western house in Al Kharid.", CRATE_358, new WorldPoint(3289, 3202, 0), "Search the crates in the house, marked with a icon, southeast of the gem stall."), + new CrypticClue("Search the crates in the most north-western house in Al Kharid.", CRATE_358, new WorldPoint(3289, 3202, 0), "Search the crates in the house, marked with a cooking range icon, southeast of the gem stall in Al Kharid."), new CrypticClue("You will have to fly high where a sword cannot help you.", null, "Kill an Aviansie."), new CrypticClue("A massive battle rages beneath so be careful when you dig by the large broken crossbow.", new WorldPoint(2927, 3761, 0), "NE of the God Wars Dungeon entrance, climb the rocky handholds & dig by large crossbow."), new CrypticClue("Mix yellow with blue and add heat, make sure you bring protection.", null, "Kill a green or brutal green dragon."), @@ -292,17 +292,17 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("You have all of the elements available to solve this clue. Fortunately you do not have to go as far as to stand in a draft.", CRATE_18506, new WorldPoint(2723, 9891, 0), "Search the crate, west of the Air Elementals, inside the Elemental Workshop."), new CrypticClue("A demon's best friend holds the next step of this clue.", null, "Kill a hellhound."), new CrypticClue("Dig in the centre of a great kingdom of 5 cities.", new WorldPoint(1639, 3673, 0), "Dig in front of the large statue in the centre of Great Kourend."), - new CrypticClue("Hopefully this set of armour will help you to keep surviving.", "Sir Vyvin", new WorldPoint(2982, 3336, 2), "Speak to Sir Vyvin while wearing a white platebody, and platelegs."), + new CrypticClue("Hopefully this set of armour will help you to keep surviving.", "Sir Vyvin", new WorldPoint(2982, 3336, 2), "Speak to Sir Vyvin, located in the White Knight's Castle, while wearing a white platebody and platelegs."), new CrypticClue("The beasts retreat, for their Queen is gone; the song of this town still plays on. Dig near the birthplace of a blade, be careful not to melt your spade.", new WorldPoint(2342, 3677, 0), "Dig in front of the small furnace in the Piscatoris Fishing Colony."), new CrypticClue("Darkness wanders around me, but fills my mind with knowledge.", "Biblia", new WorldPoint(1633, 3825, 2), "Speak to Biblia on the Arceuus Library's top floor."), new CrypticClue("I would make a chemistry joke, but I'm afraid I wouldn't get a reaction.", "Chemist", new WorldPoint(2932, 3212, 0), "Talk to the Chemist in Rimmington"), - new CrypticClue("Show this to Hazelmere.", "Hazelmere", new WorldPoint(2677, 3088, 1), "Hazelmere is found upstairs on the island located just east of Yanille."), - new CrypticClue("Does one really need a fire to stay warm here?", new WorldPoint(3816, 3810, 0), "Dig next to the fire near the Volcanic Mine entrance."), + new CrypticClue("Show this to Hazelmere.", "Hazelmere", new WorldPoint(2677, 3088, 1), "Located upstairs in the house east of Yanille, north of fairy ring CLS."), + new CrypticClue("Does one really need a fire to stay warm here?", new WorldPoint(3816, 3810, 0), "Dig next to the fire near the Volcanic Mine entrance on Fossil Island."), new CrypticClue("Search the open crate found in the Hosidius kitchens.", CRATE_27533, new WorldPoint(1683, 3616, 0), "The kitchens are north-west of the town in Hosidius."), new CrypticClue("Dig under Ithoi's cabin.", new WorldPoint(2529, 2838, 0), "Dig under Ithoi's cabin in the Corsair Cove."), new CrypticClue("Search the drawers, upstairs in the bank to the East of Varrock.", DRAWERS_7194, new WorldPoint(3250, 3420, 1), "Search the drawers upstairs in Varrock east bank."), - new CrypticClue("Speak to Hazelmere.", "Hazelmere", new WorldPoint(2677, 3088, 1), "Located upstairs in the house to the north of fairy ring CLS. Answer: 6859", "What is 19 to the power of 3?"), - new CrypticClue("The effects of this fire are magnified.", new WorldPoint(1179, 3626, 0), "Dig by the fire beside Ket'sal K'uk in the westernmost part of the Kebos Swamp. "), + new CrypticClue("Speak to Hazelmere.", "Hazelmere", new WorldPoint(2677, 3088, 1), "Located upstairs in the house east of Yanille, north of fairy ring CLS. Answer: 6859", "What is 19 to the power of 3?"), + new CrypticClue("The effects of this fire are magnified.", new WorldPoint(1179, 3626, 0), "Dig by the fire beside Ket'sal K'uk in the westernmost part of the Kebos Swamp."), new CrypticClue("Always walking around the castle grounds and somehow knows everyone's age.", "Hans", new WorldPoint(3221, 3218, 0), "Talk to Hans walking around Lumbridge Castle."), new CrypticClue("In the place Duke Horacio calls home, talk to a man with a hat dropped by goblins.", "Cook", new WorldPoint(3208, 3213, 0), "Talk to the Cook in Lumbridge Castle."), new CrypticClue("In a village of barbarians, I am the one who guards the village from up high.", "Hunding", new WorldPoint(3097, 3432, 2), "Talk to Hunding atop the tower on the east side of Barbarian Village."), @@ -310,7 +310,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Near the open desert I reside, to get past me you must abide. Go forward if you dare, for when you pass me, you'll be sweating by your hair.", "Shantay", new WorldPoint(3303, 3123, 0), "Talk to Shantay at the Shantay Pass south of Al Kharid."), new CrypticClue("Search the chest in Fred the Farmer's bedroom.", CLOSED_CHEST_375, new WorldPoint(3185, 3274, 0), "Search the chest by Fred the Farmer's bed in his house north-west of Lumbridge."), new CrypticClue("Search the eastern bookcase in Father Urhney's house.", BOOKCASE_9523, new WorldPoint(3149, 3177, 0), "Father Urhney's house is found in the western end of the Lumbridge Swamp."), - new CrypticClue("Talk to Morgan in his house at Draynor Village.", "Morgan", new WorldPoint(3098, 3268, 0), "Morgan can be found in the house with the quest start map icon."), + new CrypticClue("Talk to Morgan in his house at Draynor Village.", "Morgan", new WorldPoint(3098, 3268, 0), "Morgan can be found in the house with the quest start map icon in Northern Draynor Village."), new CrypticClue("Talk to Charles at Port Piscarilius.", "Charles", new WorldPoint(1821, 3690, 0), "Charles is found by Veos' ship in Port Piscarilius."), new CrypticClue("Search the crate in Rommiks crafting shop in Rimmington.", CRATE_9533, new WorldPoint(2946, 3207, 0), "The crates in Rommik's Crafty Supplies in Rimmington."), new CrypticClue("Talk to Ali the Leaflet Dropper north of the Al Kharid mine.", "Ali the Leaflet Dropper", new WorldPoint(3283, 3329, 0), "Ali the Leaflet Dropper can be found roaming north of the Al Kharid mine."), @@ -319,7 +319,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Search the crates in Falador General store.", CRATES_24088, new WorldPoint(2955, 3390, 0), "The Falador General Store can be found by the northern entrance to the city."), new CrypticClue("Talk to Wayne at Wayne's Chains in Falador.", "Wayne", new WorldPoint(2972, 3312, 0), "Wayne's shop is found directly south of the White Knights' Castle."), new CrypticClue("Search the boxes next to a chest that needs a crystal key.", BOXES_360, new WorldPoint(2915, 3452, 0), "The Crystal chest can be found in the house directly south of the Witch's house in Taverley."), - new CrypticClue("Talk to Turael in Burthorpe.", "Turael", new WorldPoint(2930, 3536, 0), "Turael is located in the small house east of the Toad and Chicken inn."), + new CrypticClue("Talk to Turael in Burthorpe.", "Turael", new WorldPoint(2930, 3536, 0), "Turael is located in the small house east of the Toad and Chicken inn in Burthrope."), new CrypticClue("More resources than I can handle, but in a very dangerous area. Can't wait to strike gold!", new WorldPoint(3183, 3941, 0), "Dig between the three gold ores in the Wilderness Resource Area."), new CrypticClue("Observing someone in a swamp, under the telescope lies treasure.", new WorldPoint(2221, 3091, 0), "Dig next to the telescope on Broken Handz's island in the poison wastes. (Accessible only through fairy ring DLR)"), new CrypticClue("A general who sets a 'shining' example.", "General Hining", new WorldPoint(2186, 3148, 0), "Talk to General Hining in Tyras Camp."), From 233d3d0375b3290ba014732e24799961b0c46458 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 11 Jun 2020 22:22:41 -0400 Subject: [PATCH 42/43] attack styles: fix npe when config values are unset --- .../client/plugins/attackstyles/AttackStylesPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/attackstyles/AttackStylesPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/attackstyles/AttackStylesPlugin.java index 6af99c99f5..7583d7639b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/attackstyles/AttackStylesPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/attackstyles/AttackStylesPlugin.java @@ -203,7 +203,7 @@ public class AttackStylesPlugin extends Plugin { if (event.getGroup().equals("attackIndicator")) { - boolean enabled = event.getNewValue().equals("true"); + boolean enabled = Boolean.TRUE.toString().equals(event.getNewValue()); switch (event.getKey()) { case "warnForDefensive": From bca85099c5b304118a79dc29c43d3768371f5ca4 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Fri, 12 Jun 2020 02:40:45 -0400 Subject: [PATCH 43/43] RunecraftConfig: Add config section for `Show Blood Rift` --- .../net/runelite/client/plugins/runecraft/RunecraftConfig.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/runecraft/RunecraftConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/runecraft/RunecraftConfig.java index 7bb8c23a40..fee0ae86ff 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/runecraft/RunecraftConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/runecraft/RunecraftConfig.java @@ -80,7 +80,8 @@ public interface RunecraftConfig extends Config keyName = "showBlood", name = "Show Blood rift", description = "Configures whether to display the Blood rift", - position = 5 + position = 5, + section = riftSection ) default boolean showBlood() {