Added option to apply tags to ALL chat messages

This commit is contained in:
r00telement
2022-01-08 19:20:21 +00:00
parent 927ca813ff
commit 20543e0fb1
5 changed files with 28 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ namespace PlayerTags.Configuration
public bool IsPlayersTabEnemiesVisible = true;
public bool IsPlayersTabOthersVisible = false;
public bool IsLinkSelfInChatEnabled = false;
public bool IsApplyTagsToAllChatMessagesEnabled = true;
[JsonProperty(TypeNameHandling = TypeNameHandling.None, ItemTypeNameHandling = TypeNameHandling.None)]
public Dictionary<string, InheritableData> AllTagsChanges = new Dictionary<string, InheritableData>();

View File

@@ -71,6 +71,7 @@ namespace PlayerTags.Configuration
DrawHeading(Strings.Loc_Static_Experimental);
DrawCheckbox(nameof(m_PluginConfiguration.IsPlayerNameRandomlyGenerated), true, ref m_PluginConfiguration.IsPlayerNameRandomlyGenerated, () => m_PluginConfiguration.Save(m_PluginData));
DrawCheckbox(nameof(m_PluginConfiguration.IsLinkSelfInChatEnabled), true, ref m_PluginConfiguration.IsLinkSelfInChatEnabled, () => m_PluginConfiguration.Save(m_PluginData));
DrawCheckbox(nameof(m_PluginConfiguration.IsApplyTagsToAllChatMessagesEnabled), true, ref m_PluginConfiguration.IsApplyTagsToAllChatMessagesEnabled, () => m_PluginConfiguration.Save(m_PluginData));
ImGui.EndTabItem();
}

View File

@@ -103,7 +103,7 @@ namespace PlayerTags.Features
private void Chat_ChatMessage(XivChatType type, uint senderId, ref SeString sender, ref SeString message, ref bool isHandled)
{
if (Enum.IsDefined(type))
if (m_PluginConfiguration.IsApplyTagsToAllChatMessagesEnabled || Enum.IsDefined(type))
{
AddTagsToChat(sender);
AddTagsToChat(message);

View File

@@ -186,6 +186,24 @@ namespace PlayerTags.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Apply tags to all chat messages.
/// </summary>
public static string Loc_IsApplyTagsToAllChatMessagesEnabled {
get {
return ResourceManager.GetString("Loc_IsApplyTagsToAllChatMessagesEnabled", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Applies tags to all chat messages, including non-social messages and messages you may not be able to see..
/// </summary>
public static string Loc_IsApplyTagsToAllChatMessagesEnabled_Description {
get {
return ResourceManager.GetString("Loc_IsApplyTagsToAllChatMessagesEnabled_Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Context menu integration.
/// </summary>
@@ -1267,7 +1285,7 @@ namespace PlayerTags.Resources {
}
/// <summary>
/// Looks up a localized string similar to This plugin can modify nameplates and chat. When combined with other plugins that modify these things, you are likely to see unexpected behavior..
/// Looks up a localized string similar to This plugin can modify nameplates and chat. When combined with other plugins that modify these things, you are likely to see unexpected behavior. The load order of your plugins may make a difference..
/// </summary>
public static string Loc_Static_WarningMessage {
get {

View File

@@ -267,6 +267,12 @@
<data name="Loc_IsLinkSelfInChatEnabled_Description" xml:space="preserve">
<value>Attempts to link your chat name to your character, allowing tags to be applied to self in chat.</value>
</data>
<data name="Loc_IsApplyTagsToAllChatMessagesEnabled" xml:space="preserve">
<value>Apply tags to all chat messages</value>
</data>
<data name="Loc_IsApplyTagsToAllChatMessagesEnabled_Description" xml:space="preserve">
<value>Applies tags to all chat messages, including non-social messages, and messages you may not be able to see.</value>
</data>
<data name="Loc_Static_ResetDefault_Description" xml:space="preserve">
<value>Reset this item to its defaults.</value>
</data>