summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/combat
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-11-29 23:43:02 +0000
committerGitHub <noreply@github.com>2023-11-30 00:43:02 +0100
commit247d4d324dc9ce5960d8c94719707d232a89e3ad (patch)
treecbf6942c5875ed8fd8c24c54435aba5a514ce1b1 /src/main/java/at/hannibal2/skyhanni/features/combat
parented02a14a6d688ec9546d9ed06dddf412620bb246 (diff)
downloadskyhanni-247d4d324dc9ce5960d8c94719707d232a89e3ad.tar.gz
skyhanni-247d4d324dc9ce5960d8c94719707d232a89e3ad.tar.bz2
skyhanni-247d4d324dc9ce5960d8c94719707d232a89e3ad.zip
Migrate Integer to Enums in Config #727
Co-authored-by: hannibal2 <24389977+hannibal002@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/combat')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt186
-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/endernodetracker/EnderNodeTracker.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostFormatting.kt4
5 files changed, 116 insertions, 95 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt
index c80ae6d3d..045eaaa78 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt
@@ -1,105 +1,109 @@
package at.hannibal2.skyhanni.features.combat.damageindicator
+import at.hannibal2.skyhanni.config.features.combat.damageindicator.DamageIndicatorConfig.DamageIndicatorBossEntry
+
+typealias Type = DamageIndicatorBossEntry
+
enum class BossType(
val fullName: String,
- val bossTypeToggle: Int,
+ val bossTypeToggle: Type,
val shortName: String = fullName,
val showDeathTime: Boolean = false
) {
- GENERIC_DUNGEON_BOSS("Generic Dungeon boss", 0),//TODO split into different bosses
+ GENERIC_DUNGEON_BOSS("Generic Dungeon boss", Type.DUNGEON_ALL),//TODO split into different bosses
//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", 2),
-
- END_ENDSTONE_PROTECTOR("§cEndstone Protector", 3),
- END_ENDER_DRAGON("Ender Dragon", 4),//TODO fix totally
-
- SLAYER_ZOMBIE_1("§aRevenant Horror 1", 5, "§aRev 1", showDeathTime = true),
- SLAYER_ZOMBIE_2("§eRevenant Horror 2", 5, "§eRev 2", showDeathTime = true),
- SLAYER_ZOMBIE_3("§cRevenant Horror 3", 5, "§cRev 3", showDeathTime = true),
- SLAYER_ZOMBIE_4("§4Revenant Horror 4", 5, "§4Rev 4", showDeathTime = true),
- SLAYER_ZOMBIE_5("§5Revenant Horror 5", 5, "§5Rev 5", showDeathTime = true),
-
- SLAYER_SPIDER_1("§aTarantula Broodfather 1", 6, "§aTara 1", showDeathTime = true),
- SLAYER_SPIDER_2("§eTarantula Broodfather 2", 6, "§eTara 2", showDeathTime = true),
- SLAYER_SPIDER_3("§cTarantula Broodfather 3", 6, "§cTara 3", showDeathTime = true),
- SLAYER_SPIDER_4("§4Tarantula Broodfather 4", 6, "§4Tara 4", showDeathTime = true),
-
- SLAYER_WOLF_1("§aSven Packmaster 1", 7, "§aSven 1", showDeathTime = true),
- SLAYER_WOLF_2("§eSven Packmaster 2", 7, "§eSven 2", showDeathTime = true),
- SLAYER_WOLF_3("§cSven Packmaster 3", 7, "§cSven 3", showDeathTime = true),
- SLAYER_WOLF_4("§4Sven Packmaster 4", 7, "§4Sven 4", showDeathTime = true),
-
- SLAYER_ENDERMAN_1("§aVoidgloom Seraph 1", 8, "§aVoid 1", showDeathTime = true),
- SLAYER_ENDERMAN_2("§eVoidgloom Seraph 2", 8, "§eVoid 2", showDeathTime = true),
- SLAYER_ENDERMAN_3("§cVoidgloom Seraph 3", 8, "§cVoid 3", showDeathTime = true),
- SLAYER_ENDERMAN_4("§4Voidgloom Seraph 4", 8, "§4Void 4", showDeathTime = true),
-
- SLAYER_BLAZE_1("§aInferno Demonlord 1", 9, "§aInferno 1", showDeathTime = true),
- SLAYER_BLAZE_2("§aInferno Demonlord 2", 9, "§aInferno 2", showDeathTime = true),
- SLAYER_BLAZE_3("§aInferno Demonlord 3", 9, "§aInferno 3", showDeathTime = true),
- SLAYER_BLAZE_4("§aInferno Demonlord 4", 9, "§aInferno 4", showDeathTime = true),
-
- SLAYER_BLAZE_TYPHOEUS_1("§aInferno Typhoeus 1", 9, "§aTyphoeus 1"),
- SLAYER_BLAZE_TYPHOEUS_2("§eInferno Typhoeus 2", 9, "§eTyphoeus 2"),
- SLAYER_BLAZE_TYPHOEUS_3("§cInferno Typhoeus 3", 9, "§cTyphoeus 3"),
- SLAYER_BLAZE_TYPHOEUS_4("§cInferno Typhoeus 4", 9, "§cTyphoeus 4"),
-
- SLAYER_BLAZE_QUAZII_1("§aInferno Quazii 1", 9, "§aQuazii 1"),
- SLAYER_BLAZE_QUAZII_2("§eInferno Quazii 2", 9, "§eQuazii 2"),
- SLAYER_BLAZE_QUAZII_3("§cInferno Quazii 3", 9, "§cQuazii 3"),
- SLAYER_BLAZE_QUAZII_4("§cInferno Quazii 4", 9, "§cQuazii 4"),
-
- SLAYER_BLOODFIEND_1("§aRiftstalker Bloodfiend 1", 23, "§aBlood 1", showDeathTime = true),
- SLAYER_BLOODFIEND_2("§6Riftstalker Bloodfiend 2", 23, "§6Blood 2", showDeathTime = true),
- SLAYER_BLOODFIEND_3("§cRiftstalker Bloodfiend 3", 23, "§cBlood 3", showDeathTime = true),
- SLAYER_BLOODFIEND_4("§4Riftstalker Bloodfiend 4", 23, "§4Blood 4", showDeathTime = true),
- SLAYER_BLOODFIEND_5("§5Riftstalker Bloodfiend 5", 23, "§5Blood 5", showDeathTime = true),
-
- HUB_HEADLESS_HORSEMAN("§6Headless Horseman", 10),
-
- DUNGEON_F1("", 11),
- DUNGEON_F2("", 12),
- DUNGEON_F3("", 13),
- DUNGEON_F4_THORN("§cThorn", 14),
- DUNGEON_F5("§dLivid", 15),
- DUNGEON_F("", 16),
- DUNGEON_75("", 17),
-
- MINOS_INQUISITOR("§5Minos Inquisitor", 18),
- MINOS_CHAMPION("§2Minos Champion", 18),
- GAIA_CONSTURUCT("§2Gaia Construct", 18),
- MINOTAUR("§2Minotaur", 18),
-
- THUNDER("§cThunder", 19),
- LORD_JAWBUS("§cLord Jawbus", 19),
-
- DUMMY("Dummy", 20),
- ARACHNE_SMALL("§cSmall Arachne", 21),
- ARACHNE_BIG("§4Big Arachne", 21),
+ NETHER_BLADESOUL("§8Bladesoul", Type.NETHER_MINI_BOSSES),
+ NETHER_MAGMA_BOSS("§4Magma Boss", Type.NETHER_MINI_BOSSES),
+ NETHER_ASHFANG("§cAshfang", Type.NETHER_MINI_BOSSES),
+ NETHER_BARBARIAN_DUKE("§eBarbarian Duke", Type.NETHER_MINI_BOSSES),
+ NETHER_MAGE_OUTLAW("§5Mage Outlaw", Type.NETHER_MINI_BOSSES),
+
+ NETHER_VANQUISHER("§5Vanquisher", Type.VANQUISHER),
+
+ END_ENDSTONE_PROTECTOR("§cEndstone Protector", Type.ENDERSTONE_PROTECTOR),
+ END_ENDER_DRAGON("Ender Dragon", Type.ENDER_DRAGON),//TODO fix totally
+
+ SLAYER_ZOMBIE_1("§aRevenant Horror 1", Type.REVENANT_HORROR, "§aRev 1", showDeathTime = true),
+ SLAYER_ZOMBIE_2("§eRevenant Horror 2", Type.REVENANT_HORROR, "§eRev 2", showDeathTime = true),
+ SLAYER_ZOMBIE_3("§cRevenant Horror 3", Type.REVENANT_HORROR, "§cRev 3", showDeathTime = true),
+ SLAYER_ZOMBIE_4("§4Revenant Horror 4", Type.REVENANT_HORROR, "§4Rev 4", showDeathTime = true),
+ SLAYER_ZOMBIE_5("§5Revenant Horror 5", Type.REVENANT_HORROR, "§5Rev 5", showDeathTime = true),
+
+ SLAYER_SPIDER_1("§aTarantula Broodfather 1", Type.TARANTULA_BROODFATHER, "§aTara 1", showDeathTime = true),
+ SLAYER_SPIDER_2("§eTarantula Broodfather 2", Type.TARANTULA_BROODFATHER, "§eTara 2", showDeathTime = true),
+ SLAYER_SPIDER_3("§cTarantula Broodfather 3", Type.TARANTULA_BROODFATHER, "§cTara 3", showDeathTime = true),
+ SLAYER_SPIDER_4("§4Tarantula Broodfather 4", Type.TARANTULA_BROODFATHER, "§4Tara 4", showDeathTime = true),
+
+ SLAYER_WOLF_1("§aSven Packmaster 1", Type.SVEN_PACKMASTER, "§aSven 1", showDeathTime = true),
+ SLAYER_WOLF_2("§eSven Packmaster 2", Type.SVEN_PACKMASTER, "§eSven 2", showDeathTime = true),
+ SLAYER_WOLF_3("§cSven Packmaster 3", Type.SVEN_PACKMASTER, "§cSven 3", showDeathTime = true),
+ SLAYER_WOLF_4("§4Sven Packmaster 4", Type.SVEN_PACKMASTER, "§4Sven 4", showDeathTime = true),
+
+ SLAYER_ENDERMAN_1("§aVoidgloom Seraph 1", Type.VOIDGLOOM_SERAPH, "§aVoid 1", showDeathTime = true),
+ SLAYER_ENDERMAN_2("§eVoidgloom Seraph 2", Type.VOIDGLOOM_SERAPH, "§eVoid 2", showDeathTime = true),
+ SLAYER_ENDERMAN_3("§cVoidgloom Seraph 3", Type.VOIDGLOOM_SERAPH, "§cVoid 3", showDeathTime = true),
+ SLAYER_ENDERMAN_4("§4Voidgloom Seraph 4", Type.VOIDGLOOM_SERAPH, "§4Void 4", showDeathTime = true),
+
+ SLAYER_BLAZE_1("§aInferno Demonlord 1", Type.INFERNO_DEMONLORD, "§aInferno 1", showDeathTime = true),
+ SLAYER_BLAZE_2("§aInferno Demonlord 2", Type.INFERNO_DEMONLORD, "§aInferno 2", showDeathTime = true),
+ SLAYER_BLAZE_3("§aInferno Demonlord 3", Type.INFERNO_DEMONLORD, "§aInferno 3", showDeathTime = true),
+ SLAYER_BLAZE_4("§aInferno Demonlord 4", Type.INFERNO_DEMONLORD, "§aInferno 4", showDeathTime = true),
+
+ SLAYER_BLAZE_TYPHOEUS_1("§aInferno Typhoeus 1", Type.INFERNO_DEMONLORD, "§aTyphoeus 1"),
+ SLAYER_BLAZE_TYPHOEUS_2("§eInferno Typhoeus 2", Type.INFERNO_DEMONLORD, "§eTyphoeus 2"),
+ SLAYER_BLAZE_TYPHOEUS_3("§cInferno Typhoeus 3", Type.INFERNO_DEMONLORD, "§cTyphoeus 3"),
+ SLAYER_BLAZE_TYPHOEUS_4("§cInferno Typhoeus 4", Type.INFERNO_DEMONLORD, "§cTyphoeus 4"),
+
+ SLAYER_BLAZE_QUAZII_1("§aInferno Quazii 1", Type.INFERNO_DEMONLORD, "§aQuazii 1"),
+ SLAYER_BLAZE_QUAZII_2("§eInferno Quazii 2", Type.INFERNO_DEMONLORD, "§eQuazii 2"),
+ SLAYER_BLAZE_QUAZII_3("§cInferno Quazii 3", Type.INFERNO_DEMONLORD, "§cQuazii 3"),
+ SLAYER_BLAZE_QUAZII_4("§cInferno Quazii 4", Type.INFERNO_DEMONLORD, "§cQuazii 4"),
+
+ SLAYER_BLOODFIEND_1("§aRiftstalker Bloodfiend 1", Type.RIFTSTALKER_BLOODFIEND, "§aBlood 1", showDeathTime = true),
+ SLAYER_BLOODFIEND_2("§6Riftstalker Bloodfiend 2", Type.RIFTSTALKER_BLOODFIEND, "§6Blood 2", showDeathTime = true),
+ SLAYER_BLOODFIEND_3("§cRiftstalker Bloodfiend 3", Type.RIFTSTALKER_BLOODFIEND, "§cBlood 3", showDeathTime = true),
+ SLAYER_BLOODFIEND_4("§4Riftstalker Bloodfiend 4", Type.RIFTSTALKER_BLOODFIEND, "§4Blood 4", showDeathTime = true),
+ SLAYER_BLOODFIEND_5("§5Riftstalker Bloodfiend 5", Type.RIFTSTALKER_BLOODFIEND, "§5Blood 5", showDeathTime = true),
+
+ HUB_HEADLESS_HORSEMAN("§6Headless Horseman", Type.HEADLESS_HORSEMAN),
+
+ DUNGEON_F1("", Type.DUNGEON_FLOOR_1),
+ DUNGEON_F2("", Type.DUNGEON_FLOOR_2),
+ DUNGEON_F3("", Type.DUNGEON_FLOOR_3),
+ DUNGEON_F4_THORN("§cThorn", Type.DUNGEON_FLOOR_4),
+ DUNGEON_F5("§dLivid", Type.DUNGEON_FLOOR_5),
+ DUNGEON_F("", Type.DUNGEON_FLOOR_6),
+ DUNGEON_75("", Type.DUNGEON_FLOOR_7),
+
+ MINOS_INQUISITOR("§5Minos Inquisitor", Type.DIANA_MOBS),
+ MINOS_CHAMPION("§2Minos Champion", Type.DIANA_MOBS),
+ GAIA_CONSTURUCT("§2Gaia Construct", Type.DIANA_MOBS),
+ MINOTAUR("§2Minotaur", Type.DIANA_MOBS),
+
+ THUNDER("§cThunder", Type.SEA_CREATURES),
+ LORD_JAWBUS("§cLord Jawbus", Type.SEA_CREATURES),
+
+ DUMMY("Dummy", Type.DUMMY),
+ ARACHNE_SMALL("§cSmall Arachne", Type.ARACHNE),
+ ARACHNE_BIG("§4Big Arachne", Type.ARACHNE),
// The Rift
- LEECH_SUPREME("§cLeech Supreme", 22),
- BACTE("§aBacte", 22),
-
- WINTER_REINDRAKE("Reindrake", 24),//TODO fix totally
-
- GARDEN_PEST_BEETLE("§cBeetle", 25),
- GARDEN_PEST_CRICKET("§cCricket", 25),
- GARDEN_PEST_FLY("§cFly", 25),
- GARDEN_PEST_LOCUST("§cLocust", 25),
- GARDEN_PEST_MITE("§cMite", 25),
- GARDEN_PEST_MOSQUITO("§cMosquito", 25),
- GARDEN_PEST_MOTH("§cMoth", 25),
- GARDEN_PEST_RAT("§cRat", 25),
- GARDEN_PEST_SLUG("§cSlug", 25),
- GARDEN_PEST_EARTHWORM("§cEarthworm", 25),
+ LEECH_SUPREME("§cLeech Supreme", Type.THE_RIFT_BOSSES),
+ BACTE("§aBacte", Type.THE_RIFT_BOSSES),
+
+ WINTER_REINDRAKE("Reindrake", Type.REINDRAKE),//TODO fix totally
+
+ GARDEN_PEST_BEETLE("§cBeetle", Type.GARDEN_PESTS),
+ GARDEN_PEST_CRICKET("§cCricket", Type.GARDEN_PESTS),
+ GARDEN_PEST_FLY("§cFly", Type.GARDEN_PESTS),
+ GARDEN_PEST_LOCUST("§cLocust", Type.GARDEN_PESTS),
+ GARDEN_PEST_MITE("§cMite", Type.GARDEN_PESTS),
+ GARDEN_PEST_MOSQUITO("§cMosquito", Type.GARDEN_PESTS),
+ GARDEN_PEST_MOTH("§cMoth", Type.GARDEN_PESTS),
+ GARDEN_PEST_RAT("§cRat", Type.GARDEN_PESTS),
+ GARDEN_PEST_SLUG("§cSlug", Type.GARDEN_PESTS),
+ GARDEN_PEST_EARTHWORM("§cEarthworm", Type.GARDEN_PESTS),
//TODO arachne
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 da682d17a..6bc0ac05c 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
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.combat.damageindicator
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
+import at.hannibal2.skyhanni.config.features.combat.damageindicator.DamageIndicatorConfig.DamageIndicatorBossEntry
import at.hannibal2.skyhanni.data.ScoreboardData
import at.hannibal2.skyhanni.events.BossHealthChangeEvent
import at.hannibal2.skyhanni.events.DamageIndicatorDeathEvent
@@ -16,6 +17,7 @@ import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.slayer.blaze.HellionShield
import at.hannibal2.skyhanni.features.slayer.blaze.setHellionShield
import at.hannibal2.skyhanni.test.command.ErrorManager
+import at.hannibal2.skyhanni.utils.ConfigUtils
import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.EntityUtils.canBeSeen
import at.hannibal2.skyhanni.utils.EntityUtils.getNameTagWith
@@ -870,6 +872,9 @@ class DamageIndicatorManager {
event.move(2, "damageIndicator", "combat.damageIndicator")
event.move(3, "slayer.endermanPhaseDisplay", "slayer.endermen.phaseDisplay")
event.move(3, "slayer.blazePhaseDisplay", "slayer.blazes.phaseDisplay")
+ event.move(11, "slayer.blazes.bossesToShow", "slayer.blazes.bossesToShow") { element ->
+ ConfigUtils.migrateIntArrayListToEnumArrayList(element, DamageIndicatorBossEntry::class.java)
+ }
}
fun isEnabled() = LorenzUtils.inSkyBlock && config.enabled
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt
index b65021067..ada0e4029 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.combat.endernodetracker
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
+import at.hannibal2.skyhanni.config.features.combat.EnderNodeConfig.EnderNodeDisplayEntry
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.events.ConfigLoadEvent
@@ -10,6 +11,7 @@ import at.hannibal2.skyhanni.events.IslandChangeEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent
import at.hannibal2.skyhanni.events.SackChangeEvent
+import at.hannibal2.skyhanni.utils.ConfigUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
@@ -161,6 +163,9 @@ object EnderNodeTracker {
@SubscribeEvent
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
event.move(2, "misc.enderNodeTracker", "combat.enderNodeTracker")
+ event.move(11, "combat.enderNodeTracker.textFormat", "combat.enderNodeTracker.textFormat") { element ->
+ ConfigUtils.migrateIntArrayListToEnumArrayList(element, EnderNodeDisplayEntry::class.java)
+ }
}
private fun calculateProfit(storage: Data): Map<EnderNode, Double> {
@@ -245,7 +250,8 @@ object EnderNodeTracker {
val newList = mutableListOf<List<Any>>()
for (index in config.textFormat.get()) {
- newList.add(map[index])
+ // TODO, change functionality to use enum rather than ordinals
+ newList.add(map[index.ordinal])
}
return newList
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
index 56e70437c..eb9b68643 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.combat.ghostcounter
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
+import at.hannibal2.skyhanni.config.features.combat.ghostcounter.GhostCounterConfig.GhostDisplayEntry
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.data.SkillExperience
@@ -34,6 +35,7 @@ import at.hannibal2.skyhanni.utils.CombatUtils.lastKillUpdate
import at.hannibal2.skyhanni.utils.CombatUtils.lastUpdate
import at.hannibal2.skyhanni.utils.CombatUtils.xpGainHour
import at.hannibal2.skyhanni.utils.CombatUtils.xpGainHourLast
+import at.hannibal2.skyhanni.utils.ConfigUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
@@ -111,7 +113,8 @@ object GhostCounter {
private fun formatDisplay(map: List<List<Any>>): List<List<Any>> {
val newList = mutableListOf<List<Any>>()
for (index in config.ghostDisplayText) {
- newList.add(map[index])
+ // TODO, change functionality to use enum rather than ordinals
+ newList.add(map[index.ordinal])
}
return newList
}
@@ -488,6 +491,9 @@ object GhostCounter {
@SubscribeEvent
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
event.move(2, "ghostCounter", "combat.ghostCounter")
+ event.move(11, "combat.ghostCounter.ghostDisplayText", "combat.ghostCounter.ghostDisplayText") { element ->
+ ConfigUtils.migrateIntArrayListToEnumArrayList(element, GhostDisplayEntry::class.java)
+ }
}
fun isEnabled() = config.enabled && IslandType.DWARVEN_MINES.isInIsland()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostFormatting.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostFormatting.kt
index 70f64de29..183753e51 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostFormatting.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostFormatting.kt
@@ -138,7 +138,7 @@ object GhostFormatting {
fun reset() {
with(GhostCounter.config.textFormatting) {
titleFormat = "&6Ghost Counter"
- ghostKilledFormat = " &6Ghost Killed: &b%value% &7(%session%)"
+ ghostKilledFormat = " &6Ghosts Killed: &b%value% &7(%session%)"
sorrowsFormat = " &6Sorrow: &b%value% &7(%session%)"
ghostSinceSorrowFormat = " &6Ghost since Sorrow: &b%value%"
ghostKillPerSorrowFormat = " &6Ghosts/Sorrow: &b%value%"
@@ -179,4 +179,4 @@ object GhostFormatting {
moneyMadeFormat = " &6Money made: &b%value%"
}
}
-} \ No newline at end of file
+}