corp: Add toggle for dark energy core highlighting (#12462)

This commit is contained in:
Matthew C
2020-09-09 12:30:41 +09:00
committed by GitHub
parent 2a3aede2ca
commit 230bba0ea7
2 changed files with 20 additions and 2 deletions

View File

@@ -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)
{

View File

@@ -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;
}
}