Skip to content

Commit

Permalink
Merge branch '1.10.20.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
zeruth committed Jan 30, 2024
2 parents a639901 + abe5f60 commit d429390
Show file tree
Hide file tree
Showing 24 changed files with 210 additions and 52 deletions.
2 changes: 1 addition & 1 deletion cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.10.20.4</version>
<version>1.10.20.5</version>
</parent>

<artifactId>cache</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.10.20.4</version>
<version>1.10.20.5</version>
<packaging>pom</packaging>

<name>RuneLite</name>
Expand All @@ -41,7 +41,7 @@
<lombok.version>1.18.30</lombok.version>
<logback.version>1.2.9</logback.version>
<slf4j.version>1.7.25</slf4j.version>
<flatlaf.version>3.2.5-rl2</flatlaf.version>
<flatlaf.version>3.2.5-rl3</flatlaf.version>

<maven.javadoc.skip>true</maven.javadoc.skip>
<checkstyle.skip>true</checkstyle.skip>
Expand All @@ -65,7 +65,7 @@
<url>https://github.com/runelite/runelite</url>
<connection>scm:git:git://github.com/runelite/runelite</connection>
<developerConnection>scm:git:[email protected]:runelite/runelite</developerConnection>
<tag>runelite-parent-1.10.20.4</tag>
<tag>runelite-parent-1.10.20.5</tag>
</scm>

<developers>
Expand Down
2 changes: 1 addition & 1 deletion runelite-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.10.20.4</version>
<version>1.10.20.5</version>
</parent>

<artifactId>runelite-api</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions runelite-api/src/main/java/net/runelite/api/Varbits.java
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,13 @@ public final class Varbits
*/
public static final int TELEBLOCK = 4163;

/**
* Cooldown timer remaining before eligible to restore at a god wars dungeon altar.
* Number of game ticks remaining is in intervals of 100; for a value X there are 100 * X game ticks remaining.
* A player can pray at a god wars altar once this reaches 0.
*/
public static final int GOD_WARS_ALTAR_COOLDOWN = 4099;

