Skip to content

Commit

Permalink
Merge branch '220-1.10.23.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
zeruth committed Mar 3, 2024
2 parents b14b633 + 13d0fff commit 361911d
Show file tree
Hide file tree
Showing 13 changed files with 122 additions and 17 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ jobs:
build:
runs-on: ubuntu-20.04

permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.m2/repository
Expand All @@ -21,7 +26,7 @@ jobs:
${{ runner.os }}-cache-
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public interface Quest
{
int TABLE = 0;
int NAME = 2;
int MAP_ELEMENT = 14;
int MAIN_QUEST = 19;
int MAP_ELEMENT = 16;
int MAIN_QUEST = 21;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import java.time.Instant;
import java.time.temporal.ChronoUnit;
import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
Expand All @@ -39,14 +40,15 @@
@Singleton
class RuntimeConfigRefresher
{
@Nullable
private final RuntimeConfig managedRuntimeConfig;
private final RuntimeConfigLoader configLoader;

private Instant nextRefreshAt = nextRefreshTime();

@Inject
private RuntimeConfigRefresher(
RuntimeConfig managedRuntimeConfig,
@Nullable RuntimeConfig managedRuntimeConfig,
RuntimeConfigLoader configLoader,
EventBus eventBus
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ public class AnagramClue extends ClueScroll implements NpcClueScroll, ObjectClue
.npc("Squire")
.location(new WorldPoint(2975, 3343, 0))
.area("Falador Castle Courtyard")
.question("White knights are superior to black knights. 2 white knights can handle 3 black knights. How many knights do we need for an army of 981 black knights?")
.question("White Knights of Falador are stronger than the Black Knights of the Kinshra. 2 White Knights can handle 3 Kinshra. How many White Knights would we need against an army of 981 Kinshra?")
.answer("654")
.build(),
AnagramClue.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public class CrypticClue extends ClueScroll implements NpcClueScroll, ObjectClue
.npc("Man")
.npcRegion(10288)
.objectId(ObjectID.CLOSED_CHEST_375)
.solution("Search the chest upstairs in the house north of Yanille Wizard's Guild. Kill a man for the key.")
.solution("Search the chest upstairs in the house north of Yanille Wizards' Guild. Kill a man for the key.")
.build(),
CrypticClue.builder()
.text("Probably filled with wizards socks.")
Expand All @@ -439,7 +439,7 @@ public class CrypticClue extends ClueScroll implements NpcClueScroll, ObjectClue
.npcRegion(12337)
.npcRegion(12437)
.objectId(ObjectID.DRAWERS_350)
.solution("Search the drawers in the basement of the Wizard's Tower south of Draynor Village. Kill one of the Wizards for the key. Fairy ring DIS.")
.solution("Search the drawers in the basement of the Wizards' Tower south of Draynor Village. Kill one of the Wizards for the key. Fairy ring DIS.")
.build(),
CrypticClue.builder()
.text("Even the seers say this clue goes right over their heads.")
Expand Down Expand Up @@ -855,7 +855,7 @@ public class CrypticClue extends ClueScroll implements NpcClueScroll, ObjectClue
.text("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.")
.location(new WorldPoint(3103, 3163, 2))
.npc("Wizard Mizgog")
.solution("Speak to Wizard Mizgog at the top of the Wizard's Tower south of Draynor.")
.solution("Speak to Wizard Mizgog at the top of the Wizards' Tower south of Draynor.")
.build(),
CrypticClue.builder()
.text("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!")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class MapClue extends ClueScroll implements ObjectClueScroll
public static final String CHAMPIONS_GUILD = "West of the Champions' Guild";
public static final String VARROCK_EAST_MINE = "Outside Varrock East Mine";
public static final String STANDING_STONES = "At the standing stones north of Falador";
public static final String WIZARDS_TOWER_DIS = "On the south side of the Wizard's Tower (DIS)";
public static final String WIZARDS_TOWER_DIS = "On the south side of the Wizards' Tower (DIS)";
public static final String SOUTH_OF_DRAYNOR_BANK = "South of Draynor Village Bank";

static final List<MapClue> CLUES = ImmutableList.of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public interface PartyConfig extends Config
@ConfigItem(
keyName = "pings",
name = "Pings",
description = "Enables party pings",
description = "Enables party pings.<br>"
+ "To ping, hold the ping hotkey down and click on the tile you want to ping.",
position = 1
)
default boolean pings()
Expand All @@ -51,7 +52,7 @@ default boolean pings()
@ConfigItem(
keyName = "sounds",
name = "Sound on ping",
description = "Enables sound notification on party ping",
description = "Enables sound notification on party ping.",
position = 2
)
default boolean sounds()
Expand All @@ -62,7 +63,7 @@ default boolean sounds()
@ConfigItem(
keyName = "recolorNames",
name = "Recolor names",
description = "Recolor party members names based on unique color hash",
description = "Recolor party members names based on unique color hash.",
position = 3
)
default boolean recolorNames()
Expand All @@ -73,7 +74,8 @@ default boolean recolorNames()
@ConfigItem(
keyName = "pingHotkey",
name = "Ping hotkey",
description = "Key to hold to send a tile ping",
description = "Key to hold to send a tile ping.<br>"
+ "To ping, hold the ping hotkey down and click on the tile you want to ping.",
position = 4
)
default Keybind pingHotkey()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,16 @@ default boolean leftClickSearch()
{
return false;
}

@ConfigItem(
keyName = "showWikiMinimapButton",
name = "Show wiki button under minimap",
description = "Shows the wiki lookup button under the minimap.<br>"
+ "Overrides 'Show Wiki entity lookup' in the RuneScape settings.",
position = 2
)
default boolean showWikiMinimapButton()
{
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ private void addWidgets()
vanilla.setHidden(true);
}

if (!config.showWikiMinimapButton())
{
return;
}

icon = wikiBannerParent.createChild(0, WidgetType.GRAPHIC);
icon.setSpriteId(SpriteID.WIKI_DESELECTED);
icon.setOriginalX(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,10 @@ public void show()
if (configManager.getConfiguration(CONFIG_GROUP, CONFIG_CLIENT_MAXIMIZED) != null)
{
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
// According to the documentation of JFrame#setExtendedState, if the frame isn't visible, a window
// state change event isn't guaranteed to be fired. Since RuneLite's custom chrome borders rely on a
// state change listener, borders need to be applied manually when maximizing prior to setVisible
applyCustomChromeBorder();
}
}
else
Expand Down
37 changes: 37 additions & 0 deletions runelite-maven-plugin/pmd-ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2024, Jordan Atwood <[email protected]>
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.
-->
<ruleset name="RuneLite"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">

<description>
RuneLite Maven Plugin PMD ruleset
</description>

<!-- error prone -->
<rule ref="category/java/errorprone.xml/UseLocaleWithCaseConversions"/>
</ruleset>
37 changes: 37 additions & 0 deletions runelite-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<name>RuneLite Maven Plugin</name>
<packaging>maven-plugin</packaging>

<properties>
<pmd.skip>true</pmd.skip>
</properties>

<dependencies>
<dependency>
<groupId>net.runelite</groupId>
Expand Down Expand Up @@ -73,6 +77,39 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.16.0</version>
<dependencies>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>6.44.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>6.44.0</version>
</dependency>
</dependencies>
<configuration>
<failOnViolation>true</failOnViolation>
<printFailingErrors>true</printFailingErrors>
<rulesets>
<ruleset>${project.basedir}/pmd-ruleset.xml</ruleset>
</rulesets>
<linkXRef>false</linkXRef>
<analysisCache>true</analysisCache>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.squareup.javapoet.TypeSpec;
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import javax.lang.model.element.Modifier;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
Expand Down Expand Up @@ -118,7 +119,7 @@ private void executeOne(File file, TypeSpec.Builder interfaceType, TypeSpec.Buil
throw new MojoExecutionException("interface id out of range for " + interfaceName);
}

addField(interfaceType, interfaceName.toUpperCase(), interfaceId, null);
addField(interfaceType, interfaceName.toUpperCase(Locale.ENGLISH), interfaceId, null);

for (var entry2 : tbl.entrySet())
{
Expand All @@ -134,7 +135,7 @@ private void executeOne(File file, TypeSpec.Builder interfaceType, TypeSpec.Buil
throw new MojoExecutionException("component id out of range for " + componentName);
}

var fullName = interfaceName.toUpperCase() + "_" + componentName.toUpperCase();
var fullName = interfaceName.toUpperCase(Locale.ENGLISH) + "_" + componentName.toUpperCase(Locale.ENGLISH);
var comment = interfaceId + ":" + id;
int componentId = (interfaceId << 16) | id;

Expand Down

0 comments on commit 361911d

Please sign in to comment.