aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-01 16:28:42 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-01 16:28:42 +0200
commit1b7c19047c08659010cf97869b1e2109910f029c (patch)
tree72defaac0066b9e4508f280e0e377247bdd515e9 /src/main/java/at/hannibal2/skyhanni/features
parent6ff32f911279eea29fbbb69e031e027a2c1a5d9c (diff)
downloadskyhanni-1b7c19047c08659010cf97869b1e2109910f029c.tar.gz
skyhanni-1b7c19047c08659010cf97869b1e2109910f029c.tar.bz2
skyhanni-1b7c19047c08659010cf97869b1e2109910f029c.zip
Reordered Bingo category in config. Added option to show/hide the border messages in before and after level up message in bingo compact chat. Added option to use compact chat in non bingo profiles as well
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt13
3 files changed, 16 insertions, 12 deletions
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 229c3fc69..1dc407bf1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt
@@ -27,7 +27,7 @@ class BingoCardDisplay {
private var tick = 0
private var display = listOf<String>()
- private val config get() = SkyHanniMod.feature.bingo
+ private val config get() = SkyHanniMod.feature.bingo.bingoCard
private val goalCompletePattern = "§6§lBINGO GOAL COMPLETE! §r§e(?<name>.*)".toPattern()
init {
@@ -54,7 +54,7 @@ class BingoCardDisplay {
@SubscribeEvent
fun onTick(event: TickEvent.ClientTickEvent) {
if (!LorenzUtils.isBingoProfile) return
- if (!config.cardDisplay) return
+ if (!config.enabled) return
if (event.phase != TickEvent.Phase.START) return
tick++
@@ -148,7 +148,7 @@ class BingoCardDisplay {
@SubscribeEvent
fun onRenderOverlay(event: GuiRenderEvent.GameOverlayRenderEvent) {
if (!LorenzUtils.isBingoProfile) return
- if (!config.cardDisplay) return
+ if (!config.enabled) return
val stack = Minecraft.getMinecraft().thePlayer.heldItem //TODO into ItemUtils or InventoryUtils
if (ItemUtils.isSkyBlockMenuItem(stack)) {
@@ -178,7 +178,7 @@ class BingoCardDisplay {
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
if (!LorenzUtils.isBingoProfile) return
- if (!config.cardDisplay) return
+ if (!config.enabled) return
goalCompletePattern.matchMatcher(event.message) {
val name = group("name")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
index 472fe1a81..e68566ab7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
@@ -17,6 +17,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
class BingoNextStepHelper {
+ private val config get() = SkyHanniMod.feature.bingo.bingoCard
private var tick = 0
private var dirty = true
@@ -107,7 +108,7 @@ class BingoNextStepHelper {
@SubscribeEvent
fun onTick(event: TickEvent.ClientTickEvent) {
if (!LorenzUtils.isBingoProfile) return
- if (!SkyHanniMod.feature.bingo.cardDisplay) return
+ if (!config.enabled) return
if (event.phase != TickEvent.Phase.START) return
tick++
@@ -125,7 +126,7 @@ class BingoNextStepHelper {
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
if (!LorenzUtils.isBingoProfile) return
- if (!SkyHanniMod.feature.bingo.cardDisplay) return
+ if (!config.enabled) return
for (currentStep in currentSteps) {
if (currentStep.displayName == "Obtain a Topaz Crystal") {
@@ -191,7 +192,7 @@ class BingoNextStepHelper {
done = true
updateResult()
if (!silent) {
- if (SkyHanniMod.feature.bingo.stepHelper) {
+ if (config.stepHelper) {
LorenzUtils.chat("§e[SkyHanni] A bingo goal step is done! ($displayName)")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt
index c0159a5e0..1af6e521e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt
@@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class CompactBingoChat {
+ private val config get() = SkyHanniMod.feature.bingo.compactChat
private var blockedSkillLevelUp = false
private var blockedSkyblockLevelUp = false
@@ -20,14 +21,16 @@ class CompactBingoChat {
@SubscribeEvent
fun onChatMessage(event: LorenzChatEvent) {
- if (!LorenzUtils.isBingoProfile) return
- if (!SkyHanniMod.feature.bingo.compactChatMessages) return
+ if (!config.enabled) return
+ if (!LorenzUtils.isBingoProfile && !config.outsideBingo) return
val message = event.message
if (message == "§3§l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬") {
blockedSkillLevelUp = false
blockedSkyblockLevelUp = false
- event.blockedReason = "compact_skill_or_skyblock_level_up"
+ if (config.hideBorder) {
+ event.blockedReason = "compact_skill_or_skyblock_level_up"
+ }
return
}
@@ -86,7 +89,7 @@ class CompactBingoChat {
return false
}
if (message == "§e§l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬") {
- blockedCollectionLevelUp = false
+ blockedCollectionLevelUp = config.hideBorder
return true
}
@@ -139,7 +142,7 @@ class CompactBingoChat {
return false
}
if (message == "§3§l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬") {
- blockedBestiarity = false
+ blockedBestiarity = config.hideBorder
return true
}