From 83ad6adb43b2b6aaa6504b7fe13d70166f40df4d Mon Sep 17 00:00:00 2001 From: Lorenz Date: Fri, 15 Jul 2022 22:25:07 +0200 Subject: code cleanup --- .../hannibal2/skyhanni/items/HideNotClickableItems.kt | 18 +++++++++--------- .../java/at/hannibal2/skyhanni/utils/LorenzDebug.kt | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt index 4b4d9e732..280c23fb8 100644 --- a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt @@ -27,9 +27,9 @@ class HideNotClickableItems { private var lastClickTime = 0L private var bypassUntil = 0L - private val hideNpcSellList = MultiFilter() - private val hideInStorageList = MultiFilter() - private val tradeNpcList = MultiFilter() + private val hideNpcSellFilter = MultiFilter() + private val hideInStorageFilter = MultiFilter() + private val tradeNpcFilter = MultiFilter() private val itemsToSalvage = mutableListOf() private val hidePlayerTradeFilter = MultiFilter() @@ -37,11 +37,11 @@ class HideNotClickableItems { fun onRepoReload(event: RepositoryReloadEvent) { try { val hideNotClickableItems = event.getConstant("HideNotClickableItems")!! - hideNpcSellList.load(hideNotClickableItems["hide_npc_sell"].asJsonObject) - hideInStorageList.load(hideNotClickableItems["hide_in_storage"].asJsonObject) + hideNpcSellFilter.load(hideNotClickableItems["hide_npc_sell"].asJsonObject) + hideInStorageFilter.load(hideNotClickableItems["hide_in_storage"].asJsonObject) val tradeNpcs = event.getConstant("TradeNpcs")!! - tradeNpcList.load(tradeNpcs) + tradeNpcFilter.load(tradeNpcs) updateSalvageList(hideNotClickableItems) @@ -265,7 +265,7 @@ class HideNotClickableItems { } private fun hideNpcSell(chestName: String, stack: ItemStack): Boolean { - if (!tradeNpcList.match(chestName)) return false + if (!tradeNpcFilter.match(chestName)) return false var name = stack.cleanName() val size = stack.stackSize @@ -280,7 +280,7 @@ class HideNotClickableItems { } if (!ItemUtils.isRecombobulated(stack)) { - if (hideNpcSellList.match(name)) return false + if (hideNpcSellFilter.match(name)) return false } hideReason = "This item should not be sold at the NPC!" @@ -301,7 +301,7 @@ class HideNotClickableItems { return true } - val result = hideInStorageList.match(name) + val result = hideInStorageFilter.match(name) if (result) hideReason = "Bags cannot be put into the storage!" return result diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzDebug.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzDebug.kt index 5212dfc95..a1499383f 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzDebug.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzDebug.kt @@ -9,7 +9,7 @@ object LorenzDebug { println("debug logger: $text") } - fun writeAndLog(text: String) { + fun chatAndLog(text: String) { LorenzUtils.debug(text) log(text) } -- cgit