using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using LethalLevelLoader.AssetBundles;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: IgnoresAccessChecksTo("LethalLevelLoader")]
[assembly: AssemblyCompany("LLLHotreloadPatch")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Tries to prevent errors when loading scenes on new sessions in LLL")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+83b0c15ae5cf89bb103310baa24f9d79794dc8f6")]
[assembly: AssemblyProduct("LLLHotreloadPatch")]
[assembly: AssemblyTitle("LLLHotreloadPatch")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace LLLHotreloadPatch
{
[BepInPlugin("dopadream.lethalcompany.LLLHotreloadPatch", "LLLHotreloadPatch", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
private const string PLUGIN_GUID = "dopadream.lethalcompany.LLLHotreloadPatch";
private const string PLUGIN_NAME = "LLLHotreloadPatch";
private const string PLUGIN_VERSION = "1.0.0";
internal static ManualLogSource Logger;
private void Awake()
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
Logger = ((BaseUnityPlugin)this).Logger;
new Harmony("dopadream.lethalcompany.LLLHotreloadPatch").PatchAll();
Logger.LogInfo((object)"LLLHotreloadPatch v1.0.0 loaded");
}
}
[HarmonyPatch]
internal class LLLHotreloadPatches
{
[HarmonyPatch(typeof(StartOfRound), "OnLocalDisconnect")]
[HarmonyPostfix]
private static void StartOfRoundOnLocalDisconnectPostfix()
{
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
Plugin.Logger.LogDebug((object)$"whatever currentClientId is: {NetworkManager.Singleton.LocalClientId}");
Plugin.Logger.LogDebug((object)$"AssetBundleInfos count: {AssetBundleLoader.instance.AssetBundleInfos.Count})");
foreach (AssetBundleInfo assetBundleInfo in AssetBundleLoader.instance.AssetBundleInfos)
{
Plugin.Logger.LogDebug((object)$"AssetBundleInfo: {assetBundleInfo}");
Plugin.Logger.LogDebug((object)$"AssetBundle: {assetBundleInfo.assetBundle}");
Plugin.Logger.LogDebug((object)$"Active Loading Status: {assetBundleInfo.ActiveLoadingStatus}");
assetBundleInfo.TryUnloadBundle();
}
}
[HarmonyPatch(typeof(QuickMenuManager), "Start")]
[HarmonyPostfix]
private static void JoinOrStartLobbyPostfix()
{
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
Plugin.Logger.LogDebug((object)$"whatever currentClientId is: {NetworkManager.Singleton.LocalClientId}");
Plugin.Logger.LogDebug((object)$"AssetBundleInfos count: {AssetBundleLoader.instance.AssetBundleInfos.Count})");
foreach (AssetBundleInfo assetBundleInfo in AssetBundleLoader.instance.AssetBundleInfos)
{
Plugin.Logger.LogDebug((object)$"AssetBundleInfo: {assetBundleInfo}");
Plugin.Logger.LogDebug((object)$"AssetBundle: {assetBundleInfo.assetBundle}");
Plugin.Logger.LogDebug((object)$"Active Loading Status: {assetBundleInfo.ActiveLoadingStatus}");
assetBundleInfo.TryLoadBundle();
}
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "LLLHotreloadPatch";
public const string PLUGIN_NAME = "LLLHotreloadPatch";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}