aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-15 22:42:44 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-15 22:42:44 +0200
commit5cdd4e0b75b97598b46a548422b083573833956c (patch)
tree34c6f250b64a596900686fedfa3b71f073fe02c1 /src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt
parent83ad6adb43b2b6aaa6504b7fe13d70166f40df4d (diff)
downloadskyhanni-5cdd4e0b75b97598b46a548422b083573833956c.tar.gz
skyhanni-5cdd4e0b75b97598b46a548422b083573833956c.tar.bz2
skyhanni-5cdd4e0b75b97598b46a548422b083573833956c.zip
add not auctionable to repo
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt60
1 files changed, 32 insertions, 28 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt
index 280c23fb8..8e2b0ceb1 100644
--- a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt
@@ -32,6 +32,7 @@ class HideNotClickableItems {
private val tradeNpcFilter = MultiFilter()
private val itemsToSalvage = mutableListOf<String>()
private val hidePlayerTradeFilter = MultiFilter()
+ private val notAuctionableFilter = MultiFilter()
@SubscribeEvent
fun onRepoReload(event: RepositoryReloadEvent) {
@@ -46,6 +47,7 @@ class HideNotClickableItems {
updateSalvageList(hideNotClickableItems)
hidePlayerTradeFilter.load(hideNotClickableItems["hide_player_trade"].asJsonObject)
+ notAuctionableFilter.load(hideNotClickableItems["not_auctionable"].asJsonObject)
} catch (e: Exception) {
e.printStackTrace()
@@ -378,34 +380,36 @@ class HideNotClickableItems {
return true
}
- val result = when {
- name.contains("Personal Deletor") -> true
- name.contains("Day Crystal") -> true
- name.contains("Night Crystal") -> true
-
- name.contains("Cat Talisman") -> true
- name.contains("Lynx Talisman") -> true
- name.contains("Cheetah Talisman") -> true
-
- name.contains("Hoe of Great Tilling") -> true
- name.contains("Hoe of Greater Tilling") -> true
- name.contains("InfiniDirt") -> true
- name.contains("Prismapump") -> true
- name.contains("Mathematical Hoe Blueprint") -> true
- name.contains("Basket of Seeds") -> true
- name.contains("Nether Wart Pouch") -> true
-
- name.contains("Carrot Hoe") -> true
- name.contains("Sugar Cane Hoe") -> true
- name.contains("Nether Warts Hoe") -> true
- name.contains("Potato Hoe") -> true
- name.contains("Melon Dicer") -> true
- name.contains("Pumpkin Dicer") -> true
- name.contains("Coco Chopper") -> true
- name.contains("Wheat Hoe") -> true
-
- else -> false
- }
+ val result = notAuctionableFilter.match(name)
+
+// val result = when {
+// name.contains("Personal Deletor") -> true
+// name.contains("Day Crystal") -> true
+// name.contains("Night Crystal") -> true
+//
+// name.contains("Cat Talisman") -> true
+// name.contains("Lynx Talisman") -> true
+// name.contains("Cheetah Talisman") -> true
+//
+// name.contains("Hoe of Great Tilling") -> true
+// name.contains("Hoe of Greater Tilling") -> true
+// name.contains("InfiniDirt") -> true
+// name.contains("Prismapump") -> true
+// name.contains("Mathematical Hoe Blueprint") -> true
+// name.contains("Basket of Seeds") -> true
+// name.contains("Nether Wart Pouch") -> true
+//
+// name.contains("Carrot Hoe") -> true
+// name.contains("Sugar Cane Hoe") -> true
+// name.contains("Nether Warts Hoe") -> true
+// name.contains("Potato Hoe") -> true
+// name.contains("Melon Dicer") -> true
+// name.contains("Pumpkin Dicer") -> true
+// name.contains("Coco Chopper") -> true
+// name.contains("Wheat Hoe") -> true
+//
+// else -> false
+// }
if (result) hideReason = "This item cannot be auctioned!"
return result