Files
BetterAmongUs/Patches/RolePatch.cs
T
2024-08-17 03:40:15 -05:00

25 lines
577 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 (__instance.Player.BetterData().RoleInfo.HasNoisemakerNotify)
{
return false;
}
__instance.Player.BetterData().RoleInfo.HasNoisemakerNotify = true;
return true;
}
}
}