From 03fadd15879bf262777536edc1e5110252115339 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 2 Dec 2023 19:12:35 +0100 Subject: Added option to only show tier 1 Minion Crafts in the Helper display when their items needed are fully collected. --- .../skyhanni/config/features/event/bingo/BingoConfig.java | 6 ++++++ .../java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoConfig.java index 816f8a194..24fdf9732 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/bingo/BingoConfig.java @@ -25,6 +25,12 @@ public class BingoConfig { @FeatureToggle public boolean minionCraftHelperEnabled = true; + @Expose + @ConfigOption(name = "Show Progress to T1", desc = "Show tier 1 Minion Crafts in the Helper display even if needed items are not fully collected.") + @ConfigEditorBoolean + @FeatureToggle + public boolean minionCraftHelperProgressFirst = false; + @Expose public Position minionCraftHelperPos = new Position(10, 10, false, true); } diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt index 62106622f..a2dc399d8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt @@ -225,11 +225,16 @@ class MinionCraftHelper { val have = otherItems.getOrDefault(itemId, 0) val percentage = have.toDouble() / needAmount val itemName = NEUItems.getItemStack(rawId).name ?: "§cName??§f" + val isTool = itemId.startsWith("WOOD_") if (percentage >= 1) { - val color = if (itemId.startsWith("WOOD_")) "§7" else "§a" + val color = if (isTool) "§7" else "§a" newDisplay.add(" $itemName§8: ${color}DONE") otherItems[itemId] = have - needAmount } else { + if (!config.minionCraftHelperProgressFirst && !isTool && minionId.endsWith("_0")) { + newDisplay.removeLast() + return + } val format = LorenzUtils.formatPercentage(percentage) val haveFormat = LorenzUtils.formatInteger(have) val needFormat = LorenzUtils.formatInteger(needAmount) -- cgit