Merge remote-tracking branch 'upstream/master' into master

This commit is contained in:
ThatGamerBlue
2021-05-08 03:39:10 +01:00
36 changed files with 461 additions and 85 deletions

View File

@@ -163,6 +163,9 @@ public class RuneLite
parser.accepts("debug", "Show extra debugging output");
parser.accepts("safe-mode", "Disables external plugins and the GPU plugin");
parser.accepts("insecure-skip-tls-verification", "Disables TLS verification");
parser.accepts("jav_config", "jav_config url")
.withRequiredArg()
.defaultsTo(RuneLiteProperties.getJavConfig());
final ArgumentAcceptingOptionSpec<File> sessionfile = parser.accepts("sessionfile", "Use a specified session file")
.withRequiredArg()
@@ -275,7 +278,7 @@ public class RuneLite
try
{
final ClientLoader clientLoader = new ClientLoader(okHttpClient, options.valueOf(updateMode));
final ClientLoader clientLoader = new ClientLoader(okHttpClient, options.valueOf(updateMode), (String) options.valueOf("jav_config"));
new Thread(() ->
{

View File

@@ -61,8 +61,6 @@ import net.runelite.client.util.ExecutorServiceExceptionLogger;
import net.runelite.http.api.RuneLiteAPI;
import net.runelite.http.api.chat.ChatClient;
import okhttp3.OkHttpClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@AllArgsConstructor
public class RuneLiteModule extends AbstractModule
@@ -106,10 +104,6 @@ public class RuneLiteModule extends AbstractModule
bind(EventBus.class)
.annotatedWith(Names.named("Deferred EventBus"))
.to(DeferredEventBus.class);
bind(Logger.class)
.annotatedWith(Names.named("Core Logger"))
.toInstance(LoggerFactory.getLogger(RuneLite.class));
}
@Provides

View File

@@ -231,6 +231,7 @@ public class ChatMessageManager
case OBJECT_EXAMINE:
case NPC_EXAMINE:
case CONSOLE:
case FRIENDSCHATNOTIFICATION:
return JagexColors.CHAT_GAME_EXAMINE_TEXT_OPAQUE_BACKGROUND;
}
}
@@ -251,6 +252,7 @@ public class ChatMessageManager
case OBJECT_EXAMINE:
case NPC_EXAMINE:
case CONSOLE:
case FRIENDSCHATNOTIFICATION:
return JagexColors.CHAT_GAME_EXAMINE_TEXT_TRANSPARENT_BACKGROUND;
}
}

View File

