mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
21 lines
590 B
C#
21 lines
590 B
C#
using HarmonyLib;
|
|
|
|
namespace EHR.Patches;
|
|
// https://github.com/tukasa0001/TownOfHost/blob/main/Patches/ActionButtonPatch.cs
|
|
|
|
[HarmonyPatch(typeof(SabotageButton), nameof(SabotageButton.DoClick))]
|
|
public static class SabotageButtonDoClickPatch
|
|
{
|
|
public static bool Prefix()
|
|
{
|
|
if (!PlayerControl.LocalPlayer.inVent && GameManager.Instance.SabotagesEnabled() && HudManager.InstanceExists)
|
|
{
|
|
HudManager.Instance.ToggleMapVisible(new()
|
|
{
|
|
Mode = MapOptions.Modes.Sabotage
|
|
});
|
|
}
|
|
|
|
return false;
|
|
}
|
|
} |