corp: Add toggle for dark energy core highlighting (#12462)
This commit is contained in:
@@ -40,19 +40,26 @@ class CoreOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final CorpPlugin corpPlugin;
|
private final CorpPlugin corpPlugin;
|
||||||
|
private final CorpConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CoreOverlay(Client client, CorpPlugin corpPlugin)
|
private CoreOverlay(Client client, CorpPlugin corpPlugin, CorpConfig corpConfig)
|
||||||
{
|
{
|
||||||
setPosition(OverlayPosition.DYNAMIC);
|
setPosition(OverlayPosition.DYNAMIC);
|
||||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||||
this.client = client;
|
this.client = client;
|
||||||
this.corpPlugin = corpPlugin;
|
this.corpPlugin = corpPlugin;
|
||||||
|
this.config = corpConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics)
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
|
if (!config.markDarkCore())
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
NPC core = corpPlugin.getCore();
|
NPC core = corpPlugin.getCore();
|
||||||
if (core != null)
|
if (core != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,10 +35,21 @@ public interface CorpConfig extends Config
|
|||||||
keyName = "showDamage",
|
keyName = "showDamage",
|
||||||
name = "Show damage overlay",
|
name = "Show damage overlay",
|
||||||
description = "Show total damage overlay",
|
description = "Show total damage overlay",
|
||||||
position = 2
|
position = 0
|
||||||
)
|
)
|
||||||
default boolean showDamage()
|
default boolean showDamage()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "markDarkCore",
|
||||||
|
name = "Mark dark core",
|
||||||
|
description = "Marks the dark energy core.",
|
||||||
|
position = 1
|
||||||
|
)
|
||||||
|
default boolean markDarkCore()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user