Merge remote-tracking branch 'runelite/master'

This commit is contained in:
Owain van Brakel
2019-11-07 11:27:51 +01:00
6 changed files with 64 additions and 42 deletions

View File

@@ -311,7 +311,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
new CrypticClue("Search the eastern bookcase in Father Urhney's house.", BOOKCASE_9523, new WorldPoint(3149, 3177, 0), "Father Urhney's house is found in the western end of the Lumbridge Swamp."),
new CrypticClue("Talk to Morgan in his house at Draynor Village.", "Morgan", new WorldPoint(3098, 3268, 0), "Morgan can be found in the house with the quest start map icon."),
new CrypticClue("Talk to Charles at Port Piscarilius.", "Charles", new WorldPoint(1821, 3690, 0), "Charles is found by Veos' ship in Port Piscarilius."),
new CrypticClue("Search the crate in Rommiks crafting shop in Rimmington.", CRATE_9534, new WorldPoint(2947, 3208, 0), "The crates in Rommik's Crafty Supplies in Rimmington."),
new CrypticClue("Search the crate in Rommiks crafting shop in Rimmington.", CRATE_9533, new WorldPoint(2946, 3207, 0), "The crates in Rommik's Crafty Supplies in Rimmington."),
new CrypticClue("Talk to Ali the Leaflet Dropper north of the Al Kharid mine.", "Ali the Leaflet Dropper", new WorldPoint(3283, 3329, 0), "Ali the Leaflet Dropper can be found roaming north of the Al Kharid mine."),
new CrypticClue("Talk to the cook in the Blue Moon Inn in Varrock.", "Cook", new WorldPoint(3230, 3401, 0), "The Blue Moon Inn can be found by the southern entrance to Varrock."),
new CrypticClue("Search the single crate in Horvik's smithy in Varrock.", CRATE_5106, new WorldPoint(3228, 3433, 0), "Horvik's Smithy is found north-east of of Varrock Square."),

View File

