aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-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