Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Hyper Modded Company v1.0.3
BepInEx/plugins/HypermoddedTeam.HyperModded.dll
Decompiled a year agousing System; using System.Collections; using System.Collections.Generic; 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.Bootstrap; using BepInEx.Logging; using HarmonyLib; using HyperModded.Utils; using Microsoft.CodeAnalysis; using TMPro; using UnityEngine; using UnityEngine.UI; [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("HypermoddedTeam.HyperModded")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.1.0")] [assembly: AssemblyInformationalVersion("1.0.1")] [assembly: AssemblyProduct("HyperModded")] [assembly: AssemblyTitle("HypermoddedTeam.HyperModded")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.1.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.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] [Microsoft.CodeAnalysis.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] [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 BuffCompany.Patches { [HarmonyPatch(typeof(BaboonBirdAI), "Start")] internal class BaboonBirdPatch { private static void Prefix(BaboonBirdAI __instance) { ((EnemyAI)__instance).enemyHP = ((EnemyAI)__instance).enemyHP + (((EnemyAI)__instance).enemyHP / 4 + 1); } } [HarmonyPatch(typeof(ButlerEnemyAI), "Start")] internal class ButlerEnemyStartPatch { private static void Postfix(ButlerEnemyAI __instance) { ((EnemyAI)__instance).enemyHP = ((EnemyAI)__instance).enemyHP + (((EnemyAI)__instance).enemyHP / 4 + 4); __instance.idleMovementSpeedBase = 3.5f; } } [HarmonyPatch(typeof(CentipedeAI), "HitEnemy")] internal class CentipedeHitPatch { private static void Prefix(CentipedeAI __instance) { ((EnemyAI)__instance).enemyHP = ((EnemyAI)__instance).enemyHP + (((EnemyAI)__instance).enemyHP / 3 + 1); } } [HarmonyPatch(typeof(CentipedeAI), "Start")] internal class CentipedeStartPatch { private static void Prefix(CentipedeAI __instance) { ((EnemyAI)__instance).enemyHP = ((EnemyAI)__instance).enemyHP + (((EnemyAI)__instance).enemyHP / 3 + 2); __instance.singlePlayerSecondChanceGiven = true; } } [HarmonyPatch(typeof(CrawlerAI), "Start")] internal class CrawlerPatch { private static void Prefix(CrawlerAI __instance) { ((EnemyAI)__instance).enemyHP = ((EnemyAI)__instance).enemyHP + (((EnemyAI)__instance).enemyHP / 4 + 1); } } [HarmonyPatch(typeof(ForestGiantAI), "HitEnemy")] internal class ForestGiantPatch { private static void Prefix(ForestGiantAI __instance) { ((EnemyAI)__instance).enemyHP = 38; } } [HarmonyPatch(typeof(HoarderBugAI), "Start")] internal class HoarderBugPatch { private static void Prefix(HoarderBugAI __instance) { ((EnemyAI)__instance).enemyHP = 5; } } [HarmonyPatch(typeof(MaskedPlayerEnemy), "Start")] internal class MaskedPlayerEnemyPatch { private static void Prefix(MaskedPlayerEnemy __instance) { ((EnemyAI)__instance).enemyHP = ((EnemyAI)__instance).enemyHP + (((EnemyAI)__instance).enemyHP / 4 + 1); } } [HarmonyPatch(typeof(NutcrackerEnemyAI), "Start")] internal class NutcrackerPatch { private static void Prefix(NutcrackerEnemyAI __instance) { ((EnemyAI)__instance).enemyHP = ((EnemyAI)__instance).enemyHP + (((EnemyAI)__instance).enemyHP / 7 + 1); } } [HarmonyPatch(typeof(SandSpiderAI), "Start")] internal class SandSpiderPatch { private static void Prefix(SandSpiderAI __instance) { ((EnemyAI)__instance).enemyHP = ((EnemyAI)__instance).enemyHP + (((EnemyAI)__instance).enemyHP / 8 + 1); } } } namespace HyperModded { [BepInPlugin("HypermoddedTeam.HyperModded", "HyperModded", "1.0.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class HyperModded : BaseUnityPlugin { public static HyperModded Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } internal static Harmony? Harmony { get; set; } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Instance = this; Patch(); Logger.LogInfo((object)"HypermoddedTeam.HyperModded v1.0.1 has loaded!"); } internal static void Patch() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown if (Harmony == null) { Harmony = new Harmony("HypermoddedTeam.HyperModded"); } Logger.LogDebug((object)"Patching..."); Harmony.PatchAll(); Logger.LogDebug((object)"Finished patching!"); } internal static void Unpatch() { Logger.LogDebug((object)"Unpatching..."); Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } Logger.LogDebug((object)"Finished unpatching!"); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "HypermoddedTeam.HyperModded"; public const string PLUGIN_NAME = "HyperModded"; public const string PLUGIN_VERSION = "1.0.1"; } } namespace HyperModded.Utils { internal static class MenusUtils { internal static void InjectMenu(MenuManager __instance) { Transform transform = __instance.menuButtons.transform; if (!Object.op_Implicit((Object)(object)transform)) { return; } Transform val = transform.Find("VersionNumberText"); if (!((Object)(object)val == (Object)null)) { TextMeshProUGUI component = ((Component)val).GetComponent<TextMeshProUGUI>(); if (!((Object)(object)component == (Object)null)) { ((TMP_Text)component).text = ""; ((Behaviour)component).enabled = false; ((TMP_Text)component).fontSize = 0f; Debug.Log((object)"InfoTweaksRemover: Successfully modified VersionNumberText!"); } } } } } namespace HyperModded.Patches { [HarmonyPatch(typeof(MenuManager))] internal class MenuManagerPatches { [HarmonyPatch("Start")] [HarmonyPostfix] public static void StartPostFix(MenuManager __instance) { ((MonoBehaviour)__instance).StartCoroutine(DelayedMainMenuInjection(__instance)); } private static IEnumerator DelayedMainMenuInjection(MenuManager __instance) { yield return (object)new WaitForSeconds(0.01f); InjectToMainMenu(__instance); } private static void InjectToMainMenu(MenuManager __instance) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) MenusUtils.InjectMenu(__instance); GameObject val = new GameObject("ModCountText"); val.transform.SetParent(__instance.menuButtons.transform.parent, false); TextMeshProUGUI val2 = val.AddComponent<TextMeshProUGUI>(); ((TMP_Text)val2).fontSize = 18f; ((TMP_Text)val2).enableWordWrapping = false; ((TMP_Text)val2).overflowMode = (TextOverflowModes)0; ((TMP_Text)val2).alignment = (TextAlignmentOptions)257; TMP_FontAsset val3 = ((IEnumerable<TMP_FontAsset>)Resources.FindObjectsOfTypeAll<TMP_FontAsset>()).FirstOrDefault((Func<TMP_FontAsset, bool>)((TMP_FontAsset f) => ((Object)f).name.Contains("3270-Regular"))); if (Object.op_Implicit((Object)(object)val3)) { ((TMP_Text)val2).font = val3; } RectTransform component = val.GetComponent<RectTransform>(); component.anchorMin = new Vector2(0f, 1f); component.anchorMax = new Vector2(0f, 1f); component.pivot = new Vector2(0f, 0.9f); component.anchoredPosition = new Vector2(0f, -18f); ((Graphic)val2).color = new Color(1f, 0f, 0.1f, 0.8f); ((TMP_Text)val2).text = $"Mods: {Chainloader.PluginInfos.Count}"; } } }