Skip to content

Commit

Permalink
Merge branch 'beta' into backend/specialcolor
Browse files Browse the repository at this point in the history
  • Loading branch information
j10a1n15 authored Nov 1, 2024
2 parents 9703649 + a6ba8b3 commit 80b4a90
Show file tree
Hide file tree
Showing 76 changed files with 728 additions and 398 deletions.
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ specifically compile 1.8.9 using `./gradlew :1.8.9:build`. This does not affect

`compile` enables compilation for the `:1.21` subproject. This means that a `build` or `assemble` task will try (and fail) to compile a
1.21 (as well as 1.8.9) JAR. This mode may be useful for someone seeking out issues to fix, but is generally not useful in day to day
operations since the compile will never succeed and will block things like hotswap compilations (via <kbd>CTRL+F9</kbd>) from completing.
operations since the compile task will never succeed and will block things like hotswap compilations (via <kbd>CTRL+F9</kbd>) from completing.

### Improving mappings

Expand Down Expand Up @@ -416,7 +416,7 @@ Let's look at the syntax of those `#if` expressions.

First of all, the `#else` block is optional. If you just want code on some versions (for example for adding a method call that is implicitly
done on newer versions, or simply because the corresponding code for newer versions has to be done in some other place), you can just omit
the `#else` section and you will simply not compile any code at that spot.
the `#else` section, and you will simply not compile any code at that spot.

There is also an `#elseif` in case you want to switch behaviour based on multiple version brackets. Again, while we don't actually target
1.12 or 1.16, making those versions compile will help other parts of the code to upgrade to 1.21 more cleanly and easily. So, making those
Expand All @@ -439,3 +439,8 @@ for the variable using `#if FORGE`.
Sadly, `#if` expressions cannot be applied globally (unlike name changes), so it is often very helpful to create a helper method and call
that method from various places in the codebase. This is generally already policy in SH for a lot of things. For more complex types that
change beyond just their name (for example different generics), a `typealias` can be used in combination with `#if` expressions.

These helper methods should generally be placed in the `at.hannibal2.skyhanni.utils.compat` package and should be named after what they are
compatability methods for. For example, `WorldClient.getAllEntities()` could be placed in `WorldCompat.kt`. This is not a strict rule, but
it is a good guideline to follow as for the most part we do not want to be doing large amount of preprocessing in the feature files
themselves.
17 changes: 16 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import kotlin.io.path.outputStream
plugins {
idea
java
id("com.github.johnrengelman.shadow") version "7.1.2"
id("com.gradleup.shadow") version "8.3.4"
id("gg.essential.loom")
id("dev.deftu.gradle.preprocess")
kotlin("jvm")
Expand Down Expand Up @@ -277,6 +277,21 @@ if (target == ProjectTarget.MAIN) {
}
}

fun includeBuildPaths(buildPathsFile: File, sourceSet: Provider<SourceSet>) {
if (buildPathsFile.exists()) {
sourceSet.get().apply {
val buildPaths = buildPathsFile.readText().lineSequence()
.map { it.substringBefore("#").trim() }
.filter { it.isNotBlank() }
.toSet()
kotlin.include(buildPaths)
java.include(buildPaths)
}
}
}
includeBuildPaths(file("buildpaths.txt"), sourceSets.main)
includeBuildPaths(file("buildpaths-test.txt"), sourceSets.test)

tasks.withType<KotlinCompile> {
compilerOptions.jvmTarget.set(JvmTarget.fromTarget(target.minecraftVersion.formattedJavaLanguageVersion))
}
Expand Down
5 changes: 5 additions & 0 deletions detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ FormattingRules:
CustomCommentSpacing:
active: true

UseRepoRules:
active: true
SkullTexturesUseRepo:
active: true

