using System; using System.Diagnostics; using System.Linq; 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 Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("IronStash")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Stash those lockers")] [assembly: AssemblyFileVersion("0.1.5.0")] [assembly: AssemblyInformationalVersion("0.1.5+335bd7502cbc31305e767bfaa1d3d2e422ecb331")] [assembly: AssemblyProduct("IronStash")] [assembly: AssemblyTitle("IronStash")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.1.5.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 IronStash { [BepInPlugin("dotlake.IronStash", "IronStash", "0.1.5")] public class Plugin : BaseUnityPlugin { public static ManualLogSource Logger; public void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown Logger = ((BaseUnityPlugin)this).Logger; Harmony val = new Harmony("dotlake.ironstash"); val.PatchAll(); Logger.LogInfo((object)"dotlake.IronStash is loaded"); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "dotlake.IronStash"; public const string PLUGIN_NAME = "IronStash"; public const string PLUGIN_VERSION = "0.1.5"; } } namespace IronStash.Patches { [HarmonyPatch(typeof(CL_GameManager), "LoadIn")] public class AddStash { [HarmonyPostfix] public static void Postfix(CL_GameManager __instance) { string[] source = new string[4] { "item_injector", "item_pillbottle", "denizen_sluggrub", "item_food_bar" }; if (!CL_GameManager.GetBaseGamemode().IsIronKnuckle() || CL_GameManager.GetBaseGamemode().isEndless) { return; } for (int i = 0; i < SettingsManager.settings.competitiveSettings.lockerItems.Count; i++) { Item_Object itemObjectPrefab = CL_AssetManager.GetItemObjectPrefab(SettingsManager.settings.competitiveSettings.lockerItems[i], ""); if ((Object)(object)itemObjectPrefab != (Object)null && source.Contains(((Object)itemObjectPrefab).name.ToLower())) { string text = SettingsManager.settings.competitiveSettings.lockerItems[i]; CL_GameManager.SetGameFlag("equiplocker-" + CL_GameManager.GetBaseGamemode().GetGamemodeName(true) + "local" + (i + 1), true, text, false, false); } } } } }