summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt14
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/DungeonBlockClickEvent.kt (renamed from src/main/java/at/hannibal2/skyhanni/events/DungeonClickedBlockEvent.kt)0
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt14
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt24
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/MovableHotBar.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt66
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/UnknownLinesHandler.kt234
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/SuperpairExperimentInformationDisplay.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/SuperpairsClicksAlert.kt11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt15
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigOptionGui.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/ModifyVisualWords.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ItemNameResolver.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/json/ItemStackTypeAdapterFactory.kt (renamed from src/main/java/at/hannibal2/skyhanni/utils/json/ItemStackTypeAdapter.kt)0
35 files changed, 246 insertions, 224 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
index da4b54942..b00fc7a8f 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
@@ -66,7 +66,8 @@ class ConfigManager {
private fun setConfigHolder(type: ConfigFileType, value: Any) {
require(value.javaClass == type.clazz)
- @Suppress("UNCHECKED_CAST") (type.property as KMutableProperty0<Any>).set(value)
+ @Suppress("UNCHECKED_CAST")
+ (type.property as KMutableProperty0<Any>).set(value)
(jsonHolder as MutableMap<ConfigFileType, Any>)[type] = value
}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
index 9f2e3cc3f..4974c80f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -186,6 +186,7 @@ object Commands {
registerCommand("shnavigate", "Using path finder to go to locatons") { NavigationHelper.onCommand(it) }
}
+ @Suppress("LongMethod")
private fun usersNormal() {
registerCommand(
"shmarkplayer",
@@ -502,6 +503,7 @@ object Commands {
) { ScoreboardData.toggleMonitor() }
}
+ @Suppress("LongMethod")
private fun developersCodingHelp() {
registerCommand("shrepopatterns", "See where regexes are loaded from") { RepoPatternGui.open() }
registerCommand("shtest", "Unused test command.") { SkyHanniDebugsAndTests.testCommand(it) }
diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt
index 9b7ba2cfd..a763961f8 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt
@@ -302,13 +302,13 @@ object MobDetection {
val entity = retry.entity
if (retry.times == MAX_RETRIES) {
MobData.logger.log(
- "`${retry.entity.name}`${retry.entity.entityId} missed {\n "
- + "is already Found: ${MobData.entityToMob[retry.entity] != null})."
- + "\n Position: ${retry.entity.getLorenzVec()}\n "
- + "DistanceC: ${
- entity.getLorenzVec().distanceChebyshevIgnoreY(LocationUtils.playerLocation())
- }\n"
- + "Relative Position: ${entity.getLorenzVec() - LocationUtils.playerLocation()}\n " +
+ "`${retry.entity.name}`${retry.entity.entityId} missed {\n " +
+ "is already Found: ${MobData.entityToMob[retry.entity] != null})." +
+ "\n Position: ${retry.entity.getLorenzVec()}\n " +
+ "DistanceC: ${
+ entity.getLorenzVec().distanceChebyshevIgnoreY(LocationUtils.playerLocation())
+ }\n" +
+ "Relative Position: ${entity.getLorenzVec() - LocationUtils.playerLocation()}\n " +
"}",
)
// Uncomment this to make it closed a loop
diff --git a/src/main/java/at/hannibal2/skyhanni/events/DungeonClickedBlockEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/DungeonBlockClickEvent.kt
index 9a7f5119a..9a7f5119a 100644
--- a/src/main/java/at/hannibal2/skyhanni/events/DungeonClickedBlockEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/events/DungeonBlockClickEvent.kt
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
index d058ddc50..4d9af4c9d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
@@ -519,6 +519,7 @@ object ChatFilter {
* @param message The message to check
* @return The reason why the message was blocked, empty if not blocked
*/
+ @Suppress("CyclomaticComplexMethod")
private fun block(message: String): String? = when {
config.hypixelHub && message.isPresent("lobby") -> "lobby"
config.empty && StringUtils.isEmpty(message) -> "empty"
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt
index 698a67114..25c1c04cb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt
@@ -252,6 +252,7 @@ object PowderMiningChatFilter {
"§r§[fa9][❤❈☘⸕✎✧] (?<tier>Rough|Flawed|Fine|Flawless) (?<gem>Ruby|Amethyst|Jade|Amber|Sapphire|Topaz) Gemstone( §r§8x(?<amount>[\\d,]+))?",
)
+ @Suppress("CyclomaticComplexMethod")
fun block(message: String): String? {
// Generic "you uncovered a chest" message
if (uncoverChestPattern.matches(message)) return "powder_mining_chest"
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt
index 957f1ecd0..3b2b93680 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt
@@ -441,8 +441,8 @@ object BestiaryData {
return true
} else if (name == "Search Results") {
val loreList = stack.getLore()
- if (loreList.size >= 2 && loreList[0].startsWith("§7Query: §a")
- && loreList[1].startsWith("§7Results: §a")
+ if (loreList.size >= 2 && loreList[0].startsWith("§7Query: §a") &&
+ loreList[1].startsWith("§7Results: §a")
) {
return true
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
index 0391e40a3..4f0dad4b8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
@@ -67,6 +67,8 @@ import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds
@SkyHanniModule
+// TODO cut class into smaller pieces
+@Suppress("LargeClass")
object DamageIndicatorManager {
private var mobFinder: MobFinder? = null
@@ -75,7 +77,6 @@ object DamageIndicatorManager {
private val enderSlayerHitsNumberPattern = ".* §[5fd]§l(?<hits>\\d+) Hits?".toPattern()
-
private var data = mapOf<UUID, EntityData>()
private val damagePattern = "[✧✯]?(\\d+[⚔+✧❤♞☄✷ﬗ✯]*)".toPattern()
@@ -288,7 +289,7 @@ object DamageIndicatorManager {
BossType.SLAYER_BLAZE_QUAZII_3,
BossType.SLAYER_BLAZE_QUAZII_4,
- // TODO f3/m3 4 guardians, f2/m2 4 boss room fighters
+ // TODO f3/m3 4 guardians, f2/m2 4 boss room fighters
-> true
else -> false
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt
index 975e3b4f8..399040179 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt
@@ -88,11 +88,11 @@ class MobFinder {
else -> {
when (entity) {
/*
- * Note that the order does matter here.
- * For example, if you put EntityZombie before EntityPigZombie,
- * EntityPigZombie will never be reached because EntityPigZombie extends EntityZombie.
- * Please take this into consideration if you are to modify this.
- */
+ * Note that the order does matter here.
+ * For example, if you put EntityZombie before EntityPigZombie,
+ * EntityPigZombie will never be reached because EntityPigZombie extends EntityZombie.
+ * Please take this into consideration if you are to modify this.
+ */
is EntityOtherPlayerMP -> tryAddEntityOtherPlayerMP(entity)
is EntityIronGolem -> tryAddEntityIronGolem(entity)
is EntityPigZombie -> tryAddEntityPigZombie(entity)
@@ -392,8 +392,8 @@ class MobFinder {
}
private fun tryAddEntityMagmaCube(entity: EntityLivingBase) = when {
- entity.hasNameTagWith(15, "§e﴾ §8[§7Lv500§8] §l§4§lMagma Boss§r ")
- && entity.hasMaxHealth(200_000_000, true) -> {
+ entity.hasNameTagWith(15, "§e﴾ §8[§7Lv500§8] §l§4§lMagma Boss§r ") &&
+ entity.hasMaxHealth(200_000_000, true) -> {
EntityResult(bossType = BossType.NETHER_MAGMA_BOSS, ignoreBlocks = true)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
index eca75bc70..308a5b144 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
@@ -99,11 +99,11 @@ object DungeonCleanEnd {
if (entity == Minecraft.getMinecraft().thePlayer) return
- if (config.F3IgnoreGuardians
- && DungeonAPI.isOneOf("F3", "M3")
- && entity is EntityGuardian
- && entity.entityId != lastBossId
- && Minecraft.getMinecraft().thePlayer.isSneaking
+ if (config.F3IgnoreGuardians &&
+ DungeonAPI.isOneOf("F3", "M3") &&
+ entity is EntityGuardian &&
+ entity.entityId != lastBossId &&
+ Minecraft.getMinecraft().thePlayer.isSneaking
) {
return
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt
index 2df035702..6831f1440 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt
@@ -106,7 +106,7 @@ object EasterEggWaypoints {
'Easter Eggs: §a0/§a30'
' '
'§ewww.hypixel.net'
- */
+ */
private fun checkScoreboardEasterSpecific(): Boolean {
val a = ScoreboardData.sidebarLinesFormatted.any { it.contains("Hypixel Level") }
val b = ScoreboardData.sidebarLinesFormatted.any { it.contains("Easter") }
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt
index 7068ef8aa..f97bd56c9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt
@@ -91,8 +91,8 @@ object TrophyFishMessages {
}
private fun shouldBlockTrophyFish(rarity: TrophyRarity, amount: Int) =
- config.bronzeHider && rarity == TrophyRarity.BRONZE && amount != 1
- || config.silverHider && rarity == TrophyRarity.SILVER && amount != 1
+ config.bronzeHider && rarity == TrophyRarity.BRONZE && amount != 1 ||
+ config.silverHider && rarity == TrophyRarity.SILVER && amount != 1
@SubscribeEvent
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
index fa45e579d..6faa7746a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
@@ -564,18 +564,24 @@ object ComposterOverlay {
}
}
+ private val blockedItems = listOf(
+ "POTION_AFFINITY_TALISMAN",
+ "CROPIE_TALISMAN",
+ "SPEED_TALISMAN",
+ "SIMPLE_CARROT_CANDY",
+ )
+
+ private fun isBlockedArmor(internalName: String): Boolean {
+ return internalName.endsWith("_BOOTS") ||
+ internalName.endsWith("_HELMET") ||
+ internalName.endsWith("_CHESTPLATE") ||
+ internalName.endsWith("_LEGGINGS")
+ }
+
private fun updateOrganicMatterFactors(baseValues: Map<NEUInternalName, Double>): Map<NEUInternalName, Double> {
val map = mutableMapOf<NEUInternalName, Double>()
for ((internalName, _) in NEUItems.allNeuRepoItems()) {
- if (internalName == "POTION_AFFINITY_TALISMAN"
- || internalName == "CROPIE_TALISMAN"
- || internalName.endsWith("_BOOTS")
- || internalName.endsWith("_HELMET")
- || internalName.endsWith("_CHESTPLATE")
- || internalName.endsWith("_LEGGINGS")
- || internalName == "SPEED_TALISMAN"
- || internalName == "SIMPLE_CARROT_CANDY"
- ) continue
+ if (blockedItems.contains(internalName) || isBlockedArmor(internalName)) continue
var (newId, amount) = NEUItems.getPrimitiveMultiplier(internalName.asInternalName())
if (amount <= 9) continue
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
index b05acf959..00e994f7d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
@@ -21,8 +21,9 @@ class OverviewPage(sizeX: Int, sizeY: Int, paddingX: Int = 15, paddingY: Int = 7
update(content, footer)
}
- // TODO split up this 240 lines function
- fun getPage(): Pair<List<List<Renderable>>, List<Renderable>> {
+ // TODO split up this 240 lines function - remove suppression when done
+ @Suppress("CyclomaticComplexMethod", "LongMethod")
+ private fun getPage(): Pair<List<List<Renderable>>, List<Renderable>> {
val content = mutableListOf<MutableList<Renderable>>()
val footer = mutableListOf<Renderable>()
val timeUntilCakes = FFStats.cakeExpireTime.timeUntil().format(TimeUnit.HOUR, maxUnits = 1)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt
index 8a8c11165..a413f295a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt
@@ -62,8 +62,8 @@ object HighlightVisitorsOutsideOfGarden {
val possibleJsons = visitorJson[mode] ?: return false
val skinOrType = getSkinOrTypeFor(entity)
return possibleJsons.any {
- (it.position == null || it.position.distance(entity.position.toLorenzVec()) < 1)
- && it.skinOrType == skinOrType
+ (it.position == null || it.position.distance(entity.position.toLorenzVec()) < 1) &&
+ it.skinOrType == skinOrType
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/MovableHotBar.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/MovableHotBar.kt
index cf49749b2..bee90a696 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/MovableHotBar.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/MovableHotBar.kt
@@ -39,6 +39,6 @@ object MovableHotBar {
}
fun isEnabled(): Boolean =
- (LorenzUtils.inSkyBlock || (Minecraft.getMinecraft().thePlayer != null && config.showOutsideSkyblock))
- && config.editable
+ (LorenzUtils.inSkyBlock || (Minecraft.getMinecraft().thePlayer != null && config.showOutsideSkyblock)) &&
+ config.editable
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
index 7636d43eb..0289a3c81 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
@@ -491,8 +491,8 @@ private fun getHeatDisplayPair(): List<ScoreboardElementType> {
)
}
-private fun getHeatShowWhen() = inAnyIsland(IslandType.CRYSTAL_HOLLOWS)
- && CustomScoreboard.activeLines.any { ScoreboardPattern.heatPattern.matches(it) }
+private fun getHeatShowWhen() = inAnyIsland(IslandType.CRYSTAL_HOLLOWS) &&
+ CustomScoreboard.activeLines.any { ScoreboardPattern.heatPattern.matches(it) }
private fun getColdDisplayPair(): List<ScoreboardElementType> {
val cold = -MiningAPI.cold
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt
index 9f3c009e5..3b3b6448b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt
@@ -372,9 +372,9 @@ private fun getWinterLines() = buildList {
}
private fun getWinterShowWhen(): Boolean = getSbLines().any {
- ScoreboardPattern.winterEventStartPattern.matches(it)
- || (ScoreboardPattern.winterNextWavePattern.matches(it) && !it.endsWith("Soon!"))
- || ScoreboardPattern.winterWavePattern.matches(it)
+ ScoreboardPattern.winterEventStartPattern.matches(it) ||
+ (ScoreboardPattern.winterNextWavePattern.matches(it) && !it.endsWith("Soon!")) ||
+ ScoreboardPattern.winterWavePattern.matches(it)
}
private fun getNewYearLines() = listOf(getSbLines().first { SbPattern.newYearPattern.matches(it) })
@@ -444,8 +444,8 @@ private fun getBroodmotherLines(): List<String> =
private fun getMiningEventsLines() = buildList {
// Wind
- if (getSbLines().any { SbPattern.windCompassPattern.matches(it) }
- && getSbLines().any { SbPattern.windCompassArrowPattern.matches(it) }) {
+ if (getSbLines().any { SbPattern.windCompassPattern.matches(it) } &&
+ getSbLines().any { SbPattern.windCompassArrowPattern.matches(it) }) {
add(getSbLines().first { SbPattern.windCompassPattern.matches(it) })
add("| ${getSbLines().first { SbPattern.windCompassArrowPattern.matches(it) }} §f|")
}
@@ -457,15 +457,15 @@ private fun getMiningEventsLines() = buildList {
}
// Zone Events
- if (getSbLines().any { SbPattern.miningEventPattern.matches(it) }
- && getSbLines().any { SbPattern.miningEventZonePattern.matches(it) }) {
+ if (getSbLines().any { SbPattern.miningEventPattern.matches(it) } &&
+ getSbLines().any { SbPattern.miningEventZonePattern.matches(it) }) {
add(getSbLines().first { SbPattern.miningEventPattern.matches(it) }.removePrefix("Event: "))
add("in ${getSbLines().first { SbPattern.miningEventZonePattern.matches(it) }.removePrefix("Zone: ")}")
}
// Zone Events but no Zone Line
- if (getSbLines().any { SbPattern.miningEventPattern.matches(it) }
- && getSbLines().none { SbPattern.miningEventZonePattern.matches(it) }) {
+ if (getSbLines().any { SbPattern.miningEventPattern.matches(it) } &&
+ getSbLines().none { SbPattern.miningEventZonePattern.matches(it) }) {
add(
getSbLines().first { SbPattern.miningEventPattern.matches(it) }
.removePrefix("Event: "),
@@ -473,22 +473,22 @@ private fun getMiningEventsLines() = buildList {
}
// Mithril Gourmand
- if (getSbLines().any { SbPattern.mithrilRemainingPattern.matches(it) }
- && getSbLines().any { SbPattern.mithrilYourMithrilPattern.matches(it) }) {
+ if (getSbLines().any { SbPattern.mithrilRemainingPattern.matches(it) } &&
+ getSbLines().any { SbPattern.mithrilYourMithrilPattern.matches(it) }) {
add(getSbLines().first { SbPattern.mithrilRemainingPattern.matches(it) })
add(getSbLines().first { SbPattern.mithrilYourMithrilPattern.matches(it) })
}
// Raffle
- if (getSbLines().any { SbPattern.raffleTicketsPattern.matches(it) }
- && getSbLines().any { SbPattern.rafflePoolPattern.matches(it) }) {
+ if (getSbLines().any { SbPattern.raffleTicketsPattern.matches(it) } &&
+ getSbLines().any { SbPattern.rafflePoolPattern.matches(it) }) {
add(getSbLines().first { SbPattern.raffleTicketsPattern.matches(it) })
add(getSbLines().first { SbPattern.rafflePoolPattern.matches(it) })
}
// Raid
- if (getSbLines().any { SbPattern.yourGoblinKillsPattern.matches(it) }
- && getSbLines().any { SbPattern.remainingGoblinPattern.matches(it) }) {
+ if (getSbLines().any { SbPattern.yourGoblinKillsPattern.matches(it) } &&
+ getSbLines().any { SbPattern.remainingGoblinPattern.matches(it) }) {
add(getSbLines().first { SbPattern.yourGoblinKillsPattern.matches(it) })
add(getSbLines().first { SbPattern.remainingGoblinPattern.matches(it) })
}
@@ -509,17 +509,17 @@ private fun getDamageLines(): List<String> =
(getSbLines().first { SbPattern.bossDamagePattern.matches(it) })
private fun getDamageShowWhen(): Boolean =
- getSbLines().any { SbPattern.bossHPPattern.matches(it) }
- && getSbLines().any { SbPattern.bossDamagePattern.matches(it) }
+ getSbLines().any { SbPattern.bossHPPattern.matches(it) } &&
+ getSbLines().any { SbPattern.bossDamagePattern.matches(it) }
private fun getMagmaBossLines() = getSbLines().filter { line ->
- SbPattern.magmaBossPattern.matches(line)
- || SbPattern.damageSoakedPattern.matches(line)
- || SbPattern.killMagmasPattern.matches(line)
- || SbPattern.killMagmasDamagedSoakedBarPattern.matches(line)
- || SbPattern.reformingPattern.matches(line)
- || SbPattern.bossHealthPattern.matches(line)
- || SbPattern.bossHealthBarPattern.matches(line)
+ SbPattern.magmaBossPattern.matches(line) ||
+ SbPattern.damageSoakedPattern.matches(line) ||
+ SbPattern.killMagmasPattern.matches(line) ||
+ SbPattern.killMagmasDamagedSoakedBarPattern.matches(line) ||
+ SbPattern.reformingPattern.matches(line) ||
+ SbPattern.bossHealthPattern.matches(line) ||
+ SbPattern.bossHealthBarPattern.matches(line)
}
private fun get