mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-05 07:49:22 +00:00
[ClearHudNotifications] Change getting local username
This commit is contained in:
parent
ced3f26e8d
commit
cfaf1e4b91
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
using ABI_RC.Core.UI;
|
using ABI_RC.Core.UI;
|
||||||
using cohtml;
|
using cohtml;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
|
using static ABI_RC.Core.Networking.AuthManager;
|
||||||
|
|
||||||
namespace NAK.ClearHudNotifications.HarmonyPatches;
|
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) })]
|
[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)
|
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))
|
if (small == "A user has joined your Instance." && !MetaPort.Instance.settings.GetSettingsBool("HUDCustomizationPlayerJoins", false))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue