Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion BetterChat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,9 @@ private class Configuration

[JsonProperty("Reverse Title Order")]
public bool ReverseTitleOrder { get; set; } = false;

[JsonProperty("Include 3rd Party Titles In Reverse")]
public bool IncludeThirdPartyTitlesInReverse { get; set; } = false;
}

#endregion
Expand Down Expand Up @@ -794,7 +797,7 @@ public static BetterChatMessage FormatMessage(IPlayer player, string message)

titles = titles.GetRange(0, Math.Min(_instance._config.MaxTitles, titles.Count));

if (_instance._config.ReverseTitleOrder)
if (_instance._config.ReverseTitleOrder && !_instance._config.IncludeThirdPartyTitlesInReverse)
{
titles.Reverse();
}
Expand All @@ -814,6 +817,11 @@ public static BetterChatMessage FormatMessage(IPlayer player, string message)
}
}

if (_instance._config.ReverseTitleOrder && _instance._config.IncludeThirdPartyTitlesInReverse)
{
titles.Reverse();
}

return new BetterChatMessage
{
Player = player,
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,17 @@ All arguments inside **[ ]** are optional! **|** stands for 'or'.

## Configuration

- Maximal Characters Per Message: How many characters you want messages to be limited to.
- Maximal Titles: How many titles you want included in the message.
- Reverse Title Order: Reverses the order of the titles. Example: [Admin][VIP] -> [VIP][Admin]
- Include 3rd Party Titles In Reverse: Common use case is clan tags from Clans or ClansReborn.

```json
{
"Maximal Characters Per Message": 128,
"Maximal Titles": 3,
"Reverse Title Order": false
"Reverse Title Order": false,
"Include 3rd Party Titles In Reverse": false
}
```

Expand Down