aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-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