using System.Reflection;
using EFT;
using EFT.UI;

namespace stupid.solutions;

public static class TripwireHooks
{
	public static void PlayTripwireInteractionSound_Hook(object instance, float plantTime, bool hasMultiTool)
	{
		Player player = instance as Player;
		if (!(player == null))
		{
			typeof(Player).GetMethod("SendTripwireInteractionSoundState", BindingFlags.Instance | BindingFlags.NonPublic)?.Invoke(player, new object[3]
			{
				EInteractionStatus.Started,
				true,
				hasMultiTool
			});
		}
	}

	public static void AntiTripWire_Hook(object instance, object tripwireSoundMessage)
	{
		ConsoleScreen.Log("TripWire sound blocked");
	}
}
