npc indicators: add option to not highlight dead npcs
This commit is contained in:
@@ -100,6 +100,17 @@ public interface NpcIndicatorsConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 6,
|
position = 6,
|
||||||
|
keyName = "highlightDeadNPCs",
|
||||||
|
name = "Highlight dead NPCs",
|
||||||
|
description = "Highlight dead NPCs"
|
||||||
|
)
|
||||||
|
default boolean highlightDeadNpcs()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 7,
|
||||||
keyName = "showRespawnTimer",
|
keyName = "showRespawnTimer",
|
||||||
name = "Show respawn timer",
|
name = "Show respawn timer",
|
||||||
description = "Show respawn timer of tagged NPCs")
|
description = "Show respawn timer of tagged NPCs")
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ public class NpcIndicatorsPlugin extends Plugin
|
|||||||
|
|
||||||
if (config.highlightMenuNames() &&
|
if (config.highlightMenuNames() &&
|
||||||
NPC_MENU_ACTIONS.contains(MenuAction.of(type)) &&
|
NPC_MENU_ACTIONS.contains(MenuAction.of(type)) &&
|
||||||
highlightedNpcs.stream().anyMatch(npc -> npc.getIndex() == event.getIdentifier()))
|
highlightedNpcs.stream().anyMatch(npc -> npc.getIndex() == event.getIdentifier() && (!npc.isDead() || config.highlightDeadNpcs())))
|
||||||
{
|
{
|
||||||
MenuEntry[] menuEntries = client.getMenuEntries();
|
MenuEntry[] menuEntries = client.getMenuEntries();
|
||||||
final MenuEntry menuEntry = menuEntries[menuEntries.length - 1];
|
final MenuEntry menuEntry = menuEntries[menuEntries.length - 1];
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ public class NpcMinimapOverlay extends Overlay
|
|||||||
private void renderNpcOverlay(Graphics2D graphics, NPC actor, String name, Color color)
|
private void renderNpcOverlay(Graphics2D graphics, NPC actor, String name, Color color)
|
||||||
{
|
{
|
||||||
NPCComposition npcComposition = actor.getTransformedComposition();
|
NPCComposition npcComposition = actor.getTransformedComposition();
|
||||||
if (npcComposition == null || !npcComposition.isInteractible())
|
if (npcComposition == null || !npcComposition.isInteractible()
|
||||||
|
|| (actor.isDead() && !config.highlightDeadNpcs()))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,8 @@ public class NpcSceneOverlay extends Overlay
|
|||||||
private void renderNpcOverlay(Graphics2D graphics, NPC actor, Color color)
|
private void renderNpcOverlay(Graphics2D graphics, NPC actor, Color color)
|
||||||
{
|
{
|
||||||
NPCComposition npcComposition = actor.getTransformedComposition();
|
NPCComposition npcComposition = actor.getTransformedComposition();
|
||||||
if (npcComposition == null || !npcComposition.isInteractible())
|
if (npcComposition == null || !npcComposition.isInteractible()
|
||||||
|
|| (actor.isDead() && !config.highlightDeadNpcs()))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user