@@ -40,7 +40,7 @@ public class ImplingCounterOverlay extends Overlay
for (Map.Entry<ImplingType, Integer> entry : plugin.getImplingCounterMap().entrySet())
{
if (plugin.showImplingType(entry.getKey()) && entry.getValue() != 0)
if (plugin.showImplingType(entry.getKey()) != ImplingsConfig.ImplingMode.NONE && entry.getValue() != 0)
{
tableComponent.addRow(entry.getKey().getName(), entry.getValue().toString());
}

View File

@@ -35,15 +35,22 @@ import net.runelite.client.config.ConfigItem;
@ConfigGroup("implings")
public interface ImplingsConfig extends Config
{
enum ImplingMode
{
NONE,
HIGHLIGHT,
NOTIFY
}
@ConfigItem(
position = 1,
keyName = "showbaby",
name = "Show Baby implings",
description = "Configures whether or not Baby impling tags are displayed"
)
default boolean showBaby()
default ImplingMode showBaby()
{
return false;
return ImplingMode.NONE;
}
@ConfigItem(
@@ -63,9 +70,9 @@ public interface ImplingsConfig extends Config
name = "Show Young implings",
description = "Configures whether or not Young impling tags are displayed"
)
default boolean showYoung()
default ImplingMode showYoung()
{
return false;
return ImplingMode.NONE;
}
@ConfigItem(
@@ -85,9 +92,9 @@ public interface ImplingsConfig extends Config
name = "Show Gourmet implings",
description = "Configures whether or not Gourmet impling tags are displayed"
)
default boolean showGourmet()
default ImplingMode showGourmet()
{
return false;
return ImplingMode.NONE;
}
@ConfigItem(
@@ -107,9 +114,9 @@ public interface ImplingsConfig extends Config
name = "Show Earth implings",
description = "Configures whether or not Earth impling tags are displayed"
)
default boolean showEarth()
default ImplingMode showEarth()
{
return false;
return ImplingMode.NONE;
}
@ConfigItem(
@@ -129,9 +136,9 @@ public interface ImplingsConfig extends Config
name = "Show Essence implings",
description = "Configures whether or not Essence impling tags are displayed"
)
default boolean showEssence()
default ImplingMode showEssence()
{
return false;
return ImplingMode.NONE;
}
@ConfigItem(
@@ -151,9 +158,9 @@ public interface ImplingsConfig extends Config
name = "Show Eclectic implings",
description = "Configures whether or not Eclectic impling tags are displayed"
)
default boolean showEclectic()
default ImplingMode showEclectic()
{
return false;
return ImplingMode.NONE;
}
@ConfigItem(
@@ -173,9 +180,9 @@ public interface ImplingsConfig extends Config
name = "Show Nature implings",
description = "Configures whether or not Nature impling tags are displayed"
)
default boolean showNature()
default ImplingMode showNature()
{
return false;
return ImplingMode.NONE;
}
@ConfigItem(
@@ -195,9 +202,9 @@ public interface ImplingsConfig extends Config
name = "Show Magpie implings",
description = "Configures whether or not Magpie impling tags are displayed"
)
default boolean showMagpie()
default ImplingMode showMagpie()
{
return false;
return ImplingMode.NONE;
}
@ConfigItem(
@@ -217,9 +224,9 @@ public interface ImplingsConfig extends Config
name = "Show Ninja implings",
description = "Configures whether or not Ninja impling tags are displayed"
)
default boolean showNinja()
default ImplingMode showNinja()
{
return false;
return ImplingMode.NONE;
}
@ConfigItem(
@@ -239,9 +246,9 @@ public interface ImplingsConfig extends Config
name = "Show Crystal implings",
description = "Configures whether or not Crystal impling tags are displayed"
)
default boolean showCrystal()
default ImplingMode showCrystal()
{
return false;
return ImplingMode.NONE;
}
@ConfigItem(
@@ -261,9 +268,9 @@ public interface ImplingsConfig extends Config
name = "Show Dragon implings",
description = "Configures whether or not Dragon impling tags are displayed"
)
default boolean showDragon()
default ImplingMode showDragon()
{
return true;
return ImplingMode.HIGHLIGHT;
}
@ConfigItem(
@@ -283,9 +290,9 @@ public interface ImplingsConfig extends Config
name = "Show Lucky implings",
description = "Configures whether or not Lucky impling tags are displayed"
)
default boolean showLucky()
default ImplingMode showLucky()
{
return true;
return ImplingMode.HIGHLIGHT;
}
@ConfigItem(

View File

@@ -89,7 +89,7 @@ public class ImplingsOverlay extends Overlay
{
for (ImplingSpawn spawn : ImplingSpawn.values())
{
if (!plugin.showImplingType(spawn.getType()))
if (plugin.showImplingType(spawn.getType()) == ImplingsConfig.ImplingMode.NONE)
{
continue;
}

View File

@@ -42,6 +42,7 @@ import net.runelite.api.events.GameTick;
import net.runelite.api.events.NpcDefinitionChanged;
import net.runelite.api.events.NpcDespawned;
import net.runelite.api.events.NpcSpawned;
import net.runelite.client.Notifier;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.EventBus;
import net.runelite.client.plugins.Plugin;
@@ -87,29 +88,32 @@ public class ImplingsPlugin extends Plugin
@Inject
private EventBus eventBus;
private boolean showBaby;
@Inject
private Notifier notifier;
private ImplingsConfig.ImplingMode showBaby;
private Color getBabyColor;
private boolean showYoung;
private ImplingsConfig.ImplingMode showYoung;
private Color getYoungColor;
private boolean showGourmet;
private ImplingsConfig.ImplingMode showGourmet;
private Color getGourmetColor;
private boolean showEarth;
private ImplingsConfig.ImplingMode showEarth;
private Color getEarthColor;
private boolean showEssence;
private ImplingsConfig.ImplingMode showEssence;
private Color getEssenceColor;
private boolean showEclectic;
private ImplingsConfig.ImplingMode showEclectic;
private Color getEclecticColor;
private boolean showNature;
private ImplingsConfig.ImplingMode showNature;
private Color getNatureColor;
private boolean showMagpie;
private ImplingsConfig.ImplingMode showMagpie;
private Color getMagpieColor;
private boolean showNinja;
private ImplingsConfig.ImplingMode showNinja;
private Color getNinjaColor;
private boolean showCrystal;
private ImplingsConfig.ImplingMode showCrystal;
private Color getCrystalColor;
private boolean showDragon;
private ImplingsConfig.ImplingMode showDragon;
private Color getDragonColor;
private boolean showLucky;
private ImplingsConfig.ImplingMode showLucky;
private Color getLuckyColor;
@Getter(AccessLevel.PACKAGE)
private boolean showSpawn;
@@ -193,6 +197,11 @@ public class ImplingsPlugin extends Plugin
if (impling != null)
{
if (showImplingType(impling.getImplingType()) == ImplingsConfig.ImplingMode.NOTIFY)
{
notifier.notify(impling.getImplingType().getName() + " impling is in the area");
}
implings.add(npc);
}
}
@@ -204,6 +213,11 @@ public class ImplingsPlugin extends Plugin
if (impling != null && !implings.contains(npc))
{
if (showImplingType(impling.getImplingType()) == ImplingsConfig.ImplingMode.NOTIFY)
{
notifier.notify(impling.getImplingType().getName() + " impling is in the area");
}
implings.add(npc);
}
}
@@ -237,10 +251,11 @@ public class ImplingsPlugin extends Plugin
return true;
}
return !showImplingType(impling.getImplingType());
ImplingsConfig.ImplingMode impMode = showImplingType(impling.getImplingType());
return impMode == ImplingsConfig.ImplingMode.HIGHLIGHT || impMode == ImplingsConfig.ImplingMode.NOTIFY;
}
boolean showImplingType(ImplingType implingType)
ImplingsConfig.ImplingMode showImplingType(ImplingType implingType)
{
switch (implingType)
{
@@ -269,7 +284,7 @@ public class ImplingsPlugin extends Plugin
case LUCKY:
return this.showLucky;
default:
return false;
return ImplingsConfig.ImplingMode.NONE;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

After

Width:  |  Height:  |  Size: 176 B