npc indicators: separate sw true tile and regular overlay

This commit is contained in:
Adam
2022-06-17 13:16:37 -04:00
parent e92dd7e47b
commit 68da7ce55f
4 changed files with 26 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ public class HighlightedNpc
boolean tile;
boolean trueTile;
boolean swTile;
boolean swTrueTile;
boolean outline;
boolean name;
boolean nameOnMinimap;

View File

@@ -118,6 +118,18 @@ class NpcOverlay extends Overlay
}
if (highlightedNpc.isSwTile())
{
int size = npcComposition.getSize();
LocalPoint lp = actor.getLocalLocation();
int x = lp.getX() - ((size - 1) * Perspective.LOCAL_TILE_SIZE / 2);
int y = lp.getY() - ((size - 1) * Perspective.LOCAL_TILE_SIZE / 2);
Polygon southWestTilePoly = Perspective.getCanvasTilePoly(client, new LocalPoint(x, y));
renderPoly(graphics, borderColor, borderWidth, fillColor, southWestTilePoly);
}
if (highlightedNpc.isSwTrueTile())
{
LocalPoint lp = LocalPoint.fromWorld(client, actor.getWorldLocation());
if (lp != null)

View File

@@ -92,6 +92,18 @@ public interface NpcIndicatorsConfig extends Config
@ConfigItem(
position = 4,
keyName = "highlightSouthWestTrueTile",
name = "Highlight south west true tile",
description = "Configures whether or not NPC should be highlighted by south western true tile",
section = renderStyleSection
)
default boolean highlightSouthWestTrueTile()
{
return false;
}
@ConfigItem(
position = 5,
keyName = "highlightOutline",
name = "Highlight outline",
description = "Configures whether or not the model of the NPC should be highlighted by outline",

View File

@@ -662,6 +662,7 @@ public class NpcIndicatorsPlugin extends Plugin
.tile(config.highlightTile())
.trueTile(config.highlightTrueTile())
.swTile(config.highlightSouthWestTile())
.swTrueTile(config.highlightSouthWestTrueTile())
.outline(config.highlightOutline())
.name(config.drawNames())
.nameOnMinimap(config.drawMinimapNames())