From cfaf1e4b91408b5d3606294a6e3daa7b842d123c Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Wed, 17 May 2023 14:23:29 -0500 Subject: [PATCH] [ClearHudNotifications] Change getting local username --- ClearHudNotifications/HarmonyPatches.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ClearHudNotifications/HarmonyPatches.cs b/ClearHudNotifications/HarmonyPatches.cs index b8c2983..776f1e7 100644 --- a/ClearHudNotifications/HarmonyPatches.cs +++ b/ClearHudNotifications/HarmonyPatches.cs @@ -2,6 +2,7 @@ using ABI_RC.Core.UI; using cohtml; using HarmonyLib; +using static ABI_RC.Core.Networking.AuthManager; namespace NAK.ClearHudNotifications.HarmonyPatches; @@ -11,7 +12,7 @@ internal static class CohtmlHudPatches [HarmonyPatch(typeof(CohtmlHud), nameof(CohtmlHud.ViewDropText), new Type[] { typeof(string), typeof(string), typeof(string) })] private static bool Prefix_CohtmlHud_ViewDropText(string cat, string headline, string small, ref CohtmlHud __instance) { - if (!headline.Contains(MetaPort.Instance.username)) return true; // we only want our username notification + if (!headline.Contains(username)) return true; // we only want our username notification if (small == "A user has joined your Instance." && !MetaPort.Instance.settings.GetSettingsBool("HUDCustomizationPlayerJoins", false)) {