Added more untradeables to the swapper and gave them their own category (#498)

Also added the ability to hide "drop" on runecrafting pouches

![alt text](https://i.gyazo.com/0d2b52a536099d0a94105117e3c21262.png)
This commit is contained in:
vanni
2019-06-04 11:59:15 -04:00
committed by Kyleeld
parent d125a7051f
commit f3199d4728
2 changed files with 62 additions and 4 deletions

View File

@@ -1563,12 +1563,14 @@ public interface MenuEntrySwapperConfig extends Config
return false;
}
//----------------------Untradeables---------------------------//
@ConfigItem(
keyName = "hideDestroyRunepouch",
name = "Hide Destroy on Rune Pouch",
description = "Hides the 'Destroy' option when right clicking a Rune pouch.",
position = 117,
group = "Right Click Options"
group = "Untradeables"
)
default boolean hideDestroyRunepouch()
{
@@ -1580,7 +1582,7 @@ public interface MenuEntrySwapperConfig extends Config
name = "Hide Destroy on Coal bag",
description = "Hides the 'Destroy' option when right clicking a Coal bag.",
position = 118,
group = "Right Click Options"
group = "Untradeables"
)
default boolean hideDestroyCoalbag()
{
@@ -1592,20 +1594,56 @@ public interface MenuEntrySwapperConfig extends Config
name = "Hide Destroy on Herb sack",
description = "Hides the 'Destroy' option when right clicking a Herb sack.",
position = 119,
group = "Right Click Options"
group = "Untradeables"
)
default boolean hideDestroyHerbsack()
{
return false;
}
@ConfigItem(
keyName = "hideDestroyBoltpouch",
name = "Hide Destroy on Bolt pouch",
description = "Hides the 'Destroy' option when right clicking a Bolt pouch.",
position = 120,
group = "Untradeables"
)
default boolean hideDestroyBoltpouch()
{
return false;
}
@ConfigItem(
keyName = "hideDestroyGembag",
name = "Hide Destroy on Gem bag",
description = "Hides the 'Destroy' option when right clicking a Gem bag.",
position = 121,
group = "Untradeables"
)
default boolean hideDestroyGembag()
{
return false;
}
@ConfigItem(
keyName = "hideDropRunecraftingPouch",
name = "Hide Drop on RC pouches",
description = "Hides the 'Drop' option when right clicking a Small, Medium, Large, or Giant pouch.",
position = 122,
group = "Untradeables"
)
default boolean hideDropRunecraftingPouch()
{
return false;
}
//------------------------------------------------------------//
@ConfigItem(
keyName = "swapImps",
name = "Impling Jars",
description = "Don't open implings if bank has a clue.",
position = 120,
position = 123,
group = "Miscellaneous"
)
default boolean swapImps()

View File

@@ -382,6 +382,26 @@ public class MenuEntrySwapperPlugin extends Plugin
{
continue;
}
if (config.hideDestroyBoltpouch() && entry.getTarget().contains("Bolt pouch"))
{
continue;
}
if (config.hideDestroyGembag() && entry.getTarget().contains("Gem bag"))
{
continue;
}
}
if (option.contains("drop"))
{
if (config.hideDropRunecraftingPouch() && (
entry.getTarget().contains("Small pouch")
|| entry.getTarget().contains("Medium pouch")
|| entry.getTarget().contains("Large pouch")
|| entry.getTarget().contains("Giant pouch")))
{
continue;
}
}
int identifier = entry.getIdentifier();