using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using CellMenu;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyFileVersion("1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.0")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("NoBoosters")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyProduct("NoBoosters")]
[assembly: AssemblyTitle("NoBoosters")]
[assembly: AssemblyVersion("1.1.0.0")]
namespace NoBoosters;
[BepInPlugin("dev.aurirex.gtfo.noboosters", "No Boosters", "1.1.0")]
[BepInIncompatibility("com.mccad00.AmongDrip")]
public class EntryPoint : BasePlugin
{
public const string PLUGIN_GUID = "dev.aurirex.gtfo.noboosters";
public const string PLUGIN_NAME = "No Boosters";
public const string PLUGIN_VERSION = "1.1.0";
public const string DEVIOUSLICK_GUID = "com.mccad00.AmongDrip";
private Harmony _harmony;
internal static ManualLogSource L;
public override void Load()
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Expected O, but got Unknown
L = ((BasePlugin)this).Log;
_harmony = new Harmony("dev.aurirex.gtfo.noboosters");
_harmony.PatchAll(Assembly.GetExecutingAssembly());
((BasePlugin)this).Log.LogInfo((object)"Loaded and patched!");
}
}
internal class Patches
{
[HarmonyPatch(typeof(GameStateManager), "DoChangeState")]
public static class GameStateManager_DoChangeState_Patch
{
public static void Postfix(eGameStateName nextState)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0002: Invalid comparison between Unknown and I4
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Expected O, but got Unknown
if ((int)nextState == 6)
{
ManualLogSource l = EntryPoint.L;
bool flag = default(bool);
BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(10, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Disabling ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("PersistentInventoryManager");
}
l.LogInfo(val);
((Behaviour)PersistentInventoryManager.Current).enabled = false;
}
}
}
[HarmonyPatch(typeof(PersistentInventoryManager), "OnLevelCleanup")]
public static class PersistentInventoryManager_OnLevelCleanup_Patch
{
public static void Prefix(PersistentInventoryManager __instance)
{
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Expected O, but got Unknown
ManualLogSource l = EntryPoint.L;
bool flag = default(bool);
BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(9, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Enabling ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("PersistentInventoryManager");
}
l.LogInfo(val);
((Behaviour)__instance).enabled = true;
}
}
[HarmonyPriority(0)]
[HarmonyPatch(typeof(PersistentInventoryManager), "CommitPendingTransactions")]
public static class PersistentInventoryManager_CommitPendingTransactions_Patch
{
public static bool Prefix()
{
return false;
}
}
[HarmonyPatch(typeof(CM_PlayerLobbyBar), "SetupFromPage")]
public static class CM_PlayerLobbyBar_SetupFromPage_Patch
{
public static void Postfix(CM_PlayerLobbyBar __instance)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
__instance.m_boosterImplantAlign.position = new Vector3(10000f, 0f, 0f);
((Component)__instance.m_clothesButton).transform.localPosition = new Vector3(170f, -510f, 0f);
}
}
[HarmonyPatch(typeof(PUI_BoosterIconActiveDisplay), "UpdateBoosterIconsActiveState")]
public static class PUI_BoosterIconActiveDisplay_UpdateBoosterIconsActiveState_Patch
{
public static bool Prefix(PUI_BoosterIconActiveDisplay __instance)
{
((Component)__instance).gameObject.SetActive(false);
return false;
}
}
[HarmonyPatch(typeof(PUI_BoosterDetails), "SetupBoosterDetails")]
public static class PUI_BoosterDetails_SetupBoosterDetails_Patch
{
public static void Postfix(PUI_BoosterDetails __instance)
{
((Component)__instance).gameObject.SetActive(false);
}
}
[HarmonyPatch(typeof(PUI_BoosterDetails), "UpdateButtonActiveCheck")]
public static class PUI_BoosterDetails_UpdateButtonActiveCheck_Patch
{
public static bool Prefix(PUI_BoosterDetails __instance)
{
((Component)__instance.m_leftButton).gameObject.SetActive(false);
((Component)__instance.m_rightButton).gameObject.SetActive(false);
return false;
}
}
}