From 86448e14908f0cc29cb3bbb022a59c13d018711f Mon Sep 17 00:00:00 2001 From: Pilzinsel64 Date: Fri, 6 Oct 2023 21:01:07 +0200 Subject: [PATCH] code formatting --- PlayerTags/Features/NameplateTagTargetFeature.cs | 13 ++----------- PlayerTags/Plugin.cs | 12 ++++++------ 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/PlayerTags/Features/NameplateTagTargetFeature.cs b/PlayerTags/Features/NameplateTagTargetFeature.cs index dc61f77..0d763fd 100644 --- a/PlayerTags/Features/NameplateTagTargetFeature.cs +++ b/PlayerTags/Features/NameplateTagTargetFeature.cs @@ -52,16 +52,13 @@ namespace PlayerTags.Features { if (m_Nameplate == null) { - m_Nameplate = new Nameplate(); + m_Nameplate = new(); + if (!m_Nameplate.IsValid) - { m_Nameplate = null; - } if (m_Nameplate != null) - { m_Nameplate.PlayerNameplateUpdated += Nameplate_PlayerNameplateUpdated; - } } } @@ -88,20 +85,14 @@ namespace PlayerTags.Features protected override bool IsIconVisible(Tag tag) { if (tag.IsRoleIconVisibleInNameplates.InheritedValue != null) - { return tag.IsRoleIconVisibleInNameplates.InheritedValue.Value; - } - return false; } protected override bool IsTextVisible(Tag tag) { if (tag.IsTextVisibleInNameplates.InheritedValue != null) - { return tag.IsTextVisibleInNameplates.InheritedValue.Value; - } - return false; } diff --git a/PlayerTags/Plugin.cs b/PlayerTags/Plugin.cs index e27090d..2a252ce 100644 --- a/PlayerTags/Plugin.cs +++ b/PlayerTags/Plugin.cs @@ -23,13 +23,13 @@ namespace PlayerTags private const string c_CommandArg_Off = "off"; private const string c_CommandArg_toggle = "toggle"; - private PluginConfiguration pluginConfiguration = null; - private PluginData pluginData = null; - private PluginConfigurationUI pluginConfigurationUI = null; + private readonly PluginConfiguration pluginConfiguration = null; + private readonly PluginData pluginData = null; + private readonly PluginConfigurationUI pluginConfigurationUI = null; - private CustomTagsContextMenuFeature customTagsContextMenuFeature; - private NameplateTagTargetFeature nameplatesTagTargetFeature; - private ChatTagTargetFeature chatTagTargetFeature; + private readonly CustomTagsContextMenuFeature customTagsContextMenuFeature; + private readonly NameplateTagTargetFeature nameplatesTagTargetFeature; + private readonly ChatTagTargetFeature chatTagTargetFeature; public Plugin(DalamudPluginInterface pluginInterface) {