using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Bootstrap;
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.2.0")]
[assembly: AssemblyInformationalVersion("1.2.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.2.0.0")]
namespace NoBoosters;
[BepInPlugin("dev.aurirex.gtfo.noboosters", "No Boosters", "1.2.0")]
[BepInIncompatibility("com.mccad00.AmongDrip")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
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.2.0";
public const string DEVIOUSLICK_GUID = "com.mccad00.AmongDrip";
public const string SIMPLEPROGRESSION_GUID = "dev.aurirex.gtfo.simpleprogression";
private static Harmony _harmony;
private bool _simpleProgressionLoaded;
internal static ManualLogSource L;
public override void Load()
{
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Expected O, but got Unknown
L = ((BasePlugin)this).Log;
_simpleProgressionLoaded = ((BaseChainloader<BasePlugin>)(object)IL2CPPChainloader.Instance).Plugins.Any((KeyValuePair<string, PluginInfo> kvp) => string.Equals(kvp.Key, "dev.aurirex.gtfo.simpleprogression", StringComparison.InvariantCultureIgnoreCase));
_harmony = new Harmony("dev.aurirex.gtfo.noboosters");
PatchAll(typeof(Patches));
if (!_simpleProgressionLoaded)
{
((BasePlugin)this).Log.LogDebug((object)"Simple Progression is not loaded, patching like usual.");
PatchAll(typeof(PersistentInventoryManager_Patches));
}
((BasePlugin)this).Log.LogInfo((object)"Loaded and patched!");
}
private static void PatchAll(Type type)
{
Type[] nestedTypes = type.GetNestedTypes();
foreach (Type type2 in nestedTypes)
{
_harmony.PatchAll(type2);
}
}
}
internal class Patches
{
[HarmonyPriority(0)]
[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);
}
}
[HarmonyPriority(0)]
[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;
}
}
[HarmonyPriority(0)]
[HarmonyPatch(typeof(PUI_BoosterDetails), "SetupBoosterDetails")]
public static class PUI_BoosterDetails_SetupBoosterDetails_Patch
{
public static void Postfix(PUI_BoosterDetails __instance)
{
((Component)__instance).gameObject.SetActive(false);
}
}
[HarmonyPriority(0)]
[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;
}
}
}
internal class PersistentInventoryManager_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;
}
}
}