aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-08-15 13:11:14 +0200
committerLorenz <lo.scherf@gmail.com>2022-08-15 13:11:14 +0200
commit4bafa3e55ea80c25165bb94704a554b2f3cf4410 (patch)
treeec26df19487f34f435bba3536f48e405f06a741f /src/main/java/at
parente0f6fc1b4f0211a7bcdf42b5f579600889efd159 (diff)
downloadskyhanni-4bafa3e55ea80c25165bb94704a554b2f3cf4410.tar.gz
skyhanni-4bafa3e55ea80c25165bb94704a554b2f3cf4410.tar.bz2
skyhanni-4bafa3e55ea80c25165bb94704a554b2f3cf4410.zip
add support to hide boss name and option to only show shrt name
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Misc.java8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt23
-rw-r--r--src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt6
3 files changed, 29 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
index 5328ba1c1..2baf33fff 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
@@ -24,6 +24,14 @@ public class Misc {
public boolean damageIndicatorHealingMessage = false;
@Expose
+ @ConfigOption(
+ name = "Boss Name",
+ desc = "Change how the boss name should be displayed")
+ @ConfigEditorDropdown(values = {"Disabled", "Full Name", "Short Name"})
+ @ConfigAccordionId(id = 1)
+ public int damageIndicatorBossName = 0;
+
+ @Expose
@ConfigOption(name = "Pet Display", desc = "Show the currently active pet.")
@ConfigEditorBoolean
public boolean petDisplay = false;
diff --git a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt
index 85996919b..f63b7c6cf 100644
--- a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt
@@ -88,7 +88,13 @@ class BossDamageIndicator {
6f
)
- var bossName = data.bossType.bossName
+ var bossName = when (SkyHanniMod.feature.misc.damageIndicatorBossName) {
+ 0 -> ""
+ 1 -> data.bossType.fullName
+ 2 -> data.bossType.shortName
+ else -> data.bossType.fullName
+ }
+
if (data.namePrefix.isNotEmpty()) {
bossName = data.namePrefix + bossName
}
@@ -328,14 +334,21 @@ class BossDamageIndicator {
val healed = health - lastHealth
if (healed <= 0) return
- //Hide auto heal every 10 ticks
- if (healed == 15_000 && bossType == BossType.HUB_REVENANT_HORROR) return
+ //Hide auto heal every 10 ticks (with rounding errors)
+ if ((healed == 15_000 || healed == 15_001) && bossType == BossType.HUB_REVENANT_HORROR) return
val formatLastHealth = NumberUtil.format(lastHealth)
val formatHealth = NumberUtil.format(health)
val healedFormat = NumberUtil.format(healed)
- println(bossType.bossName + " §fhealed for $healed❤ ($lastHealth -> $health)")
- LorenzUtils.chat(bossType.bossName + " §ehealed for §a$healedFormat❤ §8(§e$formatLastHealth -> $formatHealth§8)")
+
+
+ val bossName = when (SkyHanniMod.feature.misc.damageIndicatorBossName) {
+ 2 -> bossType.shortName
+ else -> bossType.fullName
+ }
+
+ println(bossName + " §healed for $healed❤ ($lastHealth -> $health)")
+ LorenzUtils.chat("$bossName §ehealed for §a$healedFormat❤ §8(§e$formatLastHealth -> $formatHealth§8)")
}
private fun grabData(entity: EntityLivingBase): EntityData? {
diff --git a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt
index a913bbf4b..763bb3056 100644
--- a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt
+++ b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt
@@ -1,7 +1,7 @@
package at.hannibal2.skyhanni.damageindicator
-enum class BossType(val bossName: String) {
- DUNGEON("Generic Dungeon boss"),//TODO split in different bosses
+enum class BossType(val fullName: String, val shortName: String = fullName) {
+ DUNGEON("Generic Dungeon boss"),//TODO split into different bosses
NETHER_BLADESOUL("§8Bladesoul"),
NETHER_MAGMA_BOSS("§4Magma Boss"),
@@ -15,6 +15,6 @@ enum class BossType(val bossName: String) {
END_ENDERMAN_SLAYER("Voidgloom Seraph"),//TODO use seperate enums per tier
END_ENDER_DRAGON("Ender Dragon"),//TODO fix totally
- HUB_REVENANT_HORROR("§5Revenant Horror 5"),//TODO add other variants like voidgloom?
+ HUB_REVENANT_HORROR("§5Revenant Horror 5", "§5Rev 5"),//TODO add other variants like voidgloom?
HUB_HEADLESS_HORSEMAN("§6Headless Horseman"),
} \ No newline at end of file