aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-14 16:18:03 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-14 16:18:03 +0200
commitb4648fe70ce0538325ed6df3ad068e9fe9237c0c (patch)
tree90dc8bfcc55f63d03ec52e127d338c7a36725fa1 /src
parente514b16dbb8a7d95b77e95a7a51f8cc50cd31370 (diff)
downloadskyhanni-b4648fe70ce0538325ed6df3ad068e9fe9237c0c.tar.gz
skyhanni-b4648fe70ce0538325ed6df3ad068e9fe9237c0c.tar.bz2
skyhanni-b4648fe70ce0538325ed6df3ad068e9fe9237c0c.zip
Fixed bug that faction icons in crimson isle are always hidden. Added option to Advanced Player List to hide Crimson Isle faction icons.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt22
2 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java
index 5cd9d1611..081716f3f 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java
@@ -633,6 +633,11 @@ public class MiscConfig {
public boolean showBingoRankNumber = false;
@Expose
+ @ConfigOption(name = "Hide Factions", desc = "Hide the icon of the Crimson Isle Faction in the tab list.")
+ @ConfigEditorBoolean
+ public boolean hideFactions = false;
+
+ @Expose
@ConfigOption(name = "Mark Special Persons", desc = "Show speical icons behind the name of guild members, party members, friends, and marked players.")
@ConfigEditorBoolean
public boolean markSpecialPersons = false;
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
index 33bd8c6d4..04107c7e2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
@@ -4,11 +4,13 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.BingoAPI
import at.hannibal2.skyhanni.data.FriendAPI
import at.hannibal2.skyhanni.data.GuildAPI
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.PartyAPI
import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager
import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests
import at.hannibal2.skyhanni.utils.KeyboardManager
import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import com.google.common.cache.CacheBuilder
@@ -67,6 +69,15 @@ object AdvancedPlayerList {
} else {
playerData.bingoLevel = BingoAPI.getRank(line)
}
+ if (IslandType.CRIMSON_ISLE.isInIsland()) {
+ playerData.faction = if (line.contains("§c⚒")) {
+ CrimsonIsleFaction.BARBARIAN
+ } else if (line.contains("§5ቾ")) {
+ CrimsonIsleFaction.MAGE
+ } else {
+ CrimsonIsleFaction.NONE
+ }
+ }
} else {
playerData.nameSuffix = ""
}
@@ -150,6 +161,10 @@ object AdvancedPlayerList {
suffix += " §c:O"
}
+ if (IslandType.CRIMSON_ISLE.isInIsland() && !config.hideFactions) {
+ suffix += data.faction.icon
+ }
+
return "$level $playerName ${suffix.trim()}"
}
@@ -203,5 +218,12 @@ object AdvancedPlayerList {
var levelText: String = "?"
var ironman: Boolean = false
var bingoLevel: Int? = null
+ var faction: CrimsonIsleFaction = CrimsonIsleFaction.NONE
+ }
+
+ enum class CrimsonIsleFaction(val icon: String) {
+ BARBARIAN(" §c⚒"),
+ MAGE(" §5ቾ"),
+ NONE("")
}
} \ No newline at end of file