aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java60
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Misc.java30
-rw-r--r--src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt32
-rw-r--r--src/main/java/at/hannibal2/skyhanni/items/ItemDisplayOverlayFeatures.kt30
5 files changed, 83 insertions, 70 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java b/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java
index d234145aa..a85172d46 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java
@@ -1,11 +1,13 @@
package at.hannibal2.skyhanni.config.features;
-import at.hannibal2.skyhanni.config.gui.core.config.annotations.ConfigAccordionId;
-import at.hannibal2.skyhanni.config.gui.core.config.annotations.ConfigEditorAccordion;
import at.hannibal2.skyhanni.config.gui.core.config.annotations.ConfigEditorBoolean;
+import at.hannibal2.skyhanni.config.gui.core.config.annotations.ConfigEditorDraggableList;
import at.hannibal2.skyhanni.config.gui.core.config.annotations.ConfigOption;
import com.google.gson.annotations.Expose;
+import java.util.ArrayList;
+import java.util.List;
+
public class Inventory {
@Expose
@@ -14,45 +16,21 @@ public class Inventory {
public boolean hideNotClickableItems = false;
@Expose
- @ConfigOption(name = "Item number as stack size", desc = "")
- @ConfigEditorAccordion(id = 1)
- public boolean filterTypes = false;
-
- @Expose
- @ConfigOption(name = "Master Star Number", desc = "Show the Tier of the Master Star.")
- @ConfigEditorBoolean
- @ConfigAccordionId(id = 1)
- public boolean displayMasterStarNumber = false;
-
- @Expose
- @ConfigOption(name = "Master Skull Number", desc = "Show the tier of the Master Skull accessory.")
- @ConfigEditorBoolean
- @ConfigAccordionId(id = 1)
- public boolean displayMasterSkullNumber = false;
-
- @Expose
- @ConfigOption(name = "Dungeon Head Floor", desc = "Show the correct floor for golden and diamond heads.")
- @ConfigEditorBoolean
- @ConfigAccordionId(id = 1)
- public boolean displayDungeonHeadFloor = false;
-
- @Expose
- @ConfigOption(name = "New Year Cake", desc = "Show the Number of the Year of New Year Cakes.")
- @ConfigEditorBoolean
- @ConfigAccordionId(id = 1)
- public boolean displayNewYearCakeNumber = false;
-
- @Expose
- @ConfigOption(name = "Pet Level", desc = "Show the level of the pet when not maxed.")
- @ConfigEditorBoolean
- @ConfigAccordionId(id = 1)
- public boolean displayPetLevel = false;
-
- @Expose
- @ConfigOption(name = "Minion Tier", desc = "Show the Minion Tier over Items.")
- @ConfigEditorBoolean
- @ConfigAccordionId(id = 1)
- public boolean displayMinionTier = false;
+ @ConfigOption(
+ name = "Item number as stack size",
+ desc = ""
+ )
+ @ConfigEditorDraggableList(
+ exampleText = {
+ "\u00a7bMaster Star Tier",
+ "\u00a7bMaster Skull Tier",
+ "\u00a7bDungeon Head Floor Number",
+ "\u00a7bNew Year Cake",
+ "\u00a7bPet Level",
+ "\u00a7bMinion Tier"
+ }
+ )
+ public List<Integer> itemNumberAsStackSize = new ArrayList<>();
@Expose
@ConfigOption(name = "Sack Name", desc = "Show an abbreviation of the Sack name.")
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 2baf33fff..05aa1b1f0 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
@@ -4,6 +4,10 @@ import at.hannibal2.skyhanni.config.gui.core.config.Position;
import at.hannibal2.skyhanni.config.gui.core.config.annotations.*;
import com.google.gson.annotations.Expose;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
public class Misc {
@Expose
@@ -29,7 +33,31 @@ public class Misc {
desc = "Change how the boss name should be displayed")
@ConfigEditorDropdown(values = {"Disabled", "Full Name", "Short Name"})
@ConfigAccordionId(id = 1)
- public int damageIndicatorBossName = 0;
+ public int damageIndicatorBossName = 1;
+ @Expose
+ @ConfigOption(
+ name = "Select Boss",
+ desc = "Change what type of boss you want the damage indicator be enabled for."
+ )
+ @ConfigEditorDraggableList(
+ exampleText = {
+ "\u00a7bDungeon All",
+ "\u00a7bNether Mini Bosses",
+ "\u00a7bVanquisher",
+ "\u00a7bEndstone Protector",
+ "\u00a7bEnder Dragon",
+ "\u00a7bRevenant Horror",
+ "\u00a7bSpider Slayer",
+ "\u00a7bWolf Slayer",
+ "\u00a7bVoidgloom Seraph",
+ "\u00a7bBlaze Slayer",
+ "\u00a7bHeadless Horseman"
+ }
+ )
+ @ConfigAccordionId(id = 1)
+ //TODO only show currently working and tested features
+ public List<Integer> damageIndicatorBossesToShow = new ArrayList<>(Arrays.asList(0, 1, 2, 5, 8));
+
@Expose
@ConfigOption(name = "Pet Display", desc = "Show the currently active pet.")
diff --git a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt
index f63b7c6cf..3624f479b 100644
--- a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt
@@ -58,6 +58,7 @@ class BossDamageIndicator {
if (!player.canEntityBeSeen(data.entity)) continue
}
if (data.hidden) continue
+ if (data.bossType.bossTypeToggle !in SkyHanniMod.feature.misc.damageIndicatorBossesToShow) continue
val entity = data.entity
diff --git a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt
index 763bb3056..3490bddbd 100644
--- a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt
+++ b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt
@@ -1,20 +1,26 @@
package at.hannibal2.skyhanni.damageindicator
-enum class BossType(val fullName: String, val shortName: String = fullName) {
- DUNGEON("Generic Dungeon boss"),//TODO split into different bosses
+enum class BossType(val fullName: String, val bossTypeToggle: Int, val shortName: String = fullName) {
+ DUNGEON("Generic Dungeon boss", 0),//TODO split into different bosses
- NETHER_BLADESOUL("§8Bladesoul"),
- NETHER_MAGMA_BOSS("§4Magma Boss"),
- NETHER_ASHFANG("§cAshfang"),
- NETHER_BARBARIAN_DUKE("§eBarbarian Duke"),
- NETHER_MAGE_OUTLAW("§5Mage Outlaw"),
+ //Nether Mini Bosses
+ NETHER_BLADESOUL("§8Bladesoul", 1),
+ NETHER_MAGMA_BOSS("§4Magma Boss", 1),
+ NETHER_ASHFANG("§cAshfang", 1),
+ NETHER_BARBARIAN_DUKE("§eBarbarian Duke", 1),
+ NETHER_MAGE_OUTLAW("§5Mage Outlaw", 1),
- NETHER_VANQUISHER("§5Vanquisher"),
+ NETHER_VANQUISHER("§5Vanquisher", 2),
- END_ENDSTONE_PROTECTOR("§cEndstone Protector"),//TODO add color
- END_ENDERMAN_SLAYER("Voidgloom Seraph"),//TODO use seperate enums per tier
- END_ENDER_DRAGON("Ender Dragon"),//TODO fix totally
+ END_ENDSTONE_PROTECTOR("§cEndstone Protector", 3),
+ END_ENDER_DRAGON("Ender Dragon", 4),//TODO fix totally
- HUB_REVENANT_HORROR("§5Revenant Horror 5", "§5Rev 5"),//TODO add other variants like voidgloom?
- HUB_HEADLESS_HORSEMAN("§6Headless Horseman"),
+ //TODO more seperated slayer variants
+ HUB_REVENANT_HORROR("§5Revenant Horror 5", 5, "§5Rev 5"),
+ SPIDER_SLAYER("Spider Slayer", 6, "Spider"),
+ WOLF_SLAYER("Wolf Slayer", 7, "Wolf"),
+ END_ENDERMAN_SLAYER("Voidgloom Seraph", 8),
+ BLAZE_SLAYER("Blaze Slayer", 9, "Blaze"),
+
+ HUB_HEADLESS_HORSEMAN("§6Headless Horseman", 10),
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/items/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/items/ItemDisplayOverlayFeatures.kt
index 592d94fad..30428157f 100644
--- a/src/main/java/at/hannibal2/skyhanni/items/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/items/ItemDisplayOverlayFeatures.kt
@@ -42,7 +42,7 @@ class ItemDisplayOverlayFeatures {
private fun getStackTip(item: ItemStack): String {
val name = item.cleanName()
- if (SkyHanniMod.feature.inventory.displayMasterStarNumber) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(0)) {
when (name) {
"First Master Star" -> return "1"
"Second Master Star" -> return "2"
@@ -52,13 +52,13 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.displayMasterSkullNumber) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(1)) {
if (name.matchRegex("(.*)Master Skull - Tier .")) {
return name.substring(name.length - 1)
}
}
- if (SkyHanniMod.feature.inventory.displayDungeonHeadFloor) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(2)) {
if (name.contains("Golden ") || name.contains("Diamond ")) {
when {
name.contains("Bonzo") -> return "1"
@@ -72,13 +72,13 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.displayNewYearCakeNumber) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(3)) {
if (name.startsWith("New Year Cake (")) {
return "§b" + name.between("(Year ", ")")
}
}
- if (SkyHanniMod.feature.inventory.displayPetLevel) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(4)) {
if (ItemUtils.isPet(name)) {
val level = name.between("Lvl ", "] ").toInt()
if (level != ItemUtils.maxPetLevel(name)) {
@@ -87,6 +87,16 @@ class ItemDisplayOverlayFeatures {
}
}
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(5)) {
+ if (name.contains(" Minion ")) {
+ if (item.getLore().any { it.contains("Place this minion") }) {
+ val array = name.split(" ")
+ val last = array[array.size - 1]
+ return last.romanToDecimal().toString()
+ }
+ }
+ }
+
if (SkyHanniMod.feature.inventory.displaySackName) {
if (ItemUtils.isSack(name)) {
//TODO fix this and replace other
@@ -97,16 +107,6 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.displayMinionTier) {
- if (name.contains(" Minion ")) {
- if (item.getLore().any { it.contains("Place this minion") }) {
- val array = name.split(" ")
- val last = array[array.size - 1]
- return last.romanToDecimal().toString()
- }
- }
- }
-
return ""
}