From d1c02e2c71a81057c5ad0975e754c419728d9ebc Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 7 Feb 2023 22:47:47 +0100 Subject: Fixed Bingo display rules. --- .../at/hannibal2/skyhanni/config/features/Bingo.java | 3 --- .../skyhanni/features/bingo/BingoCardDisplay.kt | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java b/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java index 3395dfb8e..5701be9a1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java @@ -1,7 +1,6 @@ package at.hannibal2.skyhanni.config.features; import at.hannibal2.skyhanni.config.core.config.Position; -import at.hannibal2.skyhanni.config.core.config.annotations.ConfigAccordionId; import at.hannibal2.skyhanni.config.core.config.annotations.ConfigEditorBoolean; import at.hannibal2.skyhanni.config.core.config.annotations.ConfigEditorButton; import at.hannibal2.skyhanni.config.core.config.annotations.ConfigOption; @@ -18,12 +17,10 @@ public class Bingo { @Expose @ConfigOption(name = "Bingo Card", desc = "Show the bingo card.") @ConfigEditorBoolean - @ConfigAccordionId(id = 0) public boolean bingoCard = false; @Expose @ConfigOption(name = "Bingo Card Position", desc = "") @ConfigEditorButton(runnableId = "bingoCardPos", buttonText = "Edit") - @ConfigAccordionId(id = 0) public Position bingoCardPos = new Position(10, 10, false, true); } diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt index ad1e138a8..2666cab01 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt @@ -127,7 +127,7 @@ class BingoCardDisplay { } private var lastSneak = false - private var showHelp = false + private var displayMode = 0 @SubscribeEvent fun onRenderOverlay(event: RenderGameOverlayEvent.Post) { @@ -141,16 +141,19 @@ class BingoCardDisplay { if (lastSneak != sneaking) { lastSneak = sneaking if (sneaking) { - showHelp = !showHelp + displayMode++ + if (displayMode == 3) { + displayMode = 0 + } } } } - if (showHelp) { - SkyHanniMod.feature.bingo.bingoCardPos.renderStrings(BingoNextStepHelper.currentHelp) - } else { + if (displayMode == 0) { if (Minecraft.getMinecraft().currentScreen !is GuiChat) { - SkyHanniMod.feature.dev.debugPos.renderStrings(display) + SkyHanniMod.feature.bingo.bingoCardPos.renderStrings(display) } + } else if (displayMode == 1) { + SkyHanniMod.feature.bingo.bingoCardPos.renderStrings(BingoNextStepHelper.currentHelp) } } @@ -170,8 +173,7 @@ class BingoCardDisplay { for (goal in personalGoals) { println("goal: '" + goal.displayName + "'") } - personalGoals - .filter { it.displayName == name } + personalGoals.filter { it.displayName == name } .forEach { it.done = true update() -- cgit