@@ -25,7 +25,6 @@
package net.runelite.client.config;
import java.awt.Color;
import net.runelite.client.ui.JagexColors;
@ConfigGroup("textrecolor")
public interface ChatColorConfig extends Config
@@ -111,15 +110,12 @@ public interface ChatColorConfig extends Config
@ConfigItem(
position = 7,
keyName = "opaqueClanChatInfo",
keyName = "opaqueFriendsChatInfo",
name = "Friends chat info",
description = "Friends Chat Information (eg. when joining a channel)",
section = opaqueSection
)
default Color opaqueFriendsChatInfo()
{
return JagexColors.CHAT_GAME_EXAMINE_TEXT_OPAQUE_BACKGROUND;
}
Color opaqueFriendsChatInfo();
@ConfigItem(
position = 8,
@@ -387,15 +383,12 @@ public interface ChatColorConfig extends Config
@ConfigItem(
position = 57,
keyName = "transparentClanChatInfo",
keyName = "transparentFriendsChatInfo",
name = "Friends chat info (transparent)",
description = "Friends chat information (eg. when joining a channel) (transparent)",
section = transparentSection
)
default Color transparentFriendsChatInfo()
{
return JagexColors.CHAT_GAME_EXAMINE_TEXT_TRANSPARENT_BACKGROUND;
}
Color transparentFriendsChatInfo();
@ConfigItem(
position = 58,

View File

@@ -90,9 +90,9 @@ public class MenuManager
managedMenuOptions.remove(customMenuOption.getWidgetId(), customMenuOption);
}
private boolean menuContainsCustomMenu(WidgetMenuOption customMenuOption)
private static boolean menuContainsCustomMenu(MenuEntry[] menuEntries, WidgetMenuOption customMenuOption)
{
for (MenuEntry menuEntry : client.getMenuEntries())
for (MenuEntry menuEntry : menuEntries)
{
String option = menuEntry.getOption();
String target = menuEntry.getTarget();
@@ -115,23 +115,36 @@ public class MenuManager
int widgetId = event.getActionParam1();
Collection<WidgetMenuOption> options = managedMenuOptions.get(widgetId);
if (options.isEmpty())
{
return;
}
MenuEntry[] menuEntries = client.getMenuEntries();
MenuEntry[] newMenuEntries = Arrays.copyOf(menuEntries, menuEntries.length + options.size());
// Menu entries are sorted with higher-index entries appearing toward the top of the minimenu, so insert older
// managed menu entries at higher indices and work backward for newer entries so newly-added entries appear at
// the bottom
int insertIdx = newMenuEntries.length - 1;
for (WidgetMenuOption currentMenu : options)
{
if (!menuContainsCustomMenu(currentMenu))//Don't add if we have already added it to this widget
// Exit if we've inserted the managed menu entries already
if (menuContainsCustomMenu(menuEntries, currentMenu))
{
MenuEntry[] menuEntries = client.getMenuEntries();
menuEntries = Arrays.copyOf(menuEntries, menuEntries.length + 1);
MenuEntry menuEntry = menuEntries[menuEntries.length - 1] = new MenuEntry();
menuEntry.setOption(currentMenu.getMenuOption());
menuEntry.setParam1(widgetId);
menuEntry.setTarget(currentMenu.getMenuTarget());
menuEntry.setType(MenuAction.RUNELITE.getId());
client.setMenuEntries(menuEntries);
return;
}
MenuEntry menuEntry = new MenuEntry();
menuEntry.setOption(currentMenu.getMenuOption());
menuEntry.setParam1(widgetId);
menuEntry.setTarget(currentMenu.getMenuTarget());
menuEntry.setType(MenuAction.RUNELITE.getId());
newMenuEntries[insertIdx--] = menuEntry;
}
client.setMenuEntries(newMenuEntries);
}
public void addPlayerMenuItem(String menuText)

View File

@@ -45,7 +45,7 @@ public interface AgilityConfig extends Config
@ConfigItem(
keyName = "showClickboxes",
name = "Show Clickboxes",
description = "Show agility course obstacle clickboxes",
description = "Show agility course and other obstacle clickboxes",
position = 0
)
default boolean showClickboxes()

View File

@@ -79,7 +79,7 @@ class AgilityOverlay extends Overlay
{
if (Obstacles.SHORTCUT_OBSTACLE_IDS.containsKey(object.getId()) && !config.highlightShortcuts() ||
Obstacles.TRAP_OBSTACLE_IDS.contains(object.getId()) && !config.showTrapOverlay() ||
Obstacles.COURSE_OBSTACLE_IDS.contains(object.getId()) && !config.showClickboxes() ||
Obstacles.OBSTACLE_IDS.contains(object.getId()) && !config.showClickboxes() ||
Obstacles.SEPULCHRE_OBSTACLE_IDS.contains(object.getId()) && !config.highlightSepulchreObstacles() ||
Obstacles.SEPULCHRE_SKILL_OBSTACLE_IDS.contains(object.getId()) && !config.highlightSepulchreSkilling())
{

View File

@@ -434,7 +434,7 @@ public class AgilityPlugin extends Plugin
return;
}
if (Obstacles.COURSE_OBSTACLE_IDS.contains(newObject.getId()) ||
if (Obstacles.OBSTACLE_IDS.contains(newObject.getId()) ||
Obstacles.PORTAL_OBSTACLE_IDS.contains(newObject.getId()) ||
(Obstacles.TRAP_OBSTACLE_IDS.contains(newObject.getId())
&& Obstacles.TRAP_OBSTACLE_REGIONS.contains(newObject.getWorldLocation().getRegionID())) ||

View File

@@ -36,7 +36,7 @@ import net.runelite.client.game.AgilityShortcut;
class Obstacles
{
static final Set<Integer> COURSE_OBSTACLE_IDS = ImmutableSet.of(
static final Set<Integer> OBSTACLE_IDS = ImmutableSet.of(
// Gnome
OBSTACLE_NET_23134, TREE_BRANCH_23559, TREE_BRANCH_23560, OBSTACLE_NET_23135, OBSTACLE_PIPE_23138,
OBSTACLE_PIPE_23139, LOG_BALANCE_23145, BALANCING_ROPE_23557,
@@ -95,7 +95,10 @@ 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,
// Rellekka Lighthouse
BASALT_ROCK, BASALT_ROCK_4553, BASALT_ROCK_4554, BASALT_ROCK_4556, BASALT_ROCK_4558, ROCKY_SHORE,
BASALT_ROCK_4557, BASALT_ROCK_4555, BASALT_ROCK_4552, BEACH
);
static final Set<Integer> PORTAL_OBSTACLE_IDS = ImmutableSet.of(

View File

@@ -100,8 +100,8 @@ public class ChatCommandsPlugin extends Plugin
private static final Pattern RAIDS_DURATION_PATTERN = Pattern.compile("<col=ef20ff>Congratulations - your raid is complete!</col><br>Team size: <col=ff0000>" + COX_TEAM_SIZES + "</col> Duration:</col> <col=ff0000>[0-9:.]+</col> Personal best: </col><col=ff0000>(?<pb>[0-9:]+(?:\\.[0-9]+)?)</col>");
private static final Pattern TOB_WAVE_PB_PATTERN = Pattern.compile("^.*Theatre of Blood wave completion time: <col=ff0000>(?<pb>[0-9:]+(?:\\.[0-9]+)?)</col> \\(Personal best!\\)");
private static final Pattern TOB_WAVE_DURATION_PATTERN = Pattern.compile("^.*Theatre of Blood wave completion time: <col=ff0000>[0-9:.]+</col><br></col>Personal best: (?<pb>[0-9:]+(?:\\.[0-9]+)?)");
private static final Pattern KILL_DURATION_PATTERN = Pattern.compile("(?i)^(?:Fight |Lap |Challenge |Corrupted challenge )?duration: <col=ff0000>[0-9:.]+</col>\\. Personal best: (?:<col=ff0000>)?(?<pb>[0-9:]+(?:\\.[0-9]+)?)");
private static final Pattern NEW_PB_PATTERN = Pattern.compile("(?i)^(?:Fight |Lap |Challenge |Corrupted challenge )?duration: <col=ff0000>(?<pb>[0-9:]+(?:\\.[0-9]+)?)</col> \\(new personal best\\)");
private static final Pattern KILL_DURATION_PATTERN = Pattern.compile("(?i)^(?:(?:Fight |Lap |Challenge |Corrupted challenge )?duration:|Subdued in) <col=[0-9a-f]{6}>[0-9:.]+</col>\\. Personal best: (?:<col=ff0000>)?(?<pb>[0-9:]+(?:\\.[0-9]+)?)");
private static final Pattern NEW_PB_PATTERN = Pattern.compile("(?i)^(?:(?:Fight |Lap |Challenge |Corrupted challenge )?duration:|Subdued in) <col=[0-9a-f]{6}>(?<pb>[0-9:]+(?:\\.[0-9]+)?)</col> \\(new personal best\\)");
private static final Pattern DUEL_ARENA_WINS_PATTERN = Pattern.compile("You (were defeated|won)! You have(?: now)? won (\\d+) duels?");
private static final Pattern DUEL_ARENA_LOSSES_PATTERN = Pattern.compile("You have(?: now)? lost (\\d+) duels?");
private static final Pattern ADVENTURE_LOG_TITLE_PATTERN = Pattern.compile("The Exploits of (.+)");

View File

@@ -217,6 +217,10 @@ public class ClueScrollPlugin extends Plugin
private final TextComponent textComponent = new TextComponent();
@Getter
private EmoteClue activeSTASHClue;
private EmoteClue clickedSTASHClue;
@Provides
ClueScrollConfig getConfig(ConfigManager configManager)
{
@@ -264,9 +268,11 @@ public class ClueScrollPlugin extends Plugin
return;
}
String message = event.getMessage();
if (clue instanceof HotColdClue)
{
if (((HotColdClue) clue).update(event.getMessage(), this))
if (((HotColdClue) clue).update(message, this))
{
worldMapPointsSet = false;
}
@@ -274,7 +280,7 @@ public class ClueScrollPlugin extends Plugin
if (clue instanceof SkillChallengeClue)
{
String text = Text.removeTags(event.getMessage());
String text = Text.removeTags(message);
if (text.equals("Skill challenge completed.") ||
text.equals("You have completed your master level challenge!") ||
text.startsWith("You have completed Charlie's task,") ||
@@ -283,6 +289,19 @@ public class ClueScrollPlugin extends Plugin
((SkillChallengeClue) clue).setChallengeCompleted(true);
}
}
if (message.endsWith(" the STASH unit."))
{
if (clue instanceof EmoteClue && clickedSTASHClue != null && message.equals("You withdraw your items from the STASH unit."))
{
activeSTASHClue = clickedSTASHClue;
}
else if (message.equals("You deposit your items into the STASH unit."))
{
activeSTASHClue = null;
}
clickedSTASHClue = null;
}
}
@Subscribe
@@ -300,7 +319,11 @@ public class ClueScrollPlugin extends Plugin
@Subscribe
public void onMenuOptionClicked(final MenuOptionClicked event)
{
if (event.getMenuOption() != null && event.getMenuOption().equals("Read"))
if (event.getMenuOption() == null)
{
return;
}
if (event.getMenuOption().equals("Read"))
{
final ItemComposition itemComposition = itemManager.getItemComposition(event.getId());
@@ -310,6 +333,14 @@ public class ClueScrollPlugin extends Plugin
updateClue(MapClue.forItemId(clueItemId));
}
}
else if (event.getMenuOption().equals("Search") && clue instanceof EmoteClue)
{
EmoteClue emoteClue = (EmoteClue) clue;
if (emoteClue.getStashUnit() != null && emoteClue.getStashUnit().getObjectId() == event.getId())
{
clickedSTASHClue = emoteClue;
}
}
}
@Subscribe

View File

@@ -29,6 +29,7 @@ import java.awt.Dimension;
import java.awt.Graphics2D;
import javax.inject.Inject;
import net.runelite.client.plugins.cluescrolls.clues.ClueScroll;
import net.runelite.client.plugins.cluescrolls.clues.EmoteClue;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition;
@@ -61,6 +62,12 @@ public class ClueScrollWorldOverlay extends Overlay
clue.makeWorldOverlayHint(graphics, plugin);
}
EmoteClue activeSTASHClue = plugin.getActiveSTASHClue();
if (activeSTASHClue != null && activeSTASHClue != clue)
{
activeSTASHClue.makeSTASHOverlay(graphics, plugin);
}
return null;
}
}

View File

@@ -79,7 +79,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
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("This aviator is at the peak of his profession.", "Captain Bleemadge", new WorldPoint(2847, 3499, 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("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."),

View File

@@ -311,6 +311,11 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
OverlayUtil.renderTileOverlay(plugin.getClient(), graphics, localPoint, plugin.getEmoteImage(), Color.ORANGE);
}
makeSTASHOverlay(graphics, plugin);
}
public void makeSTASHOverlay(Graphics2D graphics, ClueScrollPlugin plugin)
{
if (stashUnit != null)
{
final WorldPoint[] worldPoints = stashUnit.getWorldPoints();

View File

@@ -87,7 +87,8 @@ public class SkillChallengeClue extends ClueScroll implements NpcClueScroll, Nam
item(ItemID.INFERNAL_PICKAXE_UNCHARGED_25369),
item(ItemID.GILDED_PICKAXE),
item(ItemID._3RD_AGE_PICKAXE),
item(ItemID.CRYSTAL_PICKAXE)
item(ItemID.CRYSTAL_PICKAXE),
item(ItemID.CRYSTAL_PICKAXE_INACTIVE)
);
private static final AnyRequirementCollection ANY_AXE = any("Any Axe",
@@ -106,7 +107,8 @@ public class SkillChallengeClue extends ClueScroll implements NpcClueScroll, Nam
item(ItemID.INFERNAL_AXE_UNCHARGED_25371),
item(ItemID.GILDED_AXE),
item(ItemID._3RD_AGE_AXE),
item(ItemID.CRYSTAL_AXE)
item(ItemID.CRYSTAL_AXE),
item(ItemID.CRYSTAL_AXE_INACTIVE)
);
private static final AnyRequirementCollection ANY_HARPOON = any("Harpoon",
@@ -118,7 +120,8 @@ public class SkillChallengeClue extends ClueScroll implements NpcClueScroll, Nam
item(ItemID.INFERNAL_HARPOON_OR),
item(ItemID.INFERNAL_HARPOON_UNCHARGED),
item(ItemID.INFERNAL_HARPOON_UNCHARGED_25367),
item(ItemID.CRYSTAL_HARPOON)
item(ItemID.CRYSTAL_HARPOON),
item(ItemID.CRYSTAL_HARPOON_INACTIVE)
);
private static final Set<SkillChallengeClue> CLUES = ImmutableSet.of(
@@ -202,7 +205,10 @@ public class SkillChallengeClue extends ClueScroll implements NpcClueScroll, Nam
new SkillChallengeClue("Chop a redwood log.", "chop a redwood log whilst sporting the finest lumberjack gear.", true, ANY_AXE, all("Lumberjack outfit", item(ItemID.LUMBERJACK_HAT), item(ItemID.LUMBERJACK_TOP), item(ItemID.LUMBERJACK_LEGS), item(ItemID.LUMBERJACK_BOOTS))),
new SkillChallengeClue("Craft a light orb in the Dorgesh-Kaan bank.", item(ItemID.CAVE_GOBLIN_WIRE), item(ItemID.EMPTY_LIGHT_ORB)),
new SkillChallengeClue("Kill a reanimated Abyssal Demon.", "kill a reanimated abyssal.", xOfItem(ItemID.SOUL_RUNE, 4), xOfItem(ItemID.BLOOD_RUNE, 2), any("Nature Rune x4", xOfItem(ItemID.NATURE_RUNE, 4), item(ItemID.BRYOPHYTAS_STAFF)), range("Ensouled abyssal head", ItemID.ENSOULED_ABYSSAL_HEAD, ItemID.ENSOULED_ABYSSAL_HEAD_13508)),
new SkillChallengeClue("Kill a Fiyr shade inside Mort'tons shade catacombs.", any("Any Silver Shade Key", item(ItemID.SILVER_KEY_RED), item(ItemID.SILVER_KEY_BROWN), item(ItemID.SILVER_KEY_CRIMSON), item(ItemID.SILVER_KEY_BLACK), item(ItemID.SILVER_KEY_PURPLE)))
new SkillChallengeClue("Kill a Fiyr shade inside Mort'tons shade catacombs.",
any("Any Gold or Silver Shade Key",
item(ItemID.GOLD_KEY_RED), item(ItemID.GOLD_KEY_BROWN), item(ItemID.GOLD_KEY_CRIMSON), item(ItemID.GOLD_KEY_BLACK), item(ItemID.GOLD_KEY_PURPLE),
item(ItemID.SILVER_KEY_RED), item(ItemID.SILVER_KEY_BROWN), item(ItemID.SILVER_KEY_CRIMSON), item(ItemID.SILVER_KEY_BLACK), item(ItemID.SILVER_KEY_PURPLE)))
);
private final ChallengeType type;

View File

@@ -100,7 +100,7 @@ public enum HotColdLocation
KANDARIN_SINCLAR_MANSION(new WorldPoint(2730, 3588, 0), KANDARIN, "North-west of the Sinclair Mansion, near the log balance shortcut.", BRASSICAN_MAGE),
KANDARIN_CATHERBY(new WorldPoint(2774, 3436, 0), KANDARIN, "Catherby, between the bank and the beehives, near small rock formation.", BRASSICAN_MAGE),
KANDARIN_GRAND_TREE(new WorldPoint(2448, 3503, 0), KANDARIN, "Grand Tree, just east of the terrorchick gnome enclosure.", BRASSICAN_MAGE),
KANDARIN_SEERS(new WorldPoint(2735, 3486, 0), KANDARIN, "Between the Seers' Village bank and Camelot.", BRASSICAN_MAGE),
KANDARIN_SEERS(new WorldPoint(2732, 3485, 0), KANDARIN, "Outside Seers' Village bank.", BRASSICAN_MAGE),
KANDARIN_MCGRUBORS_WOOD(new WorldPoint(2653, 3485, 0), KANDARIN, "McGrubor's Wood", BRASSICAN_MAGE),
KANDARIN_FISHING_BUILD(new WorldPoint(2590, 3369, 0), KANDARIN, "South of Fishing Guild", BRASSICAN_MAGE),
KANDARIN_WITCHHAVEN(new WorldPoint(2707, 3306, 0), KANDARIN, "Outside Witchaven, west of Jeb, Holgart, and Caroline.", BRASSICAN_MAGE),

View File

@@ -68,8 +68,8 @@ import okhttp3.OkHttpClient;
*/
@PluginDescriptor(
name = "Examine",
description = "Send examine information to the API",
tags = {"npcs", "items", "inventory", "objects"}
description = "Shows additional examine information (eg. GE Average, HA Value)",
tags = {"npcs", "items", "inventory", "objects", "prices", "high alchemy"}
)
@Slf4j
public class ExaminePlugin extends Plugin

View File

@@ -26,6 +26,7 @@
*/
package net.runelite.client.plugins.friendschat;
import com.google.common.base.MoreObjects;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.Runnables;
@@ -71,6 +72,7 @@ import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetType;
import net.runelite.client.callback.ClientThread;
import net.runelite.client.chat.ChatMessageBuilder;
import net.runelite.client.config.ChatColorConfig;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.events.ConfigChanged;
@@ -119,6 +121,9 @@ public class FriendsChatPlugin extends Plugin
@Inject
private ChatboxPanelManager chatboxPanelManager;
@Inject
private ChatColorConfig chatColorConfig;
private List<String> chats = new ArrayList<>();
private final List<Player> members = new ArrayList<>();
private MembersIndicator membersIndicator;
@@ -388,14 +393,19 @@ public class FriendsChatPlugin extends Plugin
{
final String activityMessage = activityType == ActivityType.JOINED ? " has joined." : " has left.";
final FriendsChatRank rank = member.getRank();
Color textColor = CHAT_FC_TEXT_OPAQUE_BACKGROUND;
Color channelColor = CHAT_FC_NAME_OPAQUE_BACKGROUND;
final Color textColor, channelColor;
int rankIcon = -1;
// Use configured friends chat info colors if set, otherwise default to the jagex text and fc name colors
if (client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1)
{
textColor = CHAT_FC_TEXT_TRANSPARENT_BACKGROUND;
channelColor = CHAT_FC_NAME_TRANSPARENT_BACKGROUND;
textColor = MoreObjects.firstNonNull(chatColorConfig.transparentFriendsChatInfo(), CHAT_FC_TEXT_TRANSPARENT_BACKGROUND);
channelColor = MoreObjects.firstNonNull(chatColorConfig.transparentFriendsChatChannelName(), CHAT_FC_NAME_TRANSPARENT_BACKGROUND);
}
else
{
textColor = MoreObjects.firstNonNull(chatColorConfig.opaqueFriendsChatInfo(), CHAT_FC_TEXT_OPAQUE_BACKGROUND);
channelColor = MoreObjects.firstNonNull(chatColorConfig.opaqueFriendsChatChannelName(), CHAT_FC_NAME_OPAQUE_BACKGROUND);
}
if (config.chatIcons() && rank != null && rank != FriendsChatRank.UNRANKED)

View File

@@ -1078,8 +1078,14 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
{
shutdownAAFbo();
// Bind default FBO to check whether anti-aliasing is forced
gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, 0);
final int forcedAASamples = glGetInteger(gl, gl.GL_SAMPLES);
final int maxSamples = glGetInteger(gl, gl.GL_MAX_SAMPLES);
final int samples = Math.min(antiAliasingMode.getSamples(), maxSamples);
final int samples = forcedAASamples != 0 ? forcedAASamples :
Math.min(antiAliasingMode.getSamples(), maxSamples);
log.debug("AA samples: {}, max samples: {}, forced samples: {}", samples, maxSamples, forcedAASamples);
initAAFbo(stretchedCanvasWidth, stretchedCanvasHeight, samples);

View File

@@ -186,10 +186,10 @@ public class InfoPanel extends PluginPanel
actionsContainer.setBorder(new EmptyBorder(10, 0, 0, 0));
actionsContainer.setLayout(new GridLayout(0, 1, 0, 10));
syncPanel = buildLinkPanel(IMPORT_ICON, "Import local settings", "to remote RuneLite account", () ->
syncPanel = buildLinkPanel(IMPORT_ICON, "Import signed-out", "settings", () ->
{
final int result = JOptionPane.showOptionDialog(syncPanel,
"This will replace your current RuneLite account settings with settings from your local profile.",
"<html>This will overwrite your settings with settings from your local profile, which<br/>is the profile used when not logged into RuneLite with a RuneLite account.</html>",
"Are you sure?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,
null, new String[]{"Yes", "No"}, "No");

View File

@@ -661,4 +661,15 @@ public interface MenuEntrySwapperConfig extends Config
{
return false;
}
@ConfigItem(
keyName = "swapTemporossLeave",
name = "Tempoross Leave",
description = "Swap Talk-to with Leave after subduing Tempoross",
section = npcSection
)
default boolean swapTemporossLeave()
{
return false;
}
}

View File

@@ -132,6 +132,13 @@ public class MenuEntrySwapperPlugin extends Plugin
"brimstail"
);
private static final Set<String> TEMPOROSS_NPCS = ImmutableSet.of(
"captain dudi",
"captain pudi",
"first mate deri",
"first mate peri"
);
@Inject
private Client client;
@@ -223,6 +230,7 @@ public class MenuEntrySwapperPlugin extends Plugin
swap("talk-to", ESSENCE_MINE_NPCS::contains, "teleport", config::swapEssenceMineTeleport);
swap("talk-to", "collect", config::swapCollectMiscellania);
swap("talk-to", "deposit-items", config::swapDepositItems);
swap("talk-to", TEMPOROSS_NPCS::contains, "leave", config::swapTemporossLeave);
swap("leave tomb", "quick-leave", config::swapQuickLeave);
swap("tomb door", "quick-leave", config::swapQuickLeave);

View File

@@ -82,15 +82,17 @@ public class ClientLoader implements Supplier<Applet>
private final ClientConfigLoader clientConfigLoader;
private ClientUpdateCheckMode updateCheckMode;
private final WorldSupplier worldSupplier;
private final String javConfigUrl;
private Object client;
public ClientLoader(OkHttpClient okHttpClient, ClientUpdateCheckMode updateCheckMode)
public ClientLoader(OkHttpClient okHttpClient, ClientUpdateCheckMode updateCheckMode, String javConfigUrl)
{
this.okHttpClient = okHttpClient;
this.clientConfigLoader = new ClientConfigLoader(okHttpClient);
this.updateCheckMode = updateCheckMode;
this.worldSupplier = new WorldSupplier(okHttpClient);
this.javConfigUrl = javConfigUrl;
}
@Override
@@ -162,7 +164,7 @@ public class ClientLoader implements Supplier<Applet>
private RSConfig downloadConfig() throws IOException
{
HttpUrl url = HttpUrl.parse(RuneLiteProperties.getJavConfig());
HttpUrl url = HttpUrl.parse(javConfigUrl);
IOException err = null;
for (int attempt = 0; attempt < NUM_ATTEMPTS; attempt++)
{
@@ -180,6 +182,12 @@ public class ClientLoader implements Supplier<Applet>
catch (IOException e)
{
log.info("Failed to get jav_config from host \"{}\" ({})", url.host(), e.getMessage());
if (!javConfigUrl.equals(RuneLiteProperties.getJavConfig()))
{
throw e;
}
String host = worldSupplier.get().getAddress();
url = url.newBuilder().host(host).build();
err = e;