Files
AmongUsRevamped/Patches/VentPatches.cs
T
2026-02-22 23:29:30 +01:00

16 lines
528 B
C#

namespace AmongUsRevamped;
[HarmonyPatch(typeof(Vent), nameof(Vent.EnterVent))]
class EnterVentPatch
{
public static void Postfix(Vent __instance, [HarmonyArgument(0)] PlayerControl pc)
{
if (!AmongUsClient.Instance.AmHost) return;
if (CustomRoleManagement.PlayerRoles.TryGetValue(pc.PlayerId, out var role) && role == "Mayor")
{
pc.CmdReportDeadBody(null);
Logger.Info($" The Mayor, {pc.Data.PlayerName}, called a meeting by venting", "EnterVent");
}
}
}