using System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using PluginConfig.API; using PluginConfig.API.Decorators; using PluginConfig.API.Fields; using TMPro; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("ULTRAGYATT")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+375b345acd98c20ce2838d4d5f3ca10759a5dcb3")] [assembly: AssemblyProduct("ULTRAGYATT")] [assembly: AssemblyTitle("ULTRAGYATT")] [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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [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 ULTRAGYATT { [BepInPlugin("com.github.end-4.ultragyatt", "ULTRAGYATT", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { [HarmonyPatch(typeof(Enemy), "GetHurt")] public class GroundSlamInstakillPatch { private static bool Prefix(EnemyIdentifier ___eid, ref float multiplier) { if (!modEnabled.value) { return true; } if ((Object)(object)___eid != (Object)null && ___eid.hitter == "ground slam") { multiplier = slamDamageMultiplier.value; MonoSingleton.Instance.cheatsEnabled = true; } return true; } } internal static ManualLogSource? Log; public static string workingPath = Assembly.GetExecutingAssembly().Location; public static string workingDir = Path.GetDirectoryName(workingPath); public const string PluginGUID = "com.github.end-4.ultragyatt"; public const string PluginName = "ULTRAGYATT"; public const string PluginVersion = "1.0.0"; internal static PluginConfigurator config; public static BoolField modEnabled; public static FloatField slamDamageMultiplier; private void CreateConfig() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown config = PluginConfigurator.Create("ULTRAGYATT", "com.github.end-4.ultragyatt"); string text = Path.Combine(workingDir, "icon.png"); if (File.Exists(text)) { config.SetIconWithURL(text); } new ConfigHeader(config.rootPanel, "", 10); new ConfigHeader(config.rootPanel, "-- ULTRAGYATT --", 22); new ConfigHeader(config.rootPanel, "Score submissions are disabled if you have this mod enabled and damage enemies with a ground slam. To enable score submissions, disable the mod and restart the level.", 16, (TextAlignmentOptions)513); modEnabled = new BoolField(config.rootPanel, "Enable", "enable", true); slamDamageMultiplier = new FloatField(config.rootPanel, "Slam damage multiplier", "slamDamageMultiplier", 99999f); } private void Awake() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; CreateConfig(); new Harmony("ULTRAGYATT").PatchAll(); Log.LogInfo((object)"ULTRAGYATT loaded!"); } } }