Files
BetterAmongUs/Patches/RolePatch.cs
T
2024-11-03 15:03:49 -06:00

26 lines
606 B
C#

using BetterAmongUs.Helpers;
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;
}
}
}