Files
BetterAmongUs/Patches/RolePatch.cs
T
2024-08-03 19:31:52 -05:00

25 lines
579 B
C#

using HarmonyLib;
namespace BetterAmongUs.Patches;
class RolePatch
{
[HarmonyPatch(typeof(NoisemakerRole))]
class NoisemakerRolePatch
{
[HarmonyPatch(nameof(NoisemakerRole.OnDeath))]
[HarmonyPrefix]
public static bool NotifyOfDeath_Prefix(NoisemakerRole __instance)
{
if (ExtendedPlayerInfo.HasNoisemakerNotify.Contains(__instance.Player))
{
return false;
}
ExtendedPlayerInfo.HasNoisemakerNotify.Add(__instance.Player);
return true;
}
}
}