Merge pull request #3113 from SRLJustin/rl-upstream10-01
upstream: merge
This commit is contained in:
@@ -27,7 +27,7 @@ object ProjectVersions {
|
||||
const val launcherVersion = "2.2.0"
|
||||
const val rlVersion = "1.8.9"
|
||||
|
||||
const val openosrsVersion = "4.18.0"
|
||||
const val openosrsVersion = "4.18.1"
|
||||
|
||||
const val rsversion = 202
|
||||
const val cacheversion = 165
|
||||
|
||||
@@ -1682,6 +1682,13 @@ public interface Client extends GameEngine
|
||||
*/
|
||||
void setFriendsChatMembersHidden(boolean state);
|
||||
|
||||
/**
|
||||
* Sets whether or not clan members are hidden.
|
||||
*
|
||||
* @param state the new clan chat member hidden state
|
||||
*/
|
||||
void setClanChatMembersHidden(boolean state);
|
||||
|
||||
/**
|
||||
* Sets whether or not ignored players are hidden.
|
||||
*
|
||||
|
||||
@@ -332,11 +332,23 @@ public interface RuneLiteConfig extends Config
|
||||
return FontType.REGULAR;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "infoboxFontType",
|
||||
name = "Infobox Font",
|
||||
description = "Configures what font type is used for infoboxes.",
|
||||
position = 33,
|
||||
section = overlaySettings
|
||||
)
|
||||
default FontType infoboxFontType()
|
||||
{
|
||||
return FontType.REGULAR;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "menuEntryShift",
|
||||
name = "Require Shift for overlay menu",
|
||||
description = "Overlay right-click menu will require shift to be added",
|
||||
position = 33,
|
||||
position = 34,
|
||||
section = overlaySettings
|
||||
)
|
||||
default boolean menuEntryShift()
|
||||
|
||||
@@ -69,7 +69,7 @@ public interface EntityHiderConfig extends Config
|
||||
|
||||
@ConfigItem(
|
||||
position = 4,
|
||||
keyName = "hideClanMates",
|
||||
keyName = "hideClanMates", // is actually friends chat
|
||||
name = "Hide Friends Chat members",
|
||||
description = "Configures whether or not friends chat members are hidden"
|
||||
)
|
||||
@@ -80,6 +80,17 @@ public interface EntityHiderConfig extends Config
|
||||
|
||||
@ConfigItem(
|
||||
position = 5,
|
||||
keyName = "hideClanChatMembers",
|
||||
name = "Hide Clan Chat members",
|
||||
description = "Configures whether or not clan chat members are hidden"
|
||||
)
|
||||
default boolean hideClanChatMembers()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 6,
|
||||
keyName = "hideIgnores",
|
||||
name = "Hide Ignores",
|
||||
description = "Configures whether or not ignored players are hidden"
|
||||
@@ -90,7 +101,7 @@ public interface EntityHiderConfig extends Config
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 6,
|
||||
position = 7,
|
||||
keyName = "hideLocalPlayer",
|
||||
name = "Hide Local Player",
|
||||
description = "Configures whether or not the local player is hidden"
|
||||
@@ -101,7 +112,7 @@ public interface EntityHiderConfig extends Config
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 7,
|
||||
position = 8,
|
||||
keyName = "hideLocalPlayer2D",
|
||||
name = "Hide Local Player 2D",
|
||||
description = "Configures whether or not the local player's 2D elements are hidden"
|
||||
@@ -112,7 +123,7 @@ public interface EntityHiderConfig extends Config
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 8,
|
||||
position = 9,
|
||||
keyName = "hideNPCs",
|
||||
name = "Hide NPCs",
|
||||
description = "Configures whether or not NPCs are hidden"
|
||||
@@ -123,7 +134,7 @@ public interface EntityHiderConfig extends Config
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 9,
|
||||
position = 10,
|
||||
keyName = "hideNPCs2D",
|
||||
name = "Hide NPCs 2D",
|
||||
description = "Configures whether or not NPCs 2D elements are hidden"
|
||||
@@ -134,7 +145,7 @@ public interface EntityHiderConfig extends Config
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 10,
|
||||
position = 11,
|
||||
keyName = "hidePets",
|
||||
name = "Hide Pets",
|
||||
description = "Configures whether or not other player pets are hidden"
|
||||
@@ -145,7 +156,7 @@ public interface EntityHiderConfig extends Config
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 11,
|
||||
position = 12,
|
||||
keyName = "hideAttackers",
|
||||
name = "Hide Attackers",
|
||||
description = "Configures whether or not NPCs/players attacking you are hidden"
|
||||
@@ -156,7 +167,7 @@ public interface EntityHiderConfig extends Config
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 12,
|
||||
position = 13,
|
||||
keyName = "hideProjectiles",
|
||||
name = "Hide Projectiles",
|
||||
description = "Configures whether or not projectiles are hidden"
|
||||
|
||||
@@ -78,6 +78,7 @@ public class EntityHiderPlugin extends Plugin
|
||||
|
||||
client.setFriendsHidden(config.hideFriends());
|
||||
client.setFriendsChatMembersHidden(config.hideFriendsChatMembers());
|
||||
client.setClanChatMembersHidden(config.hideClanChatMembers());
|
||||
client.setIgnoresHidden(config.hideIgnores());
|
||||
|
||||
client.setLocalPlayerHidden(config.hideLocalPlayer());
|
||||
@@ -103,6 +104,7 @@ public class EntityHiderPlugin extends Plugin
|
||||
|
||||
client.setFriendsHidden(false);
|
||||
client.setFriendsChatMembersHidden(false);
|
||||
client.setClanChatMembersHidden(false);
|
||||
client.setIgnoresHidden(false);
|
||||
|
||||
client.setLocalPlayerHidden(false);
|
||||
|
||||
@@ -28,7 +28,6 @@ import java.awt.Color;
|
||||
import java.awt.image.BufferedImage;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import net.runelite.api.EquipmentInventorySlot;
|
||||
import net.runelite.client.ui.overlay.infobox.Counter;
|
||||
|
||||
@Getter
|
||||
@@ -37,21 +36,18 @@ class ItemChargeInfobox extends Counter
|
||||
{
|
||||
private final ItemChargePlugin plugin;
|
||||
private final int item;
|
||||
private final EquipmentInventorySlot slot;
|
||||
|
||||
ItemChargeInfobox(
|
||||
ItemChargePlugin plugin,
|
||||
BufferedImage image,
|
||||
String name,
|
||||
int charges,
|
||||
int item,
|
||||
EquipmentInventorySlot slot)
|
||||
int item)
|
||||
{
|
||||
super(image, plugin, charges);
|
||||
setTooltip(name);
|
||||
this.plugin = plugin;
|
||||
this.item = item;
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -627,7 +627,7 @@ public class ItemChargePlugin extends Plugin
|
||||
|
||||
final String name = itemManager.getItemComposition(id).getName();
|
||||
final BufferedImage image = itemManager.getImage(id);
|
||||
infobox = new ItemChargeInfobox(this, image, name, charges, id, slot);
|
||||
infobox = new ItemChargeInfobox(this, image, name, charges, id);
|
||||
infoBoxManager.addInfoBox(infobox);
|
||||
infoboxes.put(slot, infobox);
|
||||
}
|
||||
|
||||
@@ -40,12 +40,13 @@ import static net.runelite.api.ItemID.*;
|
||||
import net.runelite.api.Skill;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.client.events.ConfigChanged;
|
||||
import net.runelite.api.events.BeforeRender;
|
||||
import net.runelite.api.events.GameTick;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.events.ConfigChanged;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.ui.overlay.OverlayManager;
|
||||
@@ -138,6 +139,7 @@ public class RunEnergyPlugin extends Plugin
|
||||
|
||||
private boolean localPlayerRunningToDestination;
|
||||
private WorldPoint prevLocalPlayerLocation;
|
||||
private String runTimeRemaining;
|
||||
|
||||
@Provides
|
||||
RunEnergyConfig getConfig(ConfigManager configManager)
|
||||
@@ -170,9 +172,15 @@ public class RunEnergyPlugin extends Plugin
|
||||
|
||||
prevLocalPlayerLocation = client.getLocalPlayer().getWorldLocation();
|
||||
|
||||
if (energyConfig.replaceOrbText())
|
||||
runTimeRemaining = energyConfig.replaceOrbText() ? getEstimatedRunTimeRemaining(true) : null;
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onBeforeRender(BeforeRender beforeRender)
|
||||
{
|
||||
if (runTimeRemaining != null)
|
||||
{
|
||||
setRunOrbText(getEstimatedRunTimeRemaining(true));
|
||||
setRunOrbText(runTimeRemaining);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,14 +226,13 @@ public class RunEnergyPlugin extends Plugin
|
||||
// Return the text
|
||||
if (inSeconds)
|
||||
{
|
||||
return Integer.toString((int) Math.floor(secondsLeft)) + "s";
|
||||
return (int) Math.floor(secondsLeft) + "s";
|
||||
}
|
||||
else
|
||||
{
|
||||
final int minutes = (int) Math.floor(secondsLeft / 60.0);
|
||||
final int seconds = (int) Math.floor(secondsLeft - (minutes * 60.0));
|
||||
|
||||
return Integer.toString(minutes) + ":" + StringUtils.leftPad(Integer.toString(seconds), 2, "0");
|
||||
return minutes + ":" + StringUtils.leftPad(Integer.toString(seconds), 2, "0");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ package net.runelite.client.ui.overlay.components;
|
||||
import com.google.common.base.Strings;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Point;
|
||||
@@ -53,6 +54,7 @@ public class InfoBoxComponent implements LayoutableRenderableEntity
|
||||
private Dimension preferredSize = new Dimension(DEFAULT_SIZE, DEFAULT_SIZE);
|
||||
private String text;
|
||||
private Color color = Color.WHITE;
|
||||
private Font font;
|
||||
private boolean outline;
|
||||
private Color backgroundColor = ComponentConstants.STANDARD_BACKGROUND_COLOR;
|
||||
private BufferedImage image;
|
||||
@@ -67,7 +69,7 @@ public class InfoBoxComponent implements LayoutableRenderableEntity
|
||||
return new Dimension();
|
||||
}
|
||||
|
||||
graphics.setFont(getSize() < DEFAULT_SIZE ? FontManager.getRunescapeSmallFont() : FontManager.getRunescapeFont());
|
||||
graphics.setFont(getSize() < DEFAULT_SIZE ? FontManager.getRunescapeSmallFont() : font);
|
||||
|
||||
final int baseX = preferredLocation.x;
|
||||
final int baseY = preferredLocation.y;
|
||||
|
||||
@@ -28,6 +28,7 @@ package net.runelite.client.ui.overlay.infobox;
|
||||
import com.google.common.base.Strings;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
@@ -122,6 +123,10 @@ public class InfoBoxOverlay extends OverlayPanel
|
||||
panelComponent.setPreferredSize(new Dimension(DEFAULT_WRAP_COUNT * (config.infoBoxSize() + GAP), DEFAULT_WRAP_COUNT * (config.infoBoxSize() + GAP)));
|
||||
panelComponent.setOrientation(orientation);
|
||||
|
||||
final Font font = config.infoboxFontType().getFont();
|
||||
final boolean infoBoxTextOutline = config.infoBoxTextOutline();
|
||||
final Color overlayBackgroundColor = config.overlayBackgroundColor();
|
||||
final Dimension preferredSize = new Dimension(config.infoBoxSize(), config.infoBoxSize());
|
||||
for (InfoBox box : infoBoxes)
|
||||
{
|
||||
if (!box.render())
|
||||
@@ -134,15 +139,16 @@ public class InfoBoxOverlay extends OverlayPanel
|
||||
|
||||
final InfoBoxComponent infoBoxComponent = new InfoBoxComponent();
|
||||
infoBoxComponent.setText(text);
|
||||
infoBoxComponent.setFont(font);
|
||||
if (color != null)
|
||||
{
|
||||
infoBoxComponent.setColor(color);
|
||||
}
|
||||
infoBoxComponent.setOutline(config.infoBoxTextOutline());
|
||||
infoBoxComponent.setOutline(infoBoxTextOutline);
|
||||
infoBoxComponent.setImage(box.getScaledImage());
|
||||
infoBoxComponent.setTooltip(box.getTooltip());
|
||||
infoBoxComponent.setPreferredSize(new Dimension(config.infoBoxSize(), config.infoBoxSize()));
|
||||
infoBoxComponent.setBackgroundColor(config.overlayBackgroundColor());
|
||||
infoBoxComponent.setPreferredSize(preferredSize);
|
||||
infoBoxComponent.setBackgroundColor(overlayBackgroundColor);
|
||||
infoBoxComponent.setInfoBox(box);
|
||||
panelComponent.getChildren().add(infoBoxComponent);
|
||||
}
|
||||
|
||||
@@ -51,6 +51,9 @@ public abstract class EntityHiderBridgeMixin implements RSClient
|
||||
@Inject
|
||||
public static boolean hideClanMates;
|
||||
|
||||
@Inject
|
||||
public static boolean hideClanChatMembers;
|
||||
|
||||
@Inject
|
||||
public static boolean hideIgnores;
|
||||
|
||||
@@ -122,6 +125,13 @@ public abstract class EntityHiderBridgeMixin implements RSClient
|
||||
hideClanMates = state;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setClanChatMembersHidden(boolean state)
|
||||
{
|
||||
hideClanChatMembers = state;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setIgnoresHidden(boolean state)
|
||||
|
||||
@@ -53,6 +53,9 @@ public abstract class EntityHiderMixin implements RSScene
|
||||
@Shadow("hideClanMates")
|
||||
private static boolean hideClanMates;
|
||||
|
||||
@Shadow("hideClanChatMembers")
|
||||
private static boolean hideClanChatMembers;
|
||||
|
||||
@Shadow("hideLocalPlayer")
|
||||
private static boolean hideLocalPlayer;
|
||||
|
||||
@@ -168,6 +171,11 @@ public abstract class EntityHiderMixin implements RSScene
|
||||
return !hideClanMates;
|
||||
}
|
||||
|
||||
if (player.isClanMember())
|
||||
{
|
||||
return !hideClanChatMembers;
|
||||
}
|
||||
|
||||
if (client.getFriendManager().isIgnored(player.getRsName()))
|
||||
{
|
||||
return !hideIgnores;
|
||||
|
||||
Reference in New Issue
Block a user