using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using DivingSuitColors.Patches;
using HarmonyLib;
using TeamMonumental;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("DivingSuitColors")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DivingSuitColors")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("5939a541-fb04-43bd-bef2-4f74a8573e7f")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace DivingSuitColors
{
[BepInPlugin("Tedlil.DivingSuitColorsMod", "Diving Suit Colors Mod", "1.0.0")]
public class SuitColorsBase : BaseUnityPlugin
{
private const string modGUID = "Tedlil.DivingSuitColorsMod";
private const string modName = "Diving Suit Colors Mod";
private const string modVersion = "1.0.0";
private readonly Harmony harmony = new Harmony("Tedlil.DivingSuitColorsMod");
private static SuitColorsBase Instance;
internal ManualLogSource mls;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = new SuitColorsBase();
}
mls = Logger.CreateLogSource("Tedlil.DivingSuitColorsMod");
mls.LogInfo((object)"Suit Color Base awakened.");
harmony.PatchAll(typeof(SuitColorsBase));
harmony.PatchAll(typeof(InteractionSkinSwapPatch));
}
}
}
namespace DivingSuitColors.Patches
{
[HarmonyPatch(typeof(InteractionSkinSwap))]
internal class InteractionSkinSwapPatch
{
[HarmonyPatch("OnInteract")]
[HarmonyPostfix]
private static void suitColorSwitcher(ref int ___SkinID, GameObject interactor)
{
Player val = default(Player);
if (interactor.TryGetComponent<Player>(ref val))
{
Soul soul = val.GetSoul();
if ((Object)(object)soul != (Object)null && val.Crouching.IsCrouching)
{
soul.PlayerSkin.SetSkin(4, false);
}
}
}
}
}