mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
25 lines
577 B
C#
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;
|
|
}
|
|
}
|
|
}
|