Merge pull request #178 from runelite-extended/aoewarnings
Reformat and Update to AoE Warnings
This commit is contained in:
@@ -28,26 +28,14 @@ import net.runelite.client.config.Config;
|
|||||||
import net.runelite.client.config.ConfigGroup;
|
import net.runelite.client.config.ConfigGroup;
|
||||||
import net.runelite.client.config.ConfigItem;
|
import net.runelite.client.config.ConfigItem;
|
||||||
|
|
||||||
import java.awt.*;
|
|
||||||
|
|
||||||
@ConfigGroup("aoe")
|
@ConfigGroup("aoe")
|
||||||
public interface AoeWarningConfig extends Config
|
public interface AoeWarningConfig extends Config
|
||||||
{
|
{
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "pluginType",
|
keyName = "enabled",
|
||||||
name = "Plugin Type",
|
name = "AoE Warnings Enabled",
|
||||||
description = "Sets the group of this plugin",
|
description = "Configures whether or not AoE Projectile Warnings plugin is displayed",
|
||||||
hidden = true
|
position = 1
|
||||||
)
|
|
||||||
default String pluginTyoe()
|
|
||||||
{
|
|
||||||
return "PVM";
|
|
||||||
}
|
|
||||||
|
|
||||||
@ConfigItem(
|
|
||||||
keyName = "enabled",
|
|
||||||
name = "AoE Warnings Enabled",
|
|
||||||
description = "Configures whether or not AoE Projectile Warnings plugin is displayed"
|
|
||||||
)
|
)
|
||||||
default boolean enabled()
|
default boolean enabled()
|
||||||
{
|
{
|
||||||
@@ -55,9 +43,32 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "lizardmanaoe",
|
keyName = "outline",
|
||||||
name = "Lizardman Shamans",
|
name = "Display Outline",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Lizardman Shamans is displayed"
|
description = "Configures whether or not AoE Projectile Warnings have an outline",
|
||||||
|
position = 2
|
||||||
|
)
|
||||||
|
default boolean isOutlineEnabled()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "fade",
|
||||||
|
name = "Fade Warnings",
|
||||||
|
description = "Configures whether or not AoE Projectile Warnings fade over time",
|
||||||
|
position = 3
|
||||||
|
)
|
||||||
|
default boolean isFadeEnabled()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "lizardmanaoe",
|
||||||
|
name = "Lizardman Shamans",
|
||||||
|
description = "Configures whether or not AoE Projectile Warnings for Lizardman Shamans is displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isShamansEnabled()
|
default boolean isShamansEnabled()
|
||||||
{
|
{
|
||||||
@@ -65,9 +76,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "archaeologistaoe",
|
keyName = "archaeologistaoe",
|
||||||
name = "Crazy Archaeologist",
|
name = "Crazy Archaeologist",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Archaeologist is displayed"
|
description = "Configures whether or not AoE Projectile Warnings for Archaeologist is displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isArchaeologistEnabled()
|
default boolean isArchaeologistEnabled()
|
||||||
{
|
{
|
||||||
@@ -75,9 +87,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "icedemon",
|
keyName = "icedemon",
|
||||||
name = "Ice Demon",
|
name = "Ice Demon",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Ice Demon is displayed"
|
description = "Configures whether or not AoE Projectile Warnings for Ice Demon is displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isIceDemonEnabled()
|
default boolean isIceDemonEnabled()
|
||||||
{
|
{
|
||||||
@@ -85,9 +98,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "vasa",
|
keyName = "vasa",
|
||||||
name = "Vasa",
|
name = "Vasa",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Vasa is displayed"
|
description = "Configures whether or not AoE Projectile Warnings for Vasa is displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isVasaEnabled()
|
default boolean isVasaEnabled()
|
||||||
{
|
{
|
||||||
@@ -95,9 +109,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "tekton",
|
keyName = "tekton",
|
||||||
name = "Tekton",
|
name = "Tekton",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Tekton is displayed"
|
description = "Configures whether or not AoE Projectile Warnings for Tekton is displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isTektonEnabled()
|
default boolean isTektonEnabled()
|
||||||
{
|
{
|
||||||
@@ -105,9 +120,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "vorkath",
|
keyName = "vorkath",
|
||||||
name = "Vorkath",
|
name = "Vorkath",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Vorkath are displayed"
|
description = "Configures whether or not AoE Projectile Warnings for Vorkath are displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isVorkathEnabled()
|
default boolean isVorkathEnabled()
|
||||||
{
|
{
|
||||||
@@ -115,9 +131,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "galvek",
|
keyName = "galvek",
|
||||||
name = "Galvek",
|
name = "Galvek",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Galvek are displayed"
|
description = "Configures whether or not AoE Projectile Warnings for Galvek are displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isGalvekEnabled()
|
default boolean isGalvekEnabled()
|
||||||
{
|
{
|
||||||
@@ -125,9 +142,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "gargboss",
|
keyName = "gargboss",
|
||||||
name = "Gargoyle Boss",
|
name = "Gargoyle Boss",
|
||||||
description = "Configs whether or not AoE Projectile Warnings for Dawn/Dusk are displayed"
|
description = "Configs whether or not AoE Projectile Warnings for Dawn/Dusk are displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isGargBossEnabled()
|
default boolean isGargBossEnabled()
|
||||||
{
|
{
|
||||||
@@ -135,9 +153,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "vetion",
|
keyName = "vetion",
|
||||||
name = "Vet'ion",
|
name = "Vet'ion",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Vet'ion are displayed"
|
description = "Configures whether or not AoE Projectile Warnings for Vet'ion are displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isVetionEnabled()
|
default boolean isVetionEnabled()
|
||||||
{
|
{
|
||||||
@@ -145,9 +164,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "chaosfanatic",
|
keyName = "chaosfanatic",
|
||||||
name = "Chaos Fanatic",
|
name = "Chaos Fanatic",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Chaos Fanatic are displayed"
|
description = "Configures whether or not AoE Projectile Warnings for Chaos Fanatic are displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isChaosFanaticEnabled()
|
default boolean isChaosFanaticEnabled()
|
||||||
{
|
{
|
||||||
@@ -155,9 +175,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "olm",
|
keyName = "olm",
|
||||||
name = "Great Olm",
|
name = "Olm",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for The Great Olm are displayed"
|
description = "Configures whether or not AoE Projectile Warnings for The Great Olm are displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isOlmEnabled()
|
default boolean isOlmEnabled()
|
||||||
{
|
{
|
||||||
@@ -166,8 +187,9 @@ public interface AoeWarningConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "bombDisplay",
|
keyName = "bombDisplay",
|
||||||
name = "Display crystal phase bomb tracker",
|
name = "Olm Bombs",
|
||||||
description = "Display a timer and colour-coded AoE for Olm's crystal-phase bombs."
|
description = "Display a timer and colour-coded AoE for Olm's crystal-phase bombs.",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean bombDisplay()
|
default boolean bombDisplay()
|
||||||
{
|
{
|
||||||
@@ -175,9 +197,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "corp",
|
keyName = "corp",
|
||||||
name = "Corporeal Beast",
|
name = "Corporeal Beast",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for the Corporeal Beast are displayed"
|
description = "Configures whether or not AoE Projectile Warnings for the Corporeal Beast are displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isCorpEnabled()
|
default boolean isCorpEnabled()
|
||||||
{
|
{
|
||||||
@@ -185,9 +208,10 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "wintertodt",
|
keyName = "wintertodt",
|
||||||
name = "Wintertodt Snow Fall",
|
name = "Wintertodt Snow Fall",
|
||||||
description = "Configures whether or not AOE Projectile Warnings for the Wintertodt snow fall are displayed"
|
description = "Configures whether or not AOE Projectile Warnings for the Wintertodt snow fall are displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isWintertodtEnabled()
|
default boolean isWintertodtEnabled()
|
||||||
{
|
{
|
||||||
@@ -195,26 +219,21 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "isXarpusEnabled",
|
keyName = "isXarpusEnabled",
|
||||||
name = "Xarpus",
|
name = "Xarpus",
|
||||||
description = "Configures whether or not AOE Projectile Warnings for Xarpus are displayed"
|
description = "Configures whether or not AOE Projectile Warnings for Xarpus are displayed",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isXarpusEnabled() { return true; }
|
default boolean isXarpusEnabled()
|
||||||
|
|
||||||
@ConfigItem(
|
|
||||||
keyName = "outline",
|
|
||||||
name = "Display Outline",
|
|
||||||
description = "Configures whether or not AoE Projectile Warnings have an outline"
|
|
||||||
)
|
|
||||||
default boolean isOutlineEnabled()
|
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "lightning",
|
keyName = "lightning",
|
||||||
name = "Show Lightning Trails",
|
name = "Olm Lightning Trails",
|
||||||
description = "Show Lightning Trails"
|
description = "Show Lightning Trails",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean LightningTrail()
|
default boolean LightningTrail()
|
||||||
{
|
{
|
||||||
@@ -222,11 +241,12 @@ public interface AoeWarningConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "fade",
|
keyName = "addyDrags",
|
||||||
name = "Fade Warnings",
|
name = "Addy Drags",
|
||||||
description = "Configures whether or not AoE Projectile Warnings fade over time"
|
description = "Show Bad Areas",
|
||||||
|
position = 4
|
||||||
)
|
)
|
||||||
default boolean isFadeEnabled()
|
default boolean addyDrags()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,19 +26,22 @@ package net.runelite.client.plugins.aoewarnings;
|
|||||||
|
|
||||||
|
|
||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
|
import java.time.Instant;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.inject.Inject;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.GameObject;
|
import net.runelite.api.GameObject;
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.api.GraphicID;
|
|
||||||
import net.runelite.api.GraphicsObject;
|
import net.runelite.api.GraphicsObject;
|
||||||
import net.runelite.api.ObjectID;
|
import net.runelite.api.ObjectID;
|
||||||
import net.runelite.api.Projectile;
|
import net.runelite.api.Projectile;
|
||||||
import net.runelite.api.Client;
|
|
||||||
import net.runelite.api.Tile;
|
import net.runelite.api.Tile;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
@@ -46,7 +49,6 @@ import net.runelite.api.events.GameObjectDespawned;
|
|||||||
import net.runelite.api.events.GameObjectSpawned;
|
import net.runelite.api.events.GameObjectSpawned;
|
||||||
import net.runelite.api.events.GameStateChanged;
|
import net.runelite.api.events.GameStateChanged;
|
||||||
import net.runelite.api.events.GameTick;
|
import net.runelite.api.events.GameTick;
|
||||||
import net.runelite.api.events.GraphicsObjectCreated;
|
|
||||||
import net.runelite.api.events.ProjectileMoved;
|
import net.runelite.api.events.ProjectileMoved;
|
||||||
import net.runelite.client.Notifier;
|
import net.runelite.client.Notifier;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
@@ -56,43 +58,33 @@ import net.runelite.client.plugins.PluginDescriptor;
|
|||||||
import net.runelite.client.plugins.PluginType;
|
import net.runelite.client.plugins.PluginType;
|
||||||
import net.runelite.client.ui.overlay.OverlayManager;
|
import net.runelite.client.ui.overlay.OverlayManager;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import java.time.Instant;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "AoE Warnings",
|
name = "AoE Warnings",
|
||||||
description = "Shows the final destination for AoE Attack projectiles",
|
description = "Shows the final destination for AoE Attack projectiles",
|
||||||
tags = {"bosses", "combat", "pve", "overlay"},
|
tags = {"bosses", "combat", "pve", "overlay"},
|
||||||
type = PluginType.PVM
|
type = PluginType.PVM
|
||||||
)
|
)
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class AoeWarningPlugin extends Plugin
|
public class AoeWarningPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private final Map<WorldPoint, CrystalBomb> bombs = new HashMap<>();
|
||||||
|
private final Map<Projectile, AoeProjectile> projectiles = new HashMap<>();
|
||||||
|
@Inject
|
||||||
|
public AoeWarningConfig config;
|
||||||
@Inject
|
@Inject
|
||||||
private OverlayManager overlayManager;
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private AoeWarningOverlay coreOverlay;
|
private AoeWarningOverlay coreOverlay;
|
||||||
|
|
||||||
@Inject
|
|
||||||
public AoeWarningConfig config;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private BombOverlay bombOverlay;
|
private BombOverlay bombOverlay;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Notifier notifier;
|
private Notifier notifier;
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<WorldPoint, CrystalBomb> bombs = new HashMap<>();
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private List<WorldPoint> LightningTrail = new ArrayList<>();
|
private List<WorldPoint> LightningTrail = new ArrayList<>();
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@@ -100,16 +92,12 @@ public class AoeWarningPlugin extends Plugin
|
|||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private List<WorldPoint> CrystalSpike = new ArrayList<>();
|
private List<WorldPoint> CrystalSpike = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
AoeWarningConfig getConfig(ConfigManager configManager)
|
AoeWarningConfig getConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
return configManager.getConfig(AoeWarningConfig.class);
|
return configManager.getConfig(AoeWarningConfig.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private final Map<Projectile, AoeProjectile> projectiles = new HashMap<>();
|
|
||||||
|
|
||||||
public Map<Projectile, AoeProjectile> getProjectiles()
|
public Map<Projectile, AoeProjectile> getProjectiles()
|
||||||
{
|
{
|
||||||
return projectiles;
|
return projectiles;
|
||||||
@@ -130,6 +118,9 @@ public class AoeWarningPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
overlayManager.remove(coreOverlay);
|
overlayManager.remove(coreOverlay);
|
||||||
overlayManager.remove(bombOverlay);
|
overlayManager.remove(bombOverlay);
|
||||||
|
LightningTrail.clear();
|
||||||
|
AcidTrail.clear();
|
||||||
|
CrystalSpike.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
|||||||
Reference in New Issue
Block a user