Skip to content

Commit

Permalink
Merge remote-tracking branch 'Owain/modernizer'
Browse files Browse the repository at this point in the history
  • Loading branch information
Owain94 committed Apr 8, 2020
2 parents 1261069 + 749e41a commit 7169699
Show file tree
Hide file tree
Showing 90 changed files with 222 additions and 271 deletions.
2 changes: 1 addition & 1 deletion agility/agility.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

version = "0.0.6"
version = "0.0.7"

project.extra["PluginName"] = "Agility"
project.extra["PluginDescription"] = "Show helpful information about agility courses and obstacles"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
*/
package net.runelite.client.plugins.agility;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimap;
import java.util.List;
import java.util.Set;
Expand All @@ -36,7 +34,7 @@

class Obstacles
{
static final Set<Integer> COURSE_OBSTACLE_IDS = ImmutableSet.of(
static final Set<Integer> COURSE_OBSTACLE_IDS = Set.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,
Expand Down Expand Up @@ -101,12 +99,12 @@ class Obstacles

static final Multimap<Integer, AgilityShortcut> SHORTCUT_OBSTACLE_IDS;

static final Set<Integer> TRAP_OBSTACLE_IDS = ImmutableSet.of(
static final Set<Integer> TRAP_OBSTACLE_IDS = Set.of(
// Agility pyramid
NULL_3550, NULL_10872, NULL_10873
);

static final List<Integer> TRAP_OBSTACLE_REGIONS = ImmutableList.of(12105, 13356);
static final List<Integer> TRAP_OBSTACLE_REGIONS = List.of(12105, 13356);

static
{
Expand Down
2 changes: 1 addition & 1 deletion bank/bank.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

version = "0.0.4"
version = "0.0.5"

project.extra["PluginName"] = "Bank"
project.extra["PluginDescription"] = "Modifications to the banking interface"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Strings;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Multiset;
import com.google.inject.Provides;
import java.awt.event.KeyEvent;
Expand Down Expand Up @@ -86,7 +85,7 @@
)
public class BankPlugin extends Plugin implements KeyListener
{
private static final List<Varbits> TAB_VARBITS = ImmutableList.of(
private static final List<Varbits> TAB_VARBITS = List.of(
Varbits.BANK_TAB_ONE_COUNT,
Varbits.BANK_TAB_TWO_COUNT,
Varbits.BANK_TAB_THREE_COUNT,
Expand All @@ -98,7 +97,7 @@ public class BankPlugin extends Plugin implements KeyListener
Varbits.BANK_TAB_NINE_COUNT
);

private static final List<WidgetInfo> BANK_PINS = ImmutableList.of(
private static final List<WidgetInfo> BANK_PINS = List.of(
WidgetInfo.BANK_PIN_1,
WidgetInfo.BANK_PIN_2,
WidgetInfo.BANK_PIN_3,
Expand Down Expand Up @@ -167,7 +166,7 @@ protected void startUp()
{
if (client.getGameState() == GameState.LOGGED_IN)
{
keyManager.registerKeyListener(this);
keyManager.registerKeyListener(this);
}
searchString = "";
}
Expand All @@ -180,7 +179,7 @@ protected void shutDown()
forceRightClickFlag = false;
itemQuantities = null;
}

@Subscribe
private void onGameStateChanged(GameStateChanged event)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
*/
package client.plugins.bank;

import com.google.common.collect.ImmutableList;
import com.google.inject.Guice;
import com.google.inject.testing.fieldbinder.Bind;
import com.google.inject.testing.fieldbinder.BoundFieldModule;
import java.util.List;
import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.api.Item;
Expand Down Expand Up @@ -73,7 +73,7 @@ public void testCalculate()

Item whip = new Item(ItemID.ABYSSAL_WHIP, 1_000_000_000);

Item[] items = ImmutableList.of(
Item[] items = List.of(
coins,
whip
).toArray(new Item[0]);
Expand Down
2 changes: 1 addition & 1 deletion barbarianassault/barbarianassault.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

version = "0.0.3"
version = "0.0.4"

project.extra["PluginName"] = "Barbarian Assault"
project.extra["PluginDescription"] = "Custom barbarian assault plugin, use along with BA Tools"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
*/
package net.runelite.client.plugins.barbarianassault;

import com.google.common.collect.ImmutableMap;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
Expand Down Expand Up @@ -54,7 +53,7 @@ class AboveSceneOverlay extends Overlay
private static final int CENTER_OFFSET = Perspective.LOCAL_HALF_TILE_SIZE / 8;
private static final int EGG_DIAMETER = Perspective.LOCAL_HALF_TILE_SIZE / 4;
private static final Color HEALTH_BAR_COLOR = new Color(225, 35, 0, 125);
private static final ImmutableMap<WidgetInfo, Point> TEAMMATES = ImmutableMap.of(
private static final Map<WidgetInfo, Point> TEAMMATES = Map.of(
WidgetInfo.BA_HEAL_TEAMMATE1, new Point(28, 2),
WidgetInfo.BA_HEAL_TEAMMATE2, new Point(26, 2),
WidgetInfo.BA_HEAL_TEAMMATE3, new Point(26, 2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*/
package net.runelite.client.plugins.barbarianassault;

import com.google.common.collect.ImmutableList;
import com.google.inject.Provides;
import java.awt.Font;
import java.awt.event.KeyEvent;
Expand Down Expand Up @@ -115,7 +114,7 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener

private static final int BA_WAVE_NUM_INDEX = 2;

private static final ImmutableList<WidgetInfo> attackStyles = ImmutableList.of(WidgetInfo.COMBAT_STYLE_ONE,
private static final List<WidgetInfo> attackStyles = List.of(WidgetInfo.COMBAT_STYLE_ONE,
WidgetInfo.COMBAT_STYLE_TWO, WidgetInfo.COMBAT_STYLE_THREE, WidgetInfo.COMBAT_STYLE_FOUR);

@Getter(AccessLevel.PACKAGE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/
package net.runelite.client.plugins.barbarianassault;

import com.google.common.collect.ImmutableList;
import java.time.Duration;
import java.time.Instant;
import java.util.List;
Expand All @@ -39,18 +38,18 @@
class Healer
{
@Getter(AccessLevel.NONE)
private static final List<List<int[]>> CODES = ImmutableList.of(
// ImmutableList.of(firstCallFood, secondCallFood, lastFoodTime),
ImmutableList.of(new int[]{1, 1}, new int[]{0, 0}, new int[]{0, 0}),
ImmutableList.of(new int[]{1, 1, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 21}),
ImmutableList.of(new int[]{1, 6, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 0}),
ImmutableList.of(new int[]{2, 5, 2, 0}, new int[]{0, 0, 7, 10}, new int[]{0, 0, 0, 0}),
ImmutableList.of(new int[]{2, 5, 2, 3, 0}, new int[]{0, 0, 0, 0, 7}, new int[]{0, 0, 21, 30, 0}),
ImmutableList.of(new int[]{3, 5, 2, 2, 0, 0}, new int[]{0, 0, 0, 2, 9, 10}, new int[]{12, 18, 21, 0, 0, 0}),
ImmutableList.of(new int[]{3, 7, 1, 1, 0, 0, 0}, new int[]{2, 0, 1, 1, 2, 4, 10}, new int[]{0, 21, 0, 0, 30, 45, 0}),
ImmutableList.of(new int[]{1, 9, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 2, 10}, new int[]{0, 0, 0, 0, 33, 42, 0}),
ImmutableList.of(new int[]{2, 8, 1, 1, 0, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 1, 1, 10}, new int[]{0, 21, 0, 0, 0, 0, 0, 0, 0}),
ImmutableList.of(new int[]{2, 5, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 4, 4, 8}, new int[]{21, 33, 0, 33, 30, 45, 0}));
private static final List<List<int[]>> CODES = List.of(
// List.of(firstCallFood, secondCallFood, lastFoodTime),
List.of(new int[]{1, 1}, new int[]{0, 0}, new int[]{0, 0}),
List.of(new int[]{1, 1, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 21}),
List.of(new int[]{1, 6, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 0}),
List.of(new int[]{2, 5, 2, 0}, new int[]{0, 0, 7, 10}, new int[]{0, 0, 0, 0}),
List.of(new int[]{2, 5, 2, 3, 0}, new int[]{0, 0, 0, 0, 7}, new int[]{0, 0, 21, 30, 0}),
List.of(new int[]{3, 5, 2, 2, 0, 0}, new int[]{0, 0, 0, 2, 9, 10}, new int[]{12, 18, 21, 0, 0, 0}),
List.of(new int[]{3, 7, 1, 1, 0, 0, 0}, new int[]{2, 0, 1, 1, 2, 4, 10}, new int[]{0, 21, 0, 0, 30, 45, 0}),
List.of(new int[]{1, 9, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 2, 10}, new int[]{0, 0, 0, 0, 33, 42, 0}),
List.of(new int[]{2, 8, 1, 1, 0, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 1, 1, 10}, new int[]{0, 21, 0, 0, 0, 0, 0, 0, 0}),
List.of(new int[]{2, 5, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 4, 4, 8}, new int[]{21, 33, 0, 33, 30, 45, 0}));

private final NPC npc;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
*/
package net.runelite.client.plugins.barbarianassault;

import com.google.common.collect.ImmutableList;
import java.awt.Color;
import java.util.List;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Getter;
Expand All @@ -40,7 +40,7 @@
public class Wave
{
@Getter(AccessLevel.NONE)
private static final ImmutableList<WidgetInfo> WIDGETS = ImmutableList.of(
private static final List<WidgetInfo> WIDGETS = List.of(
WidgetInfo.BA_FAILED_ATTACKER_ATTACKS,
WidgetInfo.BA_RUNNERS_PASSED,
WidgetInfo.BA_EGGS_COLLECTED,
Expand All @@ -50,7 +50,7 @@ public class Wave
);

@Getter(AccessLevel.NONE)
private static final ImmutableList<WidgetInfo> POINTSWIDGETS = ImmutableList.of(
private static final List<WidgetInfo> POINTSWIDGETS = List.of(
//Base
WidgetInfo.BA_BASE_POINTS,
//Attacker
Expand Down
2 changes: 1 addition & 1 deletion barrows/barrows.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

version = "0.0.5"
version = "0.0.6"

project.extra["PluginName"] = "Barrows Brothers"
project.extra["PluginDescription"] = "Show helpful information for the Barrows minigame"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
*/
package net.runelite.client.plugins.barrows;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Sets;
import com.google.inject.Provides;
import java.time.temporal.ChronoUnit;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.inject.Inject;
import lombok.AccessLevel;
Expand All @@ -38,6 +38,7 @@
import net.runelite.api.GameState;
import net.runelite.api.NullObjectID;
import net.runelite.api.ObjectID;
import net.runelite.api.Player;
import net.runelite.api.SpriteID;
import net.runelite.api.WallObject;
import net.runelite.api.events.GameObjectChanged;
Expand All @@ -48,7 +49,6 @@
import net.runelite.api.events.WallObjectDespawned;
import net.runelite.api.events.WallObjectSpawned;
import net.runelite.api.events.WidgetLoaded;
import net.runelite.api.Player;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetID;
import net.runelite.api.widgets.WidgetInfo;
Expand Down Expand Up @@ -85,7 +85,7 @@ public class BarrowsPlugin extends Plugin
);

private static final Set<Integer> BARROWS_LADDERS = Sets.newHashSet(NullObjectID.NULL_20675, NullObjectID.NULL_20676, NullObjectID.NULL_20677);
private static final ImmutableList<WidgetInfo> POSSIBLE_SOLUTIONS = ImmutableList.of(
private static final List<WidgetInfo> POSSIBLE_SOLUTIONS = List.of(
WidgetInfo.BARROWS_PUZZLE_ANSWER1,
WidgetInfo.BARROWS_PUZZLE_ANSWER2,
WidgetInfo.BARROWS_PUZZLE_ANSWER3
Expand Down
2 changes: 1 addition & 1 deletion blastmine/blastmine.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

version = "0.0.2"
version = "0.0.3"

project.extra["PluginName"] = "Blast Mine"
project.extra["PluginDescription"] = "Show helpful information for the Blast Mine minigame"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
*/
package net.runelite.client.plugins.blastmine;

import com.google.common.collect.ImmutableSet;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Polygon;
import java.awt.image.BufferedImage;
import java.util.Map;
import java.util.Set;
import javax.inject.Inject;
import javax.inject.Singleton;
import net.runelite.api.Client;
Expand All @@ -55,7 +55,7 @@ public class BlastMineRockOverlay extends Overlay
{
private static final int MAX_DISTANCE = 16;
private static final int WARNING_DISTANCE = 2;
private static final ImmutableSet<Integer> WALL_OBJECTS = ImmutableSet.of(
private static final Set<Integer> WALL_OBJECTS = Set.of(
NullObjectID.NULL_28570, NullObjectID.NULL_28571, NullObjectID.NULL_28572, NullObjectID.NULL_28573, NullObjectID.NULL_28574,
NullObjectID.NULL_28575, NullObjectID.NULL_28576, NullObjectID.NULL_28577, NullObjectID.NULL_28578,
ObjectID.HARD_ROCK, ObjectID.HARD_ROCK_28580, ObjectID.CAVITY, ObjectID.CAVITY_28582,
Expand Down
2 changes: 1 addition & 1 deletion boosts/boosts.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

version = "0.0.3"
version = "0.0.4"

project.extra["PluginName"] = "Boosts Information"
project.extra["PluginDescription"] = "Show combat and/or skill boost information"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/
package net.runelite.client.plugins.boosts;

import com.google.common.collect.ImmutableSet;
import com.google.inject.Provides;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -62,14 +61,14 @@
)
public class BoostsPlugin extends Plugin
{
private static final Set<Skill> BOOSTABLE_COMBAT_SKILLS = ImmutableSet.of(
private static final Set<Skill> BOOSTABLE_COMBAT_SKILLS = Set.of(
Skill.ATTACK,
Skill.STRENGTH,
Skill.DEFENCE,
Skill.RANGED,
Skill.MAGIC);

private static final Set<Skill> BOOSTABLE_NON_COMBAT_SKILLS = ImmutableSet.of(
private static final Set<Skill> BOOSTABLE_NON_COMBAT_SKILLS = Set.of(
Skill.MINING, Skill.AGILITY, Skill.SMITHING, Skill.HERBLORE, Skill.FISHING, Skill.THIEVING,
Skill.COOKING, Skill.CRAFTING, Skill.FIREMAKING, Skill.FLETCHING, Skill.WOODCUTTING, Skill.RUNECRAFT,
Skill.SLAYER, Skill.FARMING, Skill.CONSTRUCTION, Skill.HUNTER);
Expand Down Expand Up @@ -358,7 +357,7 @@ else if (boosted < base)
{
isChangedDown = true;
}

if (boosted != base)
{
skillsToDisplay.add(skill);
Expand Down
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins {
java
id("com.github.ben-manes.versions") version "0.28.0"
id("se.patrikerdes.use-latest-versions") version "0.2.13"
id("com.simonharrer.modernizer") version "1.8.0-1" apply false
}

apply<BootstrapPlugin>()
Expand Down Expand Up @@ -70,6 +71,7 @@ subprojects {
apply(plugin = "checkstyle")
apply(plugin = "com.github.ben-manes.versions")
apply(plugin = "se.patrikerdes.use-latest-versions")
apply(plugin = "com.simonharrer.modernizer")

dependencies {
annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.12")
Expand Down
2 changes: 1 addition & 1 deletion cannon/cannon.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

version = "0.0.4"
version = "0.0.5"

project.extra["PluginName"] = "Cannon"
project.extra["PluginDescription"] = "Show information about cannon placement and/or amount of cannonballs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
*/
package net.runelite.client.plugins.cannon;

import com.google.common.collect.ImmutableSet;
import com.google.inject.Provides;
import java.awt.Color;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import javax.inject.Inject;
import lombok.AccessLevel;
import lombok.Getter;
Expand Down Expand Up @@ -67,7 +67,7 @@
)
public class CannonPlugin extends Plugin
{
private static final ImmutableSet<Integer> CANNON_PARTS = ImmutableSet.of(
private static final Set<Integer> CANNON_PARTS = Set.of(
ItemID.CANNON_BASE, ItemID.CANNON_STAND, ItemID.CANNON_BARRELS, ItemID.CANNON_FURNACE
);
private CannonCounter counter;
Expand Down
Loading

0 comments on commit 7169699

Please sign in to comment.