mirror of
https://github.com/ApeMV/AmongUsRevamped.git
synced 2026-10-20 01:46:28 +00:00
16 lines
528 B
C#
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");
|
|
}
|
|
}
|
|
} |