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