/**
* Farmer's Affinity effect timer
* Number of game ticks remaining on Farmer's Affinity effect in intervals of 20; for a value X there are 20 * X game ticks remaining.
Expand Down
2 changes: 1 addition & 1 deletion runelite-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.10.20.4</version>
<version>1.10.20.5</version>
</parent>

<artifactId>client</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ private void storeIcon()
{
if (OSType.getOSType() == OSType.Linux && !Files.exists(notifyIconPath))
{
try (InputStream stream = Notifier.class.getResourceAsStream("/runelite.png"))
try (InputStream stream = Notifier.class.getResourceAsStream("/net/runelite/client/ui/runelite_128.png"))
{
Files.copy(stream, notifyIconPath);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@ default boolean enableCustomChrome()
return OSType.getOSType() == OSType.Windows;
}

@Range(
min = 10,
max = 100
)
@ConfigItem(
keyName = "uiWindowOpacity",
name = "Window opacity",
description = "Set the windows opacity.",
position = 16,
section = windowSettings
)
default int windowOpacity()
{
return 100;
}

@ConfigItem(
keyName = "gameAlwaysOnTop",
name = "Always on top",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.Arrays;
import javax.swing.JFrame;
import lombok.AccessLevel;
import lombok.Setter;
Expand All @@ -38,7 +39,7 @@ public class DevToolsFrame extends JFrame

public DevToolsFrame()
{
setIconImage(ClientUI.ICON);
setIconImages(Arrays.asList(ClientUI.ICON_128, ClientUI.ICON_16));

setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
addWindowListener(new WindowAdapter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class InventoryInspector extends DevToolsFrame

setLayout(new BorderLayout());
setTitle("RuneLite Inventory Inspector");
setIconImage(ClientUI.ICON);
setIconImages(Arrays.asList(ClientUI.ICON_128, ClientUI.ICON_16));

tree.setBorder(new EmptyBorder(2, 2, 2, 2));
tree.setRootVisible(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ enum GameTimer
EXSUPERANTIFIRE(ItemID.EXTENDED_SUPER_ANTIFIRE4, GameTimerImageType.ITEM, "Extended Super AntiFire", 6, ChronoUnit.MINUTES),
OVERLOAD_RAID(ItemID.OVERLOAD_4_20996, GameTimerImageType.ITEM, "Overload", false),
PRAYER_ENHANCE(ItemID.PRAYER_ENHANCE_4, GameTimerImageType.ITEM, "Prayer enhance", 290, ChronoUnit.SECONDS, true),
GOD_WARS_ALTAR(SpriteID.SKILL_PRAYER, GameTimerImageType.SPRITE, "God wars altar", 10, ChronoUnit.MINUTES),
GOD_WARS_ALTAR(SpriteID.SKILL_PRAYER, GameTimerImageType.SPRITE, "God wars altar", false),
CHARGE(SpriteID.SPELL_CHARGE, GameTimerImageType.SPRITE, "Charge", false),
STAFF_OF_THE_DEAD(ItemID.STAFF_OF_THE_DEAD, GameTimerImageType.ITEM, "Staff of the Dead", 1, ChronoUnit.MINUTES),
ABYSSAL_SIRE_STUN(ItemID.ABYSSAL_ORPHAN, GameTimerImageType.ITEM, "Abyssal Sire Stun", 30, ChronoUnit.SECONDS, true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public class TimersPlugin extends Plugin
private static final String CANNON_DESTROYED_MESSAGE = "Your cannon has been destroyed!";
private static final String CANNON_BROKEN_MESSAGE = "<col=ef1020>Your cannon has broken!";
private static final String FROZEN_MESSAGE = "<col=ef1020>You have been frozen!</col>";
private static final String GOD_WARS_ALTAR_MESSAGE = "you recharge your prayer.";
private static final String STAFF_OF_THE_DEAD_SPEC_EXPIRED_MESSAGE = "Your protection fades away";
private static final String STAFF_OF_THE_DEAD_SPEC_MESSAGE = "Spirits of deceased evildoers offer you their protection";
private static final String PRAYER_ENHANCE_EXPIRED = "<col=ff0000>Your prayer enhance effect has worn off.</col>";
Expand Down Expand Up @@ -559,6 +558,11 @@ else if (nextSuperAntifireTick - tickCount <= 0)
{
updateVarTimer(FARMERS_AFFINITY, event.getValue(), i -> i * 20);
}

if (event.getVarbitId() == Varbits.GOD_WARS_ALTAR_COOLDOWN && config.showGodWarsAltar())
{
updateVarTimer(GOD_WARS_ALTAR, event.getValue(), i -> i * 100);
}
}

@Subscribe
Expand Down Expand Up @@ -715,6 +719,11 @@ public void onConfigChanged(ConfigChanged event)
removeVarTimer(FARMERS_AFFINITY);
}

if (!config.showGodWarsAltar())
{
removeVarTimer(GOD_WARS_ALTAR);
}

if (!config.showLiquidAdrenaline())
{
removeGameTimer(LIQUID_ADRENALINE);
Expand Down Expand Up @@ -767,11 +776,6 @@ public void onChatMessage(ChatMessage event)
createGameTimer(ABYSSAL_SIRE_STUN);
}

if (config.showGodWarsAltar() && message.equalsIgnoreCase(GOD_WARS_ALTAR_MESSAGE))//Normal altars are "You recharge your Prayer points." while gwd is "You recharge your Prayer."
{
createGameTimer(GOD_WARS_ALTAR);
}

if (config.showCannon())
{
if (message.equals(CANNON_BASE_MESSAGE) || message.equals(CANNON_STAND_MESSAGE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ default boolean cml()

@ConfigItem(
position = 2,
keyName = "runetracker",
name = "RuneTracker",
description = "Automatically updates your stats on runetracker.org when you log out"
)
default boolean runetracker()
{
return false;
}

@ConfigItem(
position = 3,
keyName = "templeosrs",
name = "TempleOSRS",
description = "Automatically updates your stats on templeosrs.com when you log out"
Expand All @@ -54,7 +65,7 @@ default boolean templeosrs()
}

@ConfigItem(
position = 3,
position = 4,
keyName = "wiseoldman",
name = "Wise Old Man",
description = "Automatically updates your stats on wiseoldman.net when you log out"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
@PluginDescriptor(
name = "XP Updater",
description = "Automatically updates your stats on external xptrackers when you log out",
tags = {"cml", "crystalmathlabs", "templeosrs", "temple", "wom", "wiseoldman", "wise old man", "external", "integration"},
tags = {"cml", "crystalmathlabs", "runetracker", "templeosrs", "temple", "wom", "wiseoldman", "wise old man", "external", "integration"},
enabledByDefault = false
)
@Slf4j
Expand Down Expand Up @@ -136,6 +136,7 @@ private void update(long accountHash, String username)
EnumSet<WorldType> worldTypes = client.getWorldType();
username = username.replace(" ", "_");
updateCml(username, worldTypes);
updateRunetracker(username, worldTypes);
updateTempleosrs(accountHash, username, worldTypes);
updateWom(accountHash, username, worldTypes);
}
Expand Down Expand Up @@ -166,6 +167,31 @@ private void updateCml(String username, EnumSet<WorldType> worldTypes)
}
}

private void updateRunetracker(String username, EnumSet<WorldType> worldTypes)
{
if (config.runetracker()
&& !worldTypes.contains(WorldType.SEASONAL)
&& !worldTypes.contains(WorldType.DEADMAN)
&& !worldTypes.contains(WorldType.NOSAVE_MODE)
&& !worldTypes.contains(WorldType.FRESH_START_WORLD))
{
HttpUrl url = new HttpUrl.Builder()
.scheme("https")
.host("rscript.org")
.addPathSegment("lookup.php")
.addQueryParameter("type", "stats07")
.addQueryParameter("user", username)
.build();

Request request = new Request.Builder()
.header("User-Agent", "RuneLite")
.url(url)
.build();

sendRequest("RuneTracker", request);
}
}

private void updateTempleosrs(long accountHash, String username, EnumSet<WorldType> worldTypes)
{
if (config.templeosrs()
Expand Down
Loading

0 comments on commit d429390

Please sign in to comment.