using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using InfiniteOxygen.Patches;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("InfiniteOxygen")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("InfiniteOxygen")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("0c2fc562-96fe-4401-b2ce-82410187243a")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace InfiniteOxygen
{
[BepInPlugin("PokeStone.InfiniteOxygen", "Infinite Oxygen", "1.0.0")]
public class InfiniteOxygenBase : BaseUnityPlugin
{
private const string modGUID = "PokeStone.InfiniteOxygen";
private const string modName = "Infinite Oxygen";
private const string modVersion = "1.0.0";
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
Harmony val = new Harmony("PokeStone.InfiniteOxygen");
val.PatchAll(typeof(InfiniteOxygenBase));
val.PatchAll(typeof(OxygenPatch));
}
}
}
namespace InfiniteOxygen.Patches
{
[HarmonyPatch(typeof(PlayerData), "UpdateValues")]
internal class OxygenPatch
{
private static bool Prefix(PlayerData __instance)
{
if (__instance.usingOxygen && !__instance.isInDiveBell)
{
return false;
}
return true;
}
}
}