force custom tag color in chat for name
This commit is contained in:
@@ -394,12 +394,6 @@ namespace PlayerTags.Features
|
||||
if (stringMatch.PlayerPayload != null && stringMatch.DisplayTextPayloads.Any())
|
||||
{
|
||||
Identity identity = m_PluginData.GetIdentity(stringMatch.PlayerPayload);
|
||||
foreach (var customTagId in identity.CustomTagIds)
|
||||
{
|
||||
var customTag = m_PluginData.CustomTags.FirstOrDefault(tag => tag.CustomId.Value == customTagId);
|
||||
if (customTag != null)
|
||||
applyTextFormatting(customTag);
|
||||
}
|
||||
|
||||
if (stringMatch.GameObject is PlayerCharacter playerCharacter1)
|
||||
{
|
||||
@@ -407,6 +401,13 @@ namespace PlayerTags.Features
|
||||
applyTextFormatting(jobTag);
|
||||
}
|
||||
|
||||
foreach (var customTagId in identity.CustomTagIds)
|
||||
{
|
||||
var customTag = m_PluginData.CustomTags.FirstOrDefault(tag => tag.CustomId.Value == customTagId);
|
||||
if (customTag != null)
|
||||
applyTextFormatting(customTag);
|
||||
}
|
||||
|
||||
void applyTextFormatting(Tag tag)
|
||||
=> ApplyTextFormatting(stringMatch.GameObject, tag, new[] { message }, new[] { tag.IsTextColorAppliedToChatName }, stringMatch.DisplayTextPayloads);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user