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(
|
||||
keyName = "swapPickpocket",
|
||||
name = "Pickpocket on H.A.M.",
|
||||
description = "Swap Talk-to with Pickpocket on H.A.M members"
|
||||
name = "Pickpocket",
|
||||
description = "Swap Talk-to with Pickpocket"
|
||||
)
|
||||
default boolean swapPickpocket()
|
||||
{
|
||||
|
||||
@@ -373,7 +373,7 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
|
||||
if (option.equals("talk-to"))
|
||||
{
|
||||
if (config.swapPickpocket() && target.contains("h.a.m."))
|
||||
if (config.swapPickpocket() && shouldSwapPickpocket(target))
|
||||
{
|
||||
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
|
||||
public void onPostItemComposition(PostItemComposition event)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user