From 7b72c468816b6334b2e7fe16c629afeeffeaec2e Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Mon, 28 Nov 2022 23:03:33 +0100 Subject: Added settings for Fallen Star and Powder Ghast Waypoints (#451) * Added settings for Fallen Star and Powder Ghast Waypoints * I suggest the wording 'at the location' in these sentences. Less repeating 'of's. --- .../miscfeatures/DwarvenMinesWaypoints.java | 4 ++-- .../options/seperateSections/Mining.java | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java index c1c7dca1..6b2c9ac9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java @@ -114,13 +114,13 @@ public class DwarvenMinesWaypoints { @SubscribeEvent public void onChat(ClientChatReceivedEvent event) { Matcher matcherGhast = ghastRegex.matcher(event.message.getFormattedText()); - if (matcherGhast.find()) { + if (matcherGhast.find() && NotEnoughUpdates.INSTANCE.config.mining.powderGhastWaypoint) { dynamicLocation = Utils.cleanColour(matcherGhast.group(1).trim()); dynamicName = EnumChatFormatting.GOLD + "Powder Ghast"; dynamicMillis = System.currentTimeMillis(); } else { Matcher matcherStar = fallenStarRegex.matcher(event.message.getFormattedText()); - if (matcherStar.find()) { + if (matcherStar.find() && NotEnoughUpdates.INSTANCE.config.mining.fallenStarWaypoint) { dynamicLocation = Utils.cleanColour(matcherStar.group(1).trim()); dynamicName = EnumChatFormatting.DARK_PURPLE + "Fallen Star"; dynamicMillis = System.currentTimeMillis(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java index f49759e0..43273c3d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java @@ -78,6 +78,24 @@ public class Mining { @ConfigAccordionId(id = 0) public int emissaryWaypoints = 1; + @Expose + @ConfigOption( + name = "Enable Powder Ghast Waypoints", + desc = "Shows a waypoint at the location of the Powder Ghast" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean powderGhastWaypoint = true; + + @Expose + @ConfigOption( + name = "Enable Fallen Star Waypoints", + desc = "Shows a waypoint at the location of the Fallen Star" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean fallenStarWaypoint = true; + @ConfigOption( name = "Drill Fuel Bar", desc = "" -- cgit