diff options
author | HiZe_ <superhize@hotmail.com> | 2023-08-10 18:41:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-10 18:41:40 +0200 |
commit | 1064ed4a42b51a4270d29d2bb45e9aa7d8e7211f (patch) | |
tree | 2df9f6833930da38aafa4a98ef2d500def467064 /src/main/java/at/hannibal2/skyhanni/features/misc | |
parent | 56009ab8253ca356aa7c460c79c839abe7955075 (diff) | |
download | skyhanni-1064ed4a42b51a4270d29d2bb45e9aa7d8e7211f.tar.gz skyhanni-1064ed4a42b51a4270d29d2bb45e9aa7d8e7211f.tar.bz2 skyhanni-1064ed4a42b51a4270d29d2bb45e9aa7d8e7211f.zip |
Merge pull request #379
* removed unused function format3 in NumberUtil
* removed toInt and toBoolean in LorenzUtils
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/BestiaryData.kt | 17 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/ChestValue.kt | 6 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/BestiaryData.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/BestiaryData.kt index 626d24f03..76a46b320 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/BestiaryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/BestiaryData.kt @@ -5,12 +5,13 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.utils.* +import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore +import at.hannibal2.skyhanni.utils.LorenzColor +import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.LorenzUtils.addButton -import at.hannibal2.skyhanni.utils.LorenzUtils.toBoolean -import at.hannibal2.skyhanni.utils.LorenzUtils.toInt +import at.hannibal2.skyhanni.utils.NumberUtil import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNeeded @@ -320,17 +321,17 @@ object BestiaryData { newDisplay.addButton( prefix = "§7Number Type: ", - getName = NumberType.entries[config.replaceRoman.toInt()].type, + getName = NumberType.entries[if (config.replaceRoman) 1 else 0].type, onChange = { - config.replaceRoman = ((config.replaceRoman.toInt() + 1) % 2).toBoolean() + config.replaceRoman = !config.replaceRoman update() } ) newDisplay.addButton( prefix = "§7Hide Maxed: ", - getName = HideMaxed.entries[config.hideMaxed.toInt()].b, + getName = HideMaxed.entries[if (config.hideMaxed) 1 else 0].type, onChange = { - config.hideMaxed = ((config.hideMaxed.toInt() + 1) % 2).toBoolean() + config.hideMaxed = !config.hideMaxed update() } ) @@ -405,7 +406,7 @@ object BestiaryData { HIGHEST_NEEDED_TIER("Highest kills needed to next tier"), } - enum class HideMaxed(val b: String) { + enum class HideMaxed(val type: String) { NO("Show"), YES("Hide") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ChestValue.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ChestValue.kt index 37f1d7c6e..b0228642b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/ChestValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ChestValue.kt @@ -8,8 +8,6 @@ import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.LorenzUtils.addButton -import at.hannibal2.skyhanni.utils.LorenzUtils.toBoolean -import at.hannibal2.skyhanni.utils.LorenzUtils.toInt import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.RenderUtils.highlight @@ -155,9 +153,9 @@ class ChestValue { }) newDisplay.addButton("§7Display Type: ", - getName = DisplayType.entries[config.alignedDisplay.toInt()].type, + getName = DisplayType.entries[if (config.alignedDisplay) 1 else 0].type, onChange = { - config.alignedDisplay = ((config.alignedDisplay.toInt() + 1) % 2).toBoolean() + config.alignedDisplay = !config.alignedDisplay update() }) } |