menu entry swapper: expand talk-to/pickpocket swap to non-blackjack npcs
This commit is contained in:
@@ -194,8 +194,8 @@ public interface MenuEntrySwapperConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "swapPickpocket",
|
keyName = "swapPickpocket",
|
||||||
name = "Pickpocket on H.A.M.",
|
name = "Pickpocket",
|
||||||
description = "Swap Talk-to with Pickpocket on H.A.M members"
|
description = "Swap Talk-to with Pickpocket"
|
||||||
)
|
)
|
||||||
default boolean swapPickpocket()
|
default boolean swapPickpocket()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
|
|
||||||
if (option.equals("talk-to"))
|
if (option.equals("talk-to"))
|
||||||
{
|
{
|
||||||
if (config.swapPickpocket() && target.contains("h.a.m."))
|
if (config.swapPickpocket() && shouldSwapPickpocket(target))
|
||||||
{
|
{
|
||||||
swap("pickpocket", option, target, true);
|
swap("pickpocket", option, target, true);
|
||||||
}
|
}
|
||||||
@@ -596,6 +596,11 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean shouldSwapPickpocket(String target)
|
||||||
|
{
|
||||||
|
return !target.startsWith("villager") && !target.startsWith("bandit") && !target.startsWith("menaphite thug");
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onPostItemComposition(PostItemComposition event)
|
public void onPostItemComposition(PostItemComposition event)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user