ImportRules:
active: true
CustomImportOrdering:
Expand Down
14 changes: 8 additions & 6 deletions detekt/src/main/kotlin/formatting/CustomCommentSpacing.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ class CustomCommentSpacing(config: Config) : Rule(config) {

override fun visitComment(comment: PsiComment) {
if (comment.text.containsPreprocessingPattern()) return

/**
* REGEX-TEST: // Test comment
* REGEX-TEST: /* Test comment */
*/
val commentRegex = Regex("""^(?:\/{2}|\/\*)(?:\s.*|$)""", RegexOption.DOT_MATCHES_ALL)
if (!commentRegex.matches(comment.text)) {
report(
CodeSmell(
Expand All @@ -40,4 +34,12 @@ class CustomCommentSpacing(config: Config) : Rule(config) {
// Fallback to super (ostensibly a no-check)
super.visitComment(comment)
}

companion object {
/**
* REGEX-TEST: // Test comment
* REGEX-TEST: /* Test comment */
*/
val commentRegex = Regex("""^(?:\/{2}|\/\*)(?:\s.*|$)""", RegexOption.DOT_MATCHES_ALL)
}
}
46 changes: 46 additions & 0 deletions detekt/src/main/kotlin/userepo/SkullTexturesUseRepo.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package at.hannibal2.skyhanni.detektrules.userepo

import io.gitlab.arturbosch.detekt.api.CodeSmell
import io.gitlab.arturbosch.detekt.api.Config
import io.gitlab.arturbosch.detekt.api.Debt
import io.gitlab.arturbosch.detekt.api.Entity
import io.gitlab.arturbosch.detekt.api.Issue
import io.gitlab.arturbosch.detekt.api.Rule
import io.gitlab.arturbosch.detekt.api.Severity
import org.jetbrains.kotlin.psi.KtStringTemplateExpression

/**
* This rule reports all instances of hard-coded skull textures in the codebase.
*/
class SkullTexturesUseRepo(config: Config) : Rule(config) {
override val issue = Issue(
"SkullTexturesUseRepo",
Severity.Style,
"Avoid hard-coding skull textures in strings. Use the SkullTextureHolder instead, and add the texture to Skulls.json in the repository.",
Debt.FIVE_MINS,
)

private val scannedTextureStarts = listOf(
"ewogICJ0aW1l",
"eyJ0ZXh0dXJl"
)

override fun visitStringTemplateExpression(expression: KtStringTemplateExpression) {
val text =
expression.text // Be aware .getText() returns the entire span of this template, including variable names contained within. This should be rare enough of a problem for us to not care about it.

for (textureStarters in scannedTextureStarts) {
if (text.startsWith(textureStarters)) {
report(
CodeSmell(
issue,
Entity.from(expression),
"Avoid hard-coding skull texture text in strings.",
),
)
}
}
super.visitStringTemplateExpression(expression)
}
}

20 changes: 20 additions & 0 deletions detekt/src/main/kotlin/userepo/UseRepoRuleSetProvider.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package at.hannibal2.skyhanni.detektrules.userepo

import com.google.auto.service.AutoService
import io.gitlab.arturbosch.detekt.api.Config
import io.gitlab.arturbosch.detekt.api.RuleSet
import io.gitlab.arturbosch.detekt.api.RuleSetProvider

@AutoService(RuleSetProvider::class)
class UseRepoRuleSetProvider : RuleSetProvider {
override val ruleSetId: String = "UseRepoRules"

override fun instance(config: Config): RuleSet {
return RuleSet(
ruleSetId,
listOf(
SkullTexturesUseRepo(config),
),
)
}
}
5 changes: 3 additions & 2 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
jdk:
- openjdk17

- openjdk21
install:
- ./gradlew publishToMavenLocal
1 change: 1 addition & 0 deletions pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!-- remove all unused parts
The title of your PR should be descriptive and concise. It should be in the format of `Type: Description`. For example, `Feature: Add new command` or `Fix: Bug in command`. If there are multiple types of changes these can be separated by a plus. For example, `Feature + Fix: Add new command and fix bug in command`.
Commonly used labels are Improvement, Backend, Feature and Fix.
## PR Reviews
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ public class DevConfig {
@ConfigEditorSlider(minValue = 1, maxValue = 30, minStep = 1)
public int logExpiryTime = 14;

@Expose
@ConfigOption(
name = "Chat History Length",
desc = "The number of messages to keep in memory for §e/shchathistory§7.\n" +
"§cExcessively large values may cause memory allocation issues."
)
@ConfigEditorSlider(minValue = 100, maxValue = 5000, minStep = 10)
public int chatHistoryLength = 100;

@Expose
@ConfigOption(name = "Slot Number", desc = "Show slot number in inventory while pressing this key.")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE)
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import java.lang.invoke.MethodHandles
@SkyHanniModule
object ChatManager {

private val config get() = SkyHanniMod.feature.dev

private val loggerAll = LorenzLogger("chat/all")
private val loggerFiltered = LorenzLogger("chat/blocked")
private val loggerAllowed = LorenzLogger("chat/allowed")
Expand All @@ -41,7 +43,7 @@ object ChatManager {
override fun removeEldestEntry(
eldest: MutableMap.MutableEntry<IdentityCharacteristics<IChatComponent>, MessageFilteringResult>?,
): Boolean {
return size > 100
return size > config.chatHistoryLength.coerceAtLeast(0)
}
}

Expand Down
1 change: 1 addition & 0 deletions src/main/java/at/hannibal2/skyhanni/data/ElectionAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ object ElectionAPI {

val currentMayorName = data.mayor.name
if (lastMayor?.name != currentMayorName) {
Perk.resetPerks()
currentMayor = setAssumeMayorJson(currentMayorName, data.mayor.perks)
currentMinister = data.mayor.minister?.let { setAssumeMayorJson(it.name, listOf(it.perk)) }
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/at/hannibal2/skyhanni/data/MayorData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ enum class Perk(val perkName: String) {
override fun toString(): String = "$perkName: $description"

companion object {
fun resetPerks() = entries.forEach { it.isActive = false }

fun getPerkFromName(name: String): Perk? = entries.firstOrNull { it.perkName == name }

fun MayorPerk.toPerk(): Perk? = getPerkFromName(this.renameIfFoxyExtraEventPerkFound())?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ data class BingoData(
@Expose val difficulty: String,
@Expose val note: List<String>,
@Expose val guide: List<String>,
@Expose val found: String,
@Expose val found: String?,
)
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ object IslandExceptions {
.firstOrNull {
it != null &&
it.distanceTo(baseEntity) < 4.0 &&
it.inventory?.get(4)?.getSkullTexture() == MobFilter.RAT_SKULL
it.inventory?.get(4)?.getSkullTexture() == MobFilter.RAT_SKULL_TEXTURE
}?.let {
MobData.MobResult.found(Mob(baseEntity, mobType = Mob.Type.BASIC, armorStand = it, name = "Rat"))
} ?: if (nextEntity is EntityZombie) MobData.MobResult.notYetFound else null
Expand Down
30 changes: 10 additions & 20 deletions src/main/java/at/hannibal2/skyhanni/data/mob/MobFilter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import at.hannibal2.skyhanni.utils.MobUtils
import at.hannibal2.skyhanni.utils.MobUtils.isDefaultValue
import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher
import at.hannibal2.skyhanni.utils.RegexUtils.matches
import at.hannibal2.skyhanni.utils.SkullTextureHolder
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraft.client.entity.EntityOtherPlayerMP
import net.minecraft.entity.Entity
Expand Down Expand Up @@ -120,22 +121,11 @@ object MobFilter {
"^§8\\[§7Lv\\d+§8] §.(?<name>Horse|Armadillo|Skeleton Horse|Pig|Rat)$",
)

// TODO: Move all of these to repo
@Suppress("MaxLineLength")
internal const val RAT_SKULL =
"ewogICJ0aW1lc3RhbXAiIDogMTYxODQxOTcwMTc1MywKICAicHJvZmlsZUlkIiA6ICI3MzgyZGRmYmU0ODU0NTVjODI1ZjkwMGY4OGZkMzJmOCIsCiAgInByb2ZpbGVOYW1lIiA6ICJCdUlJZXQiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYThhYmI0NzFkYjBhYjc4NzAzMDExOTc5ZGM4YjQwNzk4YTk0MWYzYTRkZWMzZWM2MWNiZWVjMmFmOGNmZmU4IiwKICAgICAgIm1ldGFkYXRhIiA6IHsKICAgICAgICAibW9kZWwiIDogInNsaW0iCiAgICAgIH0KICAgIH0KICB9Cn0="
@Suppress("MaxLineLength")
private const val HELLWISP_TENTACLE_SKULL =
"ewogICJ0aW1lc3RhbXAiIDogMTY0OTM4MzAyMTQxNiwKICAicHJvZmlsZUlkIiA6ICIzYjgwOTg1YWU4ODY0ZWZlYjA3ODg2MmZkOTRhMTVkOSIsCiAgInByb2ZpbGVOYW1lIiA6ICJLaWVyYW5fVmF4aWxpYW4iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDI3MDQ2Mzg0OTM2MzhiODVjMzhkZDYzZmZkYmUyMjJmZTUzY2ZkNmE1MDk3NzI4NzU2MTE5MzdhZTViNWUyMiIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9CiAgfQp9"
@Suppress("MaxLineLength")
private const val RIFT_EYE_SKULL1 =
"ewogICJ0aW1lc3RhbXAiIDogMTY0ODA5MTkzNTcyMiwKICAicHJvZmlsZUlkIiA6ICJhNzdkNmQ2YmFjOWE0NzY3YTFhNzU1NjYxOTllYmY5MiIsCiAgInByb2ZpbGVOYW1lIiA6ICIwOEJFRDUiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjI2YmRlNDUwNDljN2I3ZDM0NjA1ZDgwNmEwNjgyOWI2Zjk1NWI4NTZhNTk5MWZkMzNlN2VhYmNlNDRjMDgzNCIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9CiAgfQp9"
@Suppress("MaxLineLength")
private const val RIFT_EYE_SKULL2 =
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTdkYjE5MjNkMDNjNGVmNGU5ZjZlODcyYzVhNmFkMjU3OGIxYWZmMmIyODFmYmMzZmZhNzQ2NmM4MjVmYjkifX19"
@Suppress("MaxLineLength")
internal const val NPC_TURD_SKULL =
"ewogICJ0aW1lc3RhbXAiIDogMTYzOTUxMjYxNzc5MywKICAicHJvZmlsZUlkIiA6ICIwZjczMDA3NjEyNGU0NGM3YWYxMTE1NDY5YzQ5OTY3OSIsCiAgInByb2ZpbGVOYW1lIiA6ICJPcmVfTWluZXIxMjMiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjM2MzBkOWIwMjA4OGVhMTkyNGE4NzIyNDJhYmM3NWI2MjYyYzJhY2E5MmFlY2Y4NzE0YTU3YTQxZWVhMGI5ZCIKICAgIH0KICB9Cn0="
internal val RAT_SKULL_TEXTURE by lazy { SkullTextureHolder.getTexture("MOB_RAT") }
private val HELLWISP_TENTACLE_SKULL_TEXTURE by lazy { SkullTextureHolder.getTexture("HELLWISP_TENTACLE") }
private val RIFT_EYE_SKULL1_TEXTURE by lazy { SkullTextureHolder.getTexture("RIFT_EYE_1") }
private val RIFT_EYE_SKULL2_TEXTURE by lazy { SkullTextureHolder.getTexture("RIFT_EYE_2") }
internal val NPC_TURD_SKULL by lazy { SkullTextureHolder.getTexture("NPC_TURD") }

const val MINION_MOB_PREFIX = "Minion Mob "

Expand Down Expand Up @@ -349,12 +339,12 @@ object MobFilter {
when {
illegalEntitiesPattern.matches(armorStand.name) -> return MobResult.illegal
baseEntity.riddenByEntity is EntityPlayer && MobUtils.getArmorStand(baseEntity, 2)?.inventory?.get(4)
?.getSkullTexture() == RAT_SKULL -> return MobResult.illegal // Rat Morph
?.getSkullTexture() == RAT_SKULL_TEXTURE -> return MobResult.illegal // Rat Morph
}
when (armorStand.inventory?.get(4)?.getSkullTexture()) {
HELLWISP_TENTACLE_SKULL -> return MobResult.illegal // Hellwisp Tentacle
RIFT_EYE_SKULL1 -> return MobResult.found(MobFactories.special(baseEntity, "Rift Teleport Eye", armorStand))
RIFT_EYE_SKULL2 -> return MobResult.found(MobFactories.special(baseEntity, "Rift Teleport Eye", armorStand))
HELLWISP_TENTACLE_SKULL_TEXTURE -> return MobResult.illegal // Hellwisp Tentacle
RIFT_EYE_SKULL1_TEXTURE -> return MobResult.found(MobFactories.special(baseEntity, "Rift Teleport Eye", armorStand))
RIFT_EYE_SKULL2_TEXTURE -> return MobResult.found(MobFactories.special(baseEntity, "Rift Teleport Eye", armorStand))
}
return null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import at.hannibal2.skyhanni.api.event.SkyHanniEvent

// Detect area changes by looking at the scoreboard.
class ScoreboardAreaChangeEvent(val area: String, val previousArea: String?) : SkyHanniEvent()
class GraphAreaChangeEvent(val area: String, val previousArea: String?) : SkyHanniEvent()
class GraphAreaChangeEvent(val area: String, val previousArea: String?, val onlyInternal: Boolean) : SkyHanniEvent()
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ object BingoCardTips {
for (line in bingoTip.guide) {
toolTip.add(index++, " $line")
}
toolTip.add(index++, "§7Found by: §e${bingoTip.found}")
bingoTip.found?.let {
toolTip.add(index++, "§7Found by: §e$it")
}
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ object ChatFilter {
private val annoyingSpamPatterns = listOf(
"§7Your Implosion hit (.*) for §r§c(.*) §r§7damage.".toPattern(),
"§7Your Molten Wave hit (.*) for §r§c(.*) §r§7damage.".toPattern(),
"§7Your Spirit Sceptre hit (.*) for §r§c(.*) §r§7damage.".toPattern(),
"§cYou need a tool with a §r§aBreaking Power §r§cof §r§6(\\d)§r§c to mine (.*)§r§c! Speak to §r§dFragilis §r§cby the entrance to the Crystal Hollows to learn more!".toPattern(),
)
private val annoyingSpamMessages = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
import at.hannibal2.skyhanni.utils.RenderUtils.drawSphereInWorld
import at.hannibal2.skyhanni.utils.RenderUtils.drawSphereWireframeInWorld
import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables
import at.hannibal2.skyhanni.utils.SkullTextureHolder
import at.hannibal2.skyhanni.utils.SoundUtils
import at.hannibal2.skyhanni.utils.TimeUtils.format
import at.hannibal2.skyhanni.utils.TimeUtils.ticks
Expand Down Expand Up @@ -50,16 +51,13 @@ object FlareDisplay {

private val MAX_FLARE_TIME = 3.minutes

// TODO: Move to repo
@Suppress("MaxLineLength")
private val flareSkins = mapOf(
"ewogICJ0aW1lc3RhbXAiIDogMTY0NjY4NzMwNjIyMywKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjJlMmJmNmMxZWMzMzAyNDc5MjdiYTYzNDc5ZTU4NzJhYzY2YjA2OTAzYzg2YzgyYjUyZGFjOWYxYzk3MTQ1OCIKICAgIH0KICB9Cn0="
to FlareType.WARNING,
"ewogICJ0aW1lc3RhbXAiIDogMTY0NjY4NzMyNjQzMiwKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWQyYmY5ODY0NzIwZDg3ZmQwNmI4NGVmYTgwYjc5NWM0OGVkNTM5YjE2NTIzYzNiMWYxOTkwYjQwYzAwM2Y2YiIKICAgIH0KICB9Cn0="
to FlareType.ALERT,
"ewogICJ0aW1lc3RhbXAiIDogMTY0NjY4NzM0NzQ4OSwKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzAwNjJjYzk4ZWJkYTcyYTZhNGI4OTc4M2FkY2VmMjgxNWI0ODNhMDFkNzNlYTg3YjNkZjc2MDcyYTg5ZDEzYiIKICAgIH0KICB9Cn0="
to FlareType.SOS,
)
private val flareSkins by lazy {
mapOf(
SkullTextureHolder.getTexture("FLARE_WARNING") to FlareType.WARNING,
SkullTextureHolder.getTexture("FLARE_ALERT") to FlareType.ALERT,
SkullTextureHolder.getTexture("FLARE_SOS") to FlareType.SOS,
)
}

@SubscribeEvent
fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import at.hannibal2.skyhanni.utils.RegexUtils.groupOrNull
import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst
import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher
import at.hannibal2.skyhanni.utils.RegexUtils.matches
import at.hannibal2.skyhanni.utils.SkullTextureHolder
import at.hannibal2.skyhanni.utils.StringUtils.firstLetterUppercase
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.TabListData
Expand Down Expand Up @@ -63,10 +64,7 @@ object DungeonAPI {
val bossStorage: MutableMap<DungeonFloor, Int>? get() = ProfileStorageData.profileSpecific?.dungeons?.bosses

private val patternGroup = RepoPattern.group("dungeon")
// TODO: Move to repo
@Suppress("MaxLineLength")
private const val WITHER_ESSENCE_TEXTURE =
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzRkYjRhZGZhOWJmNDhmZjVkNDE3MDdhZTM0ZWE3OGJkMjM3MTY1OWZjZDhjZDg5MzQ3NDlhZjRjY2U5YiJ9fX0="
private val WITHER_ESSENCE_TEXTURE by lazy { SkullTextureHolder.getTexture("WITHER_ESSENCE") }

/**
* REGEX-TEST: Time Elapsed: §a01m 17s
Expand Down
Loading

0 comments on commit 80b4a90

Please sign in to comment.