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 CorpPlugin corpPlugin;
|
||||
private final CorpConfig config;
|
||||
|
||||
@Inject
|
||||
private CoreOverlay(Client client, CorpPlugin corpPlugin)
|
||||
private CoreOverlay(Client client, CorpPlugin corpPlugin, CorpConfig corpConfig)
|
||||
{
|
||||
setPosition(OverlayPosition.DYNAMIC);
|
||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||
this.client = client;
|
||||
this.corpPlugin = corpPlugin;
|
||||
this.config = corpConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
if (!config.markDarkCore())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
NPC core = corpPlugin.getCore();
|
||||
if (core != null)
|
||||
{
|
||||
|
||||
@@ -35,10 +35,21 @@ public interface CorpConfig extends Config
|
||||
keyName = "showDamage",
|
||||
name = "Show damage overlay",
|
||||
description = "Show total damage overlay",
|
||||
position = 2
|
||||
position = 0
|
||||
)
|
||||
default boolean showDamage()
|
||||
{
|
||||
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