Skip to content

Commit

Permalink
Use RL Notification object for digweed (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyborger1 authored Oct 14, 2024
1 parent bca3da4 commit cf4433c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.ConfigSection;
import net.runelite.client.config.Notification;

import java.awt.Color;

Expand Down Expand Up @@ -97,8 +98,8 @@ default Color stationQuickActionHighlightColor() {
description = "Toggles digweed notifications on or off",
position = 5
)
default boolean notifyDigWeed() {
return true;
default Notification notifyDigWeed() {
return Notification.ON;
}

@ConfigItem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,7 @@ public void onVarbitChanged(VarbitChanged event) {
if (config.highlightDigWeed()) {
highlightObject(AlchemyObject.DIGWEED_NORTH_EAST, config.digweedHighlightColor());
}
if (config.notifyDigWeed()) {
notifier.notify("A digweed has spawned north east.");
}
notifier.notify(config.notifyDigWeed(), "A digweed has spawned north east.");
} else {
unHighlightObject(AlchemyObject.DIGWEED_NORTH_EAST);
}
Expand All @@ -294,9 +292,7 @@ public void onVarbitChanged(VarbitChanged event) {
if (config.highlightDigWeed()) {
highlightObject(AlchemyObject.DIGWEED_SOUTH_EAST, config.digweedHighlightColor());
}
if (config.notifyDigWeed()) {
notifier.notify("A digweed has spawned south east.");
}
notifier.notify(config.notifyDigWeed(), "A digweed has spawned south east.");
} else {
unHighlightObject(AlchemyObject.DIGWEED_SOUTH_EAST);
}
Expand All @@ -305,9 +301,7 @@ public void onVarbitChanged(VarbitChanged event) {
if (config.highlightDigWeed()) {
highlightObject(AlchemyObject.DIGWEED_SOUTH_WEST, config.digweedHighlightColor());
}
if (config.notifyDigWeed()) {
notifier.notify("A digweed has spawned south west.");
}
notifier.notify(config.notifyDigWeed(), "A digweed has spawned south west.");
} else {
unHighlightObject(AlchemyObject.DIGWEED_SOUTH_WEST);
}
Expand All @@ -316,9 +310,7 @@ public void onVarbitChanged(VarbitChanged event) {
if (config.highlightDigWeed()) {
highlightObject(AlchemyObject.DIGWEED_NORTH_WEST, config.digweedHighlightColor());
}
if (config.notifyDigWeed()) {
notifier.notify("A digweed has spawned north west.");
}
notifier.notify(config.notifyDigWeed(), "A digweed has spawned north west.");
} else {
unHighlightObject(AlchemyObject.DIGWEED_NORTH_WEST);
}
Expand Down

0 comments on commit cf4433c

Please sign in to comment.