using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("UnfairExtendedShops")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("UnfairExtendedShops")] [assembly: AssemblyTitle("UnfairExtendedShops")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 UnfairExtendedShops { [BepInPlugin("com.raef.unfairflips.extendedshop", "Unfair Extended Shops", "1.0.0")] public class Plugin : BaseUnityPlugin { public const string PluginGuid = "com.raef.unfairflips.extendedshop"; public const string PluginName = "Unfair Extended Shops"; public const string PluginVersion = "1.0.0"; internal static ManualLogSource Log; private void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; Harmony val = new Harmony("com.raef.unfairflips.extendedshop"); val.PatchAll(); Log.LogInfo((object)"Unfair Extended Shops loaded."); } } [HarmonyPatch(typeof(ShopButton), "Start")] internal static class ShopButtonStartPatch { private static void Postfix(ShopButton __instance) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Invalid comparison between Unknown and I4 FieldInfo fieldInfo = AccessTools.Field(typeof(ShopButton), "costs"); long[] array = (long[])fieldInfo.GetValue(__instance); if ((int)__instance.upgradeType != 3) { long[] array2 = new long[array.Length + 20]; for (int i = 0; i < array.Length; i++) { array2[i] = array[i]; } for (int j = array.Length; j < array2.Length; j++) { long num = array2[j - 1]; array2[j] = num * 2; } fieldInfo.SetValue(__instance, array2); } } } }