From 6a28c6327465775aaf2a65afcde1d42b283c81c1 Mon Sep 17 00:00:00 2001 From: Scott Burns Date: Thu, 16 May 2019 01:40:47 +0200 Subject: [PATCH] Enable options are stupid --- .../plugins/aoewarnings/AoeWarningConfig.java | 72 +++++++++---------- .../aoewarnings/AoeWarningOverlay.java | 4 -- .../client/plugins/batools/Healer.java | 9 +-- .../client/plugins/hydra/HydraConfig.java | 10 --- .../client/plugins/hydra/HydraPlugin.java | 8 --- .../client/plugins/vetion/VetionConfig.java | 44 ------------ .../client/plugins/vetion/VetionPlugin.java | 11 +-- .../client/plugins/zulrah/ZulrahConfig.java | 11 --- .../client/plugins/zulrah/ZulrahPlugin.java | 5 -- 9 files changed, 35 insertions(+), 139 deletions(-) delete mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/vetion/VetionConfig.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java index 3475d9f7b9..d48e83e13f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java @@ -33,22 +33,12 @@ import net.runelite.client.config.ConfigItem; @ConfigGroup("aoe") public interface AoeWarningConfig extends Config { - @ConfigItem( - keyName = "enabled", - name = "AoE Warnings Enabled", - description = "Configures whether or not AoE Projectile Warnings plugin is displayed", - position = 1 - ) - default boolean enabled() - { - return true; - } @ConfigItem( keyName = "outline", name = "Display Outline", description = "Configures whether or not AoE Projectile Warnings have an outline", - position = 2 + position = 1 ) default boolean isOutlineEnabled() { @@ -59,7 +49,7 @@ public interface AoeWarningConfig extends Config keyName = "fade", name = "Fade Warnings", description = "Configures whether or not AoE Projectile Warnings fade over time", - position = 3 + position = 2 ) default boolean isFadeEnabled() { @@ -70,7 +60,7 @@ public interface AoeWarningConfig extends Config keyName = "lizardmanaoe", name = "Lizardman Shamans", description = "Configures whether or not AoE Projectile Warnings for Lizardman Shamans is displayed", - position = 4 + position = 3 ) default boolean isShamansEnabled() { @@ -92,7 +82,7 @@ public interface AoeWarningConfig extends Config keyName = "icedemon", name = "Ice Demon", description = "Configures whether or not AoE Projectile Warnings for Ice Demon is displayed", - position = 4 + position = 5 ) default boolean isIceDemonEnabled() { @@ -103,7 +93,7 @@ public interface AoeWarningConfig extends Config keyName = "vasa", name = "Vasa", description = "Configures whether or not AoE Projectile Warnings for Vasa is displayed", - position = 4 + position = 6 ) default boolean isVasaEnabled() { @@ -114,7 +104,7 @@ public interface AoeWarningConfig extends Config keyName = "tekton", name = "Tekton", description = "Configures whether or not AoE Projectile Warnings for Tekton is displayed", - position = 4 + position = 7 ) default boolean isTektonEnabled() { @@ -125,7 +115,7 @@ public interface AoeWarningConfig extends Config keyName = "vorkath", name = "Vorkath", description = "Configures whether or not AoE Projectile Warnings for Vorkath are displayed", - position = 4 + position = 7 ) default boolean isVorkathEnabled() { @@ -136,7 +126,7 @@ public interface AoeWarningConfig extends Config keyName = "galvek", name = "Galvek", description = "Configures whether or not AoE Projectile Warnings for Galvek are displayed", - position = 4 + position = 8 ) default boolean isGalvekEnabled() { @@ -147,7 +137,7 @@ public interface AoeWarningConfig extends Config keyName = "gargboss", name = "Gargoyle Boss", description = "Configs whether or not AoE Projectile Warnings for Dawn/Dusk are displayed", - position = 4 + position = 9 ) default boolean isGargBossEnabled() { @@ -158,7 +148,7 @@ public interface AoeWarningConfig extends Config keyName = "vetion", name = "Vet'ion", description = "Configures whether or not AoE Projectile Warnings for Vet'ion are displayed", - position = 4 + position = 10 ) default boolean isVetionEnabled() { @@ -169,7 +159,7 @@ public interface AoeWarningConfig extends Config keyName = "chaosfanatic", name = "Chaos Fanatic", description = "Configures whether or not AoE Projectile Warnings for Chaos Fanatic are displayed", - position = 4 + position = 11 ) default boolean isChaosFanaticEnabled() { @@ -180,7 +170,7 @@ public interface AoeWarningConfig extends Config keyName = "olm", name = "Olm", description = "Configures whether or not AoE Projectile Warnings for The Great Olm are displayed", - position = 4 + position = 12 ) default boolean isOlmEnabled() { @@ -191,7 +181,7 @@ public interface AoeWarningConfig extends Config keyName = "bombDisplay", name = "Olm Bombs", description = "Display a timer and colour-coded AoE for Olm's crystal-phase bombs.", - position = 4 + position = 13 ) default boolean bombDisplay() { @@ -202,7 +192,7 @@ public interface AoeWarningConfig extends Config keyName = "corp", name = "Corporeal Beast", description = "Configures whether or not AoE Projectile Warnings for the Corporeal Beast are displayed", - position = 4 + position = 14 ) default boolean isCorpEnabled() { @@ -213,7 +203,7 @@ public interface AoeWarningConfig extends Config keyName = "wintertodt", name = "Wintertodt Snow Fall", description = "Configures whether or not AOE Projectile Warnings for the Wintertodt snow fall are displayed", - position = 4 + position = 15 ) default boolean isWintertodtEnabled() { @@ -224,7 +214,7 @@ public interface AoeWarningConfig extends Config keyName = "isXarpusEnabled", name = "Xarpus", description = "Configures whether or not AOE Projectile Warnings for Xarpus are displayed", - position = 4 + position = 16 ) default boolean isXarpusEnabled() { @@ -235,7 +225,7 @@ public interface AoeWarningConfig extends Config keyName = "lightning", name = "Olm Lightning Trails", description = "Show Lightning Trails", - position = 4 + position = 17 ) default boolean LightningTrail() { @@ -246,27 +236,28 @@ public interface AoeWarningConfig extends Config keyName = "addyDrags", name = "Addy Drags", description = "Show Bad Areas", - position = 4 + position = 18 ) default boolean addyDrags() { return true; } - @ConfigItem( - keyName = "drake", - name = "Drakes Breath", - description = "Configures if Drakes Breath tile markers are displayed" - ) - default boolean isDrakeEnabled() + @ConfigItem( + keyName = "drake", name = "Drakes Breath", + description = "Configures if Drakes Breath tile markers are displayed", + position = 19 + ) + default boolean isDrakeEnabled() { - return true; - } - - @ConfigItem( + return true; + } + + @ConfigItem( keyName = "cerbFire", name = "Cerberus Fire", - description = "Configures if Cerberus fire tile markers are displayed" + description = "Configures if Cerberus fire tile markers are displayed", + position = 20 ) default boolean isCerbFireEnabled() { @@ -276,7 +267,8 @@ public interface AoeWarningConfig extends Config @ConfigItem( keyName = "delay", name = "Fade delay", - description = "Configures the amount of time in milliseconds that the warning lingers for after the projectile has touched the ground" + description = "Configures the amount of time in milliseconds that the warning lingers for after the projectile has touched the ground", + position = 21 ) default int delay() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningOverlay.java index e9d30516ad..6b6bed9569 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningOverlay.java @@ -69,10 +69,6 @@ public class AoeWarningOverlay extends Overlay @Override public Dimension render(Graphics2D graphics) { - if (!config.enabled()) - { - return null; - } for (WorldPoint point : plugin.getLightningTrail()) { drawTile(graphics, point, new Color(0,150,200), 2, 150, 50); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/batools/Healer.java b/runelite-client/src/main/java/net/runelite/client/plugins/batools/Healer.java index 3653258564..45078e7772 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/batools/Healer.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/batools/Healer.java @@ -32,7 +32,7 @@ import net.runelite.api.NPC; import net.runelite.api.Actor; -public class Healer +class Healer { @Getter @@ -62,9 +62,7 @@ public class Healer @Setter private int secondCallFood; - - - public Healer(NPC npc, int spawnNumber, int wave) + Healer(NPC npc, int spawnNumber, int wave) { this.npc = npc; this.wave = wave; @@ -102,7 +100,4 @@ public class Healer default: return null; } } - - - } \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/hydra/HydraConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/hydra/HydraConfig.java index 1d803a9fc7..0342cc9cf5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/hydra/HydraConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/hydra/HydraConfig.java @@ -31,16 +31,6 @@ import net.runelite.client.config.ConfigItem; @ConfigGroup("hydra") public interface HydraConfig extends Config { - @ConfigItem( - position = 0, - keyName = "hydraenable", - name = "Enable Hydra (194 cb) Helper", - description = "Configures whether or not to enable Hydra Helper. (For use on regular hydra's only, will not work with Alchemical Hydra)." - ) - default boolean EnableHydra() - { - return true; - } @ConfigItem( position = 1, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/hydra/HydraPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/hydra/HydraPlugin.java index 6015fed94e..49c94a2fa1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/hydra/HydraPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/hydra/HydraPlugin.java @@ -99,10 +99,6 @@ public class HydraPlugin extends Plugin @Subscribe public void onNpcSpawned(NpcSpawned event) { - if (!config.EnableHydra()) - { - return; - } NPC hydra = event.getNpc(); if (hydra.getCombatLevel() != 0 && hydra.getName() != null) { @@ -119,10 +115,6 @@ public class HydraPlugin extends Plugin @Subscribe public void onNpcDespawned(NpcDespawned event) { - if (!config.EnableHydra()) - { - return; - } NPC hydra = event.getNpc(); if (hydra.getCombatLevel() != 0 && hydra.getName() != null) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/vetion/VetionConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/vetion/VetionConfig.java deleted file mode 100644 index 74e4e4327e..0000000000 --- a/runelite-client/src/main/java/net/runelite/client/plugins/vetion/VetionConfig.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2019, Frosty Fridge - * 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. - */ -package net.runelite.client.plugins.vetion; - -import net.runelite.client.config.Config; -import net.runelite.client.config.ConfigGroup; -import net.runelite.client.config.ConfigItem; - -@ConfigGroup("vetion") -public interface VetionConfig extends Config -{ - @ConfigItem( - keyName = "earthquakeTimerActive", - name = "Vet'ion Earthquake Timer", - description = "Configures whether or not a timer is shown to track the cooldown of Vet'ion's earthquake attack", - position = 0 - ) - default boolean eartquakeTimerActive() - { - return true; - } -} \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/vetion/VetionPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/vetion/VetionPlugin.java index 1143de0bcd..6e03740426 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/vetion/VetionPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/vetion/VetionPlugin.java @@ -50,9 +50,6 @@ import net.runelite.client.ui.overlay.OverlayManager; public class VetionPlugin extends Plugin { - @Inject - private VetionConfig config; - @Inject private OverlayManager overlayManager; @@ -62,12 +59,6 @@ public class VetionPlugin extends Plugin @Getter private Map vetions; - @Provides - VetionConfig getConfig(ConfigManager configManager) - { - return configManager.getConfig(VetionConfig.class); - } - @Override protected void startUp() { @@ -86,7 +77,7 @@ public class VetionPlugin extends Plugin @Subscribe public void onAnimationChanged(AnimationChanged event) { - if (config.eartquakeTimerActive() && event.getActor().getAnimation() == AnimationID.VETION_EARTHQUAKE) + if (event.getActor().getAnimation() == AnimationID.VETION_EARTHQUAKE) { Actor vet = event.getActor(); vetions.remove(vet, Instant.now()); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahConfig.java index 05f0b201b0..c539ee6752 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahConfig.java @@ -33,17 +33,6 @@ import net.runelite.client.config.ConfigItem; @ConfigGroup("zulrah") public interface ZulrahConfig extends Config { - @ConfigItem( - position = 0, - keyName = "zulrahenable", - name = "Enable Zulrah Helper", - description = "Configures whether or not to enable Zulrah Helper." - ) - default boolean EnableZulrah() - { - return true; - } - @ConfigItem( position = 1, keyName = "zulrahprayenable", diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahPlugin.java index 7e5ce9600c..6ffd755568 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahPlugin.java @@ -230,11 +230,6 @@ public class ZulrahPlugin extends Plugin @Subscribe public void onGameTick(GameTick event) { - if (!config.EnableZulrah()) - { - return; - } - if (phase4 && phases.size() == 11) { jadphase = 1;