diff options
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java | 5 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt | 31 |
2 files changed, 30 insertions, 6 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 51c11c082..fcdc3ef38 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java @@ -606,6 +606,11 @@ public class MiscConfig { @ConfigOption(name = "Bingo Rank Number", desc = "Show the number of the bingo rank next to the icon. Useful if you are not so familar with bingo.") @ConfigEditorBoolean public boolean showBingoRankNumber = 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 114acae06..030591558 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 @@ -125,11 +125,19 @@ object AdvancedPlayerList { if (config.hideLevelBrackets) data.levelText else "§8[${data.levelText}§8]" } else "" - val suffix = if (config.hideEmblem) { + var suffix = if (config.hideEmblem) { if (data.ironman) "§7♲" else getBingoIcon(data.bingoLevel) } else data.nameSuffix - return "$level $playerName $suffix" + if (config.markSpecialPersons) { + val score = socialScore(data.name) + if (score != 1) { + LorenzUtils.debug(data.name + " score = $score") + } + suffix += " " + getSocialScoreIcon(score) + } + + return "$level $playerName ${suffix.trim()}" } private var randomOrderCache = @@ -146,15 +154,26 @@ object AdvancedPlayerList { } private fun socialScore(name: String) = when { - LorenzUtils.getPlayerName() == name -> 5 - MarkedPlayerManager.isMarkedPlayer(name) -> 4 - PartyAPI.partyMembers.contains(name) -> 3 - FriendAPI.getAllFriends().any { it.name == name } -> 2 + LorenzUtils.getPlayerName() == name -> 10 + MarkedPlayerManager.isMarkedPlayer(name) -> 8 + PartyAPI.partyMembers.contains(name) -> 5 + FriendAPI.getAllFriends().any { it.name.contains(name) } -> 4 // TODO add guild else -> 1 } + private fun getSocialScoreIcon(score: Int) = when (score) { + 10 -> "§cTHIS IS ME" + 8 -> "§eMARKED" + 5 -> "§7§lP" + 4 -> "§9§lF" + 3 -> "§aG" + // TODO add guild + + else -> "" + } + private fun getBingoRank(text: String) = when { text.contains("§7Ⓑ") -> 0 //No Rank text.contains("§aⒷ") -> 1 //Rank 1 |