From e76941dd2a9569bd02429a73da23483cf8affc44 Mon Sep 17 00:00:00 2001 From: Zachary Jaser <76439587+Zickles@users.noreply.github.com> Date: Sun, 3 Mar 2024 16:37:26 -0500 Subject: refactor melody quick restart (#1096) --- .../hannibal2/skyhanni/features/inventory/HarpFeatures.kt | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt index a9a5f6e7b..338a873fc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt @@ -104,16 +104,11 @@ object HarpFeatures { @SubscribeEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { if (!LorenzUtils.inSkyBlock) return - if (!config.guiScale) return - when { - isMenuGui(event.inventoryName) -> { - setGUIScale() - openTime = SimpleTimeMark.now() - } - - isHarpGui(event.inventoryName) -> { - setGUIScale() - } + if (config.quickRestart && isMenuGui(event.inventoryName)) { + openTime = SimpleTimeMark.now() + } + if (config.guiScale && (isMenuGui(event.inventoryName) || isHarpGui(event.inventoryName))) { + setGUIScale() } } -- cgit