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 StageScale v1.1.3
StageScale.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; 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.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.Missions.BrotherEncounter; using HG.Reflection; using HarmonyLib; using IL.RoR2; using KinematicCharacterController; using Logger; using Md.UmbralMithrix.EntityStates.ChannelUmbralUlt; using Md.UmbralMithrix.MissionHooks; using Md.UmbralMithrix.MithrixMiscHooks; using Md.UmbralMithrix.P4Controller; using Md.UmbralMithrix.UmbralMissionController; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoDetour; using MonoDetour.Cil; using MonoDetour.DetourTypes; using MonoDetour.HookGen; using MonoMod.Cil; using MonoMod.RuntimeDetour; using MonoMod.Utils; using On.EntityStates; using On.EntityStates.BrotherMonster; using On.EntityStates.Missions.BrotherEncounter; using On.RoR2; using On.RoR2.Navigation; using On.RoR2.Projectile; using R2API; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Navigation; using RoR2.Projectile; using RoR2BepInExPack.GameAssetPathsBetter; using UmbralMithrix; using UmbralMithrix.EntityStates; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("StageScale")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+e9f00449f87f1a140736f6e9b2f09f95ef0b6bff")] [assembly: AssemblyProduct("StageScale")] [assembly: AssemblyTitle("StageScale")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [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 Md.UmbralMithrix.EntityStates.ChannelUmbralUlt { internal static class OnEnter { public delegate void PrefixSignature(ChannelUmbralUlt self); public delegate void PostfixSignature(ChannelUmbralUlt self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(ChannelUmbralUlt); MethodInfo method = typeFromHandle.GetMethod("OnEnter", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", "OnEnter"); } return method; } } internal static class FireWave { public delegate void PrefixSignature(ChannelUmbralUlt self); public delegate void PostfixSignature(ChannelUmbralUlt self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(ChannelUmbralUlt); MethodInfo method = typeFromHandle.GetMethod("FireWave", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", "FireWave"); } return method; } } internal static class FixedUpdate { public delegate void PrefixSignature(ChannelUmbralUlt self); public delegate void PostfixSignature(ChannelUmbralUlt self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(ChannelUmbralUlt); MethodInfo method = typeFromHandle.GetMethod("FixedUpdate", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", "FixedUpdate"); } return method; } } internal static class OnExit { public delegate void PrefixSignature(ChannelUmbralUlt self); public delegate void PostfixSignature(ChannelUmbralUlt self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(ChannelUmbralUlt); MethodInfo method = typeFromHandle.GetMethod("OnExit", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", "OnExit"); } return method; } } internal static class _ctor { public delegate void PrefixSignature(ChannelUmbralUlt self); public delegate void PostfixSignature(ChannelUmbralUlt self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(ChannelUmbralUlt); ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)constructor == null) { throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", ".ctor"); } return constructor; } } internal static class _cctor { public delegate void PrefixSignature(); public delegate void PostfixSignature(); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(ChannelUmbralUlt); ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)constructor == null) { throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", ".cctor"); } return constructor; } } } namespace Md.UmbralMithrix.MithrixMiscHooks { internal static class _ctor { public delegate void PrefixSignature(MithrixMiscHooks self); public delegate void PostfixSignature(MithrixMiscHooks self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MithrixMiscHooks); ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)constructor == null) { throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", ".ctor"); } return constructor; } } internal static class PreventTempItemSteal { public delegate void PrefixSignature(MithrixMiscHooks self, ref orig_InitItemStealer orig, ref SpellBaseState self1); public delegate void PostfixSignature(MithrixMiscHooks self, ref orig_InitItemStealer orig, ref SpellBaseState self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MithrixMiscHooks); MethodInfo method = typeFromHandle.GetMethod("PreventTempItemSteal", (BindingFlags)(-1), null, new Type[2] { typeof(orig_InitItemStealer), typeof(SpellBaseState) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", "PreventTempItemSteal"); } return method; } } internal static class SkyLeapDeathState_OnEnter { public delegate void PrefixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref SkyLeapDeathState self1); public delegate void PostfixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref SkyLeapDeathState self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MithrixMiscHooks); MethodInfo method = typeFromHandle.GetMethod("SkyLeapDeathState_OnEnter", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnEnter), typeof(SkyLeapDeathState) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", "SkyLeapDeathState_OnEnter"); } return method; } } internal static class SpellChannelExitState_OnEnter { public delegate void PrefixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref SpellChannelExitState self1); public delegate void PostfixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref SpellChannelExitState self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MithrixMiscHooks); MethodInfo method = typeFromHandle.GetMethod("SpellChannelExitState_OnEnter", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnEnter), typeof(SpellChannelExitState) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", "SpellChannelExitState_OnEnter"); } return method; } } internal static class StaggerEnter_OnEnter { public delegate void PrefixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref StaggerEnter self1); public delegate void PostfixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref StaggerEnter self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MithrixMiscHooks); MethodInfo method = typeFromHandle.GetMethod("StaggerEnter_OnEnter", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnEnter), typeof(StaggerEnter) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", "StaggerEnter_OnEnter"); } return method; } } internal static class TrueDeathState_OnEnter { public delegate void PrefixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref TrueDeathState self1); public delegate void PostfixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref TrueDeathState self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MithrixMiscHooks); MethodInfo method = typeFromHandle.GetMethod("TrueDeathState_OnEnter", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnEnter), typeof(TrueDeathState) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", "TrueDeathState_OnEnter"); } return method; } } internal static class __c { internal static class _cctor { public delegate void PrefixSignature(); public delegate void PostfixSignature(); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type type = Type.GetType("UmbralMithrix.MithrixMiscHooks+<>c, UmbralMithrix"); if ((object)type == null) { throw new Exception("Missing Type: 'UmbralMithrix.MithrixMiscHooks+<>c'"); } ConstructorInfo constructor = type.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)constructor == null) { throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks+<>c", ".cctor"); } return constructor; } } internal static class _ctor { public delegate void PrefixSignature(object self); public delegate void PostfixSignature(object self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type type = Type.GetType("UmbralMithrix.MithrixMiscHooks+<>c, UmbralMithrix"); if ((object)type == null) { throw new Exception("Missing Type: 'UmbralMithrix.MithrixMiscHooks+<>c'"); } ConstructorInfo constructor = type.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)constructor == null) { throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks+<>c", ".ctor"); } return constructor; } } internal static class _StaggerEnter_OnEnter_b__4_0 { public delegate void PrefixSignature(object self, ref SpawnResult spawnResult); public delegate void PostfixSignature(object self, ref SpawnResult spawnResult); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type type = Type.GetType("UmbralMithrix.MithrixMiscHooks+<>c, UmbralMithrix"); if ((object)type == null) { throw new Exception("Missing Type: 'UmbralMithrix.MithrixMiscHooks+<>c'"); } MethodInfo method = type.GetMethod("<StaggerEnter_OnEnter>b__4_0", (BindingFlags)(-1), null, new Type[1] { typeof(SpawnResult) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks+<>c", "<StaggerEnter_OnEnter>b__4_0"); } return method; } } } } namespace Md.UmbralMithrix.UmbralMissionController { internal static class Start { public delegate void PrefixSignature(UmbralMissionController self); public delegate void PostfixSignature(UmbralMissionController self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(UmbralMissionController); MethodInfo method = typeFromHandle.GetMethod("Start", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.UmbralMissionController", "Start"); } return method; } } internal static class _ctor { public delegate void PrefixSignature(UmbralMissionController self); public delegate void PostfixSignature(UmbralMissionController self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(UmbralMissionController); ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)constructor == null) { throw new MissingMethodException("UmbralMithrix.UmbralMissionController", ".ctor"); } return constructor; } } } namespace Md.UmbralMithrix.P4Controller { internal static class Start { public delegate void PrefixSignature(P4Controller self); public delegate void PostfixSignature(P4Controller self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(P4Controller); MethodInfo method = typeFromHandle.GetMethod("Start", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.P4Controller", "Start"); } return method; } } internal static class OnEnable { public delegate void PrefixSignature(P4Controller self); public delegate void PostfixSignature(P4Controller self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(P4Controller); MethodInfo method = typeFromHandle.GetMethod("OnEnable", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.P4Controller", "OnEnable"); } return method; } } internal static class OnDisable { public delegate void PrefixSignature(P4Controller self); public delegate void PostfixSignature(P4Controller self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(P4Controller); MethodInfo method = typeFromHandle.GetMethod("OnDisable", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.P4Controller", "OnDisable"); } return method; } } internal static class FixedUpdate { public delegate void PrefixSignature(P4Controller self); public delegate void PostfixSignature(P4Controller self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(P4Controller); MethodInfo method = typeFromHandle.GetMethod("FixedUpdate", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.P4Controller", "FixedUpdate"); } return method; } } internal static class onBodyStartGlobal { public delegate void PrefixSignature(P4Controller self, ref CharacterBody body); public delegate void PostfixSignature(P4Controller self, ref CharacterBody body); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(P4Controller); MethodInfo method = typeFromHandle.GetMethod("onBodyStartGlobal", (BindingFlags)(-1), null, new Type[1] { typeof(CharacterBody) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.P4Controller", "onBodyStartGlobal"); } return method; } } internal static class onBodyDestroyGlobal { public delegate void PrefixSignature(P4Controller self, ref CharacterBody body); public delegate void PostfixSignature(P4Controller self, ref CharacterBody body); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(P4Controller); MethodInfo method = typeFromHandle.GetMethod("onBodyDestroyGlobal", (BindingFlags)(-1), null, new Type[1] { typeof(CharacterBody) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.P4Controller", "onBodyDestroyGlobal"); } return method; } } internal static class handlePlayerBody { public delegate void PrefixSignature(P4Controller self, ref CharacterBody playerBody); public delegate void PostfixSignature(P4Controller self, ref CharacterBody playerBody); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(P4Controller); MethodInfo method = typeFromHandle.GetMethod("handlePlayerBody", (BindingFlags)(-1), null, new Type[1] { typeof(CharacterBody) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.P4Controller", "handlePlayerBody"); } return method; } } internal static class _ctor { public delegate void PrefixSignature(P4Controller self); public delegate void PostfixSignature(P4Controller self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(P4Controller); ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)constructor == null) { throw new MissingMethodException("UmbralMithrix.P4Controller", ".ctor"); } return constructor; } } } namespace Md.UmbralMithrix.MissionHooks { internal static class _ctor { public delegate void PrefixSignature(MissionHooks self); public delegate void PostfixSignature(MissionHooks self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MissionHooks); ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)constructor == null) { throw new MissingMethodException("UmbralMithrix.MissionHooks", ".ctor"); } return constructor; } } internal static class Phase1OnEnter { public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase1 self1); public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase1 self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MissionHooks); MethodInfo method = typeFromHandle.GetMethod("Phase1OnEnter", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnEnter), typeof(Phase1) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MissionHooks", "Phase1OnEnter"); } return method; } } internal static class Phase2OnEnter { public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase2 self1); public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase2 self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MissionHooks); MethodInfo method = typeFromHandle.GetMethod("Phase2OnEnter", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnEnter), typeof(Phase2) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MissionHooks", "Phase2OnEnter"); } return method; } } internal static class Phase3OnEnter { public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase3 self1); public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase3 self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MissionHooks); MethodInfo method = typeFromHandle.GetMethod("Phase3OnEnter", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnEnter), typeof(Phase3) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MissionHooks", "Phase3OnEnter"); } return method; } } internal static class Phase4OnEnter { public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase4 self1); public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase4 self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MissionHooks); MethodInfo method = typeFromHandle.GetMethod("Phase4OnEnter", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnEnter), typeof(Phase4) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MissionHooks", "Phase4OnEnter"); } return method; } } internal static class BossDeathOnEnter { public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref BossDeath self1); public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref BossDeath self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MissionHooks); MethodInfo method = typeFromHandle.GetMethod("BossDeathOnEnter", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnEnter), typeof(BossDeath) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MissionHooks", "BossDeathOnEnter"); } return method; } } internal static class BrotherEncounterPhaseBaseStateOnEnter { public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref BrotherEncounterPhaseBaseState self1); public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref BrotherEncounterPhaseBaseState self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(MissionHooks); MethodInfo method = typeFromHandle.GetMethod("BrotherEncounterPhaseBaseStateOnEnter", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnEnter), typeof(BrotherEncounterPhaseBaseState) }, null); if ((object)method == null) { throw new MissingMethodException("UmbralMithrix.MissionHooks", "BrotherEncounterPhaseBaseStateOnEnter"); } return method; } } } namespace MonoDetour.HookGen { internal static class DefaultMonoDetourManager { internal static MonoDetourManager Instance { get; } = New(); internal static MonoDetourManager New() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown return new MonoDetourManager(typeof(DefaultMonoDetourManager).Assembly.GetName().Name); } } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, AllowMultiple = true, Inherited = false)] internal class MonoDetourTargetsAttribute(Type? targetType = null) : Attribute(), IMonoDetourTargets { public Type? TargetType { get; } = targetType; public bool IncludeNestedTypes { get; set; } = true; public string[]? Members { get; set; } public string[]? MemberNamePrefixes { get; set; } public string[]? MemberNameSuffixes { get; set; } public bool GenerateControlFlowVariants { get; set; } } } namespace Logger { internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } } namespace StageScale { public class SceneDefOrder : IComparer { public int Compare(object x, object y) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return ((SceneDef)x).stageOrder - ((SceneDef)y).stageOrder; } } [BepInDependency(/*Could not decode attribute arguments.*/)] public static class Options { public static bool IsEnabled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); [SystemInitializer(new Type[] { typeof(SceneCatalog) })] public static void Init() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) StageScale.ScaleInteractables = ((BaseUnityPlugin)StageScale.Instance).Config.Bind<bool>("General", "Scale Interactables", true, "If enabled, scales interactables with the world size"); StageScale.ScaleEnemies = ((BaseUnityPlugin)StageScale.Instance).Config.Bind<bool>("General", "Scale Enemies", true, "If enabled, scales enemies with the world size"); List<SceneDef> source = new List<SceneDef>((IEnumerable<SceneDef>)(object)SceneCatalog.allSceneDefs); foreach (SceneDef item in source.OrderBy((SceneDef x) => x.stageOrder)) { string text = Language.GetString(item.nameToken); if (!StageScale.StageScales.ContainsKey(text) && item.stageOrder > 0 && text.Length != 0) { string text2 = "Stage " + item.stageOrder; if (item.stageOrder > 6) { text2 = "Bonus Stage"; } StageScale.StageScales.Add(text, ((BaseUnityPlugin)StageScale.Instance).Config.Bind<float>(text2, text.Replace("'", ""), 1f, "The scale of " + text.Replace("'", ""))); } } if (IsEnabled) { RiskOfOptionsConfig(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void RiskOfOptionsConfig() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(StageScale.ScaleInteractables), "Onyx.StageScale", "StageScale"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(StageScale.ScaleEnemies), "Onyx.StageScale", "StageScale"); foreach (KeyValuePair<string, ConfigEntry<float>> stageScale in StageScale.StageScales) { ModSettingsManager.AddOption((BaseOption)new SliderOption(stageScale.Value, new SliderConfig { min = 0.1f, max = 10f, FormatString = "{0:0.##}x" }), "Onyx.StageScale", "StageScale"); } ModSettingsManager.SetModDescription("Options for StageScale", "Onyx.StageScale", "StageScale"); FileInfo fileInfo = null; DirectoryInfo directoryInfo = new DirectoryInfo(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); do { FileInfo[] files = directoryInfo.GetFiles("icon.png", SearchOption.TopDirectoryOnly); if (files != null && files.Length != 0) { fileInfo = files[0]; break; } directoryInfo = directoryInfo.Parent; } while (directoryInfo != null && directoryInfo.Exists && !string.Equals(directoryInfo.Name, "plugins", StringComparison.OrdinalIgnoreCase)); if (fileInfo != null) { Texture2D val = new Texture2D(256, 256); if (ImageConversion.LoadImage(val, File.ReadAllBytes(fileInfo.FullName))) { Sprite val2 = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f)); ((Object)val2).name = "StageScaleIcon"; ModSettingsManager.SetModIcon(val2, "Onyx.StageScale", "StageScale"); } } } } internal static class EnemyScale { [CompilerGenerated] private static class <>O { public static hook_Fire_FireArgs <0>__BulletAttack_Fire_FireArgs; public static hook_UpdateAnimationParameters <1>__UpdateAnimationParameters; public static hook_OnCharacterHitGroundServer <2>__OnCharacterHitGroundServer; public static hook_Respawn_Vector3_Quaternion_bool <3>__Respawn_Vector3_Quaternion_bool; public static hook_CollectHits <4>__BlastAttack_CollectHits; public static hook_InitializeProjectile <5>__InitializeProjectile; } [SystemInitializer(new Type[] { })] private static void Init() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown object obj = <>O.<0>__BulletAttack_Fire_FireArgs; if (obj == null) { hook_Fire_FireArgs val = BulletAttack_Fire_FireArgs; <>O.<0>__BulletAttack_Fire_FireArgs = val; obj = (object)val; } BulletAttack.Fire_FireArgs += (hook_Fire_FireArgs)obj; object obj2 = <>O.<1>__UpdateAnimationParameters; if (obj2 == null) { hook_UpdateAnimationParameters val2 = UpdateAnimationParameters; <>O.<1>__UpdateAnimationParameters = val2; obj2 = (object)val2; } BaseCharacterMain.UpdateAnimationParameters += (hook_UpdateAnimationParameters)obj2; object obj3 = <>O.<2>__OnCharacterHitGroundServer; if (obj3 == null) { hook_OnCharacterHitGroundServer val3 = OnCharacterHitGroundServer; <>O.<2>__OnCharacterHitGroundServer = val3; obj3 = (object)val3; } GlobalEventManager.OnCharacterHitGroundServer += (hook_OnCharacterHitGroundServer)obj3; object obj4 = <>O.<3>__Respawn_Vector3_Quaternion_bool; if (obj4 == null) { hook_Respawn_Vector3_Quaternion_bool val4 = Respawn_Vector3_Quaternion_bool; <>O.<3>__Respawn_Vector3_Quaternion_bool = val4; obj4 = (object)val4; } CharacterMaster.Respawn_Vector3_Quaternion_bool += (hook_Respawn_Vector3_Quaternion_bool)obj4; object obj5 = <>O.<4>__BlastAttack_CollectHits; if (obj5 == null) { hook_CollectHits val5 = BlastAttack_CollectHits; <>O.<4>__BlastAttack_CollectHits = val5; obj5 = (object)val5; } BlastAttack.CollectHits += (hook_CollectHits)obj5; object obj6 = <>O.<5>__InitializeProjectile; if (obj6 == null) { hook_InitializeProjectile val6 = InitializeProjectile; <>O.<5>__InitializeProjectile = val6; obj6 = (object)val6; } ProjectileManager.InitializeProjectile += (hook_InitializeProjectile)obj6; } private static void InitializeProjectile(orig_InitializeProjectile orig, ProjectileController projectileController, FireProjectileInfo fireProjectileInfo) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) fireProjectileInfo.maxDistance *= StageScale.CurrentScale; orig.Invoke(projectileController, fireProjectileInfo); CharacterBody val = default(CharacterBody); if (projectileController.owner.TryGetComponent<CharacterBody>(ref val) && Object.op_Implicit((Object)(object)val.master) && Object.op_Implicit((Object)(object)((Component)val.master).transform.Find("NetworkedScaler(Clone)")) && !StageScale.ScaleBlacklist.Contains(((Object)fireProjectileInfo.projectilePrefab).name)) { ((MonoBehaviour)StageScale.Instance).StartCoroutine(NetworkedScaler.AttachLater(((Component)projectileController).transform)); } } private static void BulletAttack_Fire_FireArgs(orig_Fire_FireArgs orig, BulletAttack self, FireArgs args) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)self.owner) && self.owner.TryGetComponent<CharacterBody>(ref val) && Object.op_Implicit((Object)(object)val.master) && NetworkedScaler.hasScaler(((Component)val.master).transform)) { self.radius *= StageScale.CurrentScale; self.maxDistance *= StageScale.CurrentScale; } orig.Invoke(self, args); } private static HitPoint[] BlastAttack_CollectHits(orig_CollectHits orig, BlastAttack self) { CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)self.attacker) && self.attacker.TryGetComponent<CharacterBody>(ref val) && Object.op_Implicit((Object)(object)val.master) && NetworkedScaler.hasScaler(((Component)val.master).transform)) { self.radius *= StageScale.CurrentScale; } return orig.Invoke(self); } private static CharacterBody Respawn_Vector3_Quaternion_bool(orig_Respawn_Vector3_Quaternion_bool orig, CharacterMaster self, Vector3 footPosition, Quaternion rotation, bool wasRevivedMidStage) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = orig.Invoke(self, footPosition, rotation, wasRevivedMidStage); if (Object.op_Implicit((Object)(object)val.master) && !val.isPlayerControlled && StageScale.ScaleEnemies.Value) { NetworkedScaler.Attach(((Component)val.master).transform); } return val; } private static void UpdateAnimationParameters(orig_UpdateAnimationParameters orig, BaseCharacterMain self) { orig.Invoke(self); if (!self.useRootMotion && self.characterAnimParamAvailability.walkSpeed && Object.op_Implicit((Object)(object)((EntityState)self).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)self).characterBody.master) && NetworkedScaler.hasScaler(((Component)((EntityState)self).characterBody.master).transform)) { self.modelAnimator.SetFloat(AnimationParameters.walkSpeed, ((EntityState)self).characterMotor.walkSpeed / StageScale.CurrentScale); } } private static void OnCharacterHitGroundServer(orig_OnCharacterHitGroundServer orig, GlobalEventManager self, CharacterBody characterBody, HitGroundInfo hitGroundInfo) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)characterBody.master) && Object.op_Implicit((Object)(object)((Component)characterBody.master).transform.Find("NetworkedScaler(Clone)"))) { ref Vector3 velocity = ref hitGroundInfo.velocity; velocity /= StageScale.CurrentScale; } orig.Invoke(self, characterBody, hitGroundInfo); } } public class NetworkedScaler : NetworkBehaviour { [CompilerGenerated] private static class <>O { public static Manipulator <0>__attachToGameObject; public static hook_CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3 <1>__CreatePickupDroplet; public static hook_Start <2>__PickupDisplay_Start; } public static GameObject NetworkedScalerPrefab; public const string NetworkedScalerName = "NetworkedScaler(Clone)"; [SystemInitializer(new Type[] { })] private static void Init() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown NetworkedScalerPrefab = PrefabAPI.CreateEmptyPrefab("NetworkedScaler(Clone)".Substring(0, "NetworkedScaler(Clone)".Length - 7), true); NetworkedScalerPrefab.AddComponent<NetworkedScaler>(); NetworkedScalerPrefab.AddComponent<NetworkParent>(); PrefabAPI.RegisterNetworkPrefab(NetworkedScalerPrefab); object obj = <>O.<0>__attachToGameObject; if (obj == null) { Manipulator val = attachToGameObject; <>O.<0>__attachToGameObject = val; obj = (object)val; } PickupDropletController.CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3 += (Manipulator)obj; object obj2 = <>O.<1>__CreatePickupDroplet; if (obj2 == null) { hook_CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3 val2 = CreatePickupDroplet; <>O.<1>__CreatePickupDroplet = val2; obj2 = (object)val2; } PickupDropletController.CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3 += (hook_CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3)obj2; object obj3 = <>O.<2>__PickupDisplay_Start; if (obj3 == null) { hook_Start val3 = PickupDisplay_Start; <>O.<2>__PickupDisplay_Start = val3; obj3 = (object)val3; } PickupDisplay.Start += (hook_Start)obj3; } private static void CreatePickupDroplet(orig_CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3 orig, CreatePickupInfo pickupInfo, Vector3 position, Vector3 velocity) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) if (StageScale.ScaleInteractables.Value) { Debug.Log((object)"droplet"); Debug.Log((object)velocity); velocity *= Mathf.Sqrt(StageScale.CurrentScale); position += Vector3.up * (StageScale.CurrentScale - 1f) * 1.5f; } orig.Invoke(pickupInfo, position, velocity); } private static void AttemptGrant(orig_AttemptGrant orig, ref GrantContext context) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(ref context); Debug.Log((object)"hi"); Debug.Log((object)context.body); Debug.Log((object)((Component)context.controller).gameObject); Debug.Log((object)context.controller.pickupDisplay); Transform transform = ((Component)context.controller).transform; transform.localScale /= Mathf.Sqrt(StageScale.CurrentScale); } private static void PickupDisplay_Start(orig_Start orig, PickupDisplay self) { orig.Invoke(self); if (StageScale.ScaleInteractables.Value && Object.op_Implicit((Object)(object)((Component)self).transform.parent)) { ((MonoBehaviour)StageScale.Instance).StartCoroutine(AttachLater(((Component)self).transform.parent)); } } public static bool hasScaler(Transform transform) { if (Object.op_Implicit((Object)(object)transform.Find("NetworkedScaler(Clone)")) || (Object.op_Implicit((Object)(object)transform.parent) && Object.op_Implicit((Object)(object)transform.parent.Find("NetworkedScaler(Clone)")))) { return true; } return false; } public static void Attach(Transform parent) { NetworkIdentity val = default(NetworkIdentity); if (NetworkServer.active && Object.op_Implicit((Object)(object)parent) && ((Component)parent).TryGetComponent<NetworkIdentity>(ref val) && !hasScaler(parent) && !StageScale.ScaleBlacklist.Contains(((Object)parent).name) && (!Object.op_Implicit((Object)(object)parent.parent) || !StageScale.ScaleBlacklist.Contains(((Object)parent.parent).name))) { GameObject val2 = Object.Instantiate<GameObject>(NetworkedScalerPrefab, parent); NetworkServer.Spawn(val2); } } public static IEnumerator AttachLater(Transform parent) { yield return (object)new WaitForFixedUpdate(); Attach(parent); } public static void attachToGameObject(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(Object), "Instantiate") })) { val.EmitDelegate<Func<GameObject, GameObject>>((Func<GameObject, GameObject>)addNetworkScaler); } else { Log.Error("Failed to find patch location"); } static GameObject addNetworkScaler(GameObject toScale) { ((MonoBehaviour)StageScale.Instance).StartCoroutine(AttachLater(toScale.transform)); return toScale; } } private void Start() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((Component)this).transform.parent)) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } Transform parent = ((Component)this).transform.parent; parent.localScale *= StageScale.CurrentScale; ProjectileController val = default(ProjectileController); if (((Component)((Component)this).transform.parent).TryGetComponent<ProjectileController>(ref val)) { val.ghost.transform.localScale = Vector3.one * StageScale.CurrentScale; } CharacterMaster master = default(CharacterMaster); if (((Component)((Component)this).transform.parent).TryGetComponent<CharacterMaster>(ref master)) { ScaleEnemy(master); } ModelLocator val2 = default(ModelLocator); if (((Component)((Component)this).transform.parent).TryGetComponent<ModelLocator>(ref val2) && val2.dontDetatchFromParent != Object.op_Implicit((Object)(object)((Component)this).transform.parent)) { Transform modelTransform = val2.modelTransform; modelTransform.localScale *= StageScale.CurrentScale; } HalcyoniteShrineInteractable val3 = default(HalcyoniteShrineInteractable); if (((Component)((Component)this).transform.parent).TryGetComponent<HalcyoniteShrineInteractable>(ref val3)) { HalcyoniteShrineInteractable obj = val3; obj.radius *= StageScale.CurrentScale; } DitherModel val4 = default(DitherModel); if (((Component)((Component)this).transform.parent).TryGetComponent<DitherModel>(ref val4)) { scaleCollider(val4.bounds); } ParticleSystem[] componentsInChildren = ((Component)((Component)this).transform.parent).GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val5 in componentsInChildren) { MainModule main = val5.main; ((MainModule)(ref main)).scalingMode = (ParticleSystemScalingMode)0; } } public static void scaleCollider(Collider collider) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) CapsuleCollider val = (CapsuleCollider)(object)((collider is CapsuleCollider) ? collider : null); if (val == null) { SphereCollider val2 = (SphereCollider)(object)((collider is SphereCollider) ? collider : null); if (val2 == null) { BoxCollider val3 = (BoxCollider)(object)((collider is BoxCollider) ? collider : null); if (val3 != null) { val3.size /= StageScale.CurrentScale; val3.center /= StageScale.CurrentScale; } } else { val2.radius /= StageScale.CurrentScale; val2.center /= StageScale.CurrentScale; } } else { val.height /= StageScale.CurrentScale; val.radius /= StageScale.CurrentScale; val.center /= StageScale.CurrentScale; } } public void ScaleEnemy(CharacterMaster master) { //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) if (!master.hasBody) { return; } CharacterBody body = master.GetBody(); ModelLocator modelLocator = body.modelLocator; if (!Object.op_Implicit((Object)(object)modelLocator)) { return; } Transform modelTransform = modelLocator.modelTransform; Transform val = null; Collider component = ((Component)body).GetComponent<Collider>(); CameraTargetParams component2 = ((Component)body).GetComponent<CameraTargetParams>(); Interactor component3 = ((Component)body).GetComponent<Interactor>(); if (Object.op_Implicit((Object)(object)modelLocator.modelTransform) && Object.op_Implicit((Object)(object)modelLocator.modelTransform.parent) && (Object)(object)modelLocator.modelTransform.parent != (Object)(object)body.transform) { val = modelLocator.modelTransform.parent; } else if (Object.op_Implicit((Object)(object)modelLocator.modelParentTransform)) { val = modelLocator.modelParentTransform; } else if (Object.op_Implicit((Object)(object)modelTransform) && modelTransform.IsChildOf(((Component)modelLocator).transform)) { val = modelTransform; } if (Mathf.Abs(1f - StageScale.CurrentScale) < Mathf.Epsilon) { return; } if (Object.op_Implicit((Object)(object)modelTransform)) { modelTransform.localScale *= StageScale.CurrentScale; } if (Object.op_Implicit((Object)(object)val)) { Transform obj = val; obj.localPosition *= StageScale.CurrentScale; } if (Object.op_Implicit((Object)(object)body.characterMotor)) { ((BaseCharacterController)body.characterMotor).Motor.SetCapsuleDimensions(body.characterMotor.capsuleRadius * StageScale.CurrentScale, body.characterMotor.capsuleHeight * StageScale.CurrentScale, body.characterMotor.capsuleYOffset * StageScale.CurrentScale); } else { scaleCollider(component); } if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.cameraPivotTransform) && (Object)(object)component2.cameraPivotTransform != (Object)(object)body.transform) { Transform cameraPivotTransform = component2.cameraPivotTransform; cameraPivotTransform.localPosition *= StageScale.CurrentScale; } if (Object.op_Implicit((Object)(object)component3)) { component3.maxInteractionDistance *= StageScale.CurrentScale; } ParticleSystem[] componentsInChildren = ((Component)body).GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val2 in componentsInChildren) { MainModule main = val2.main; ((MainModule)(ref main)).scalingMode = (ParticleSystemScalingMode)0; } if (NetworkServer.active) { body.baseMoveSpeed *= StageScale.CurrentScale; body.levelMoveSpeed *= StageScale.CurrentScale; body.baseAcceleration *= StageScale.CurrentScale; body.baseJumpPower *= StageScale.CurrentScale; body.levelJumpPower *= StageScale.CurrentScale; if (Object.op_Implicit((Object)(object)body.characterMotor)) { CharacterMotor characterMotor = body.characterMotor; characterMotor.gravityScale *= StageScale.CurrentScale; } AISkillDriver[] components = ((Component)((Component)this).transform.parent).GetComponents<AISkillDriver>(); foreach (AISkillDriver val3 in components) { val3.minDistance *= Mathf.Pow(StageScale.CurrentScale, 1f); val3.maxDistance *= Mathf.Pow(StageScale.CurrentScale, 1f); } } } } public static class NodeScale { [CompilerGenerated] private static class <>O { public static hook_FindClosestNode <0>__FindClosestNode; public static hook_FindClosestNodeWithRaycast <1>__FindClosestNodeWithRaycast; public static hook_FindNodesInRange_Vector3_float_float_HullMask_List1 <2>__FindNodesInRange_Vector3_float_float_HullMask_List1; public static hook_FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1 <3>__FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1; } [SystemInitializer(new Type[] { })] private static void Init() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown object obj = <>O.<0>__FindClosestNode; if (obj == null) { hook_FindClosestNode val = FindClosestNode; <>O.<0>__FindClosestNode = val; obj = (object)val; } NodeGraph.FindClosestNode += (hook_FindClosestNode)obj; object obj2 = <>O.<1>__FindClosestNodeWithRaycast; if (obj2 == null) { hook_FindClosestNodeWithRaycast val2 = FindClosestNodeWithRaycast; <>O.<1>__FindClosestNodeWithRaycast = val2; obj2 = (object)val2; } NodeGraph.FindClosestNodeWithRaycast += (hook_FindClosestNodeWithRaycast)obj2; object obj3 = <>O.<2>__FindNodesInRange_Vector3_float_float_HullMask_List1; if (obj3 == null) { hook_FindNodesInRange_Vector3_float_float_HullMask_List1 val3 = FindNodesInRange_Vector3_float_float_HullMask_List1; <>O.<2>__FindNodesInRange_Vector3_float_float_HullMask_List1 = val3; obj3 = (object)val3; } NodeGraph.FindNodesInRange_Vector3_float_float_HullMask_List1 += (hook_FindNodesInRange_Vector3_float_float_HullMask_List1)obj3; object obj4 = <>O.<3>__FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1; if (obj4 == null) { hook_FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1 val4 = FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1; <>O.<3>__FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1 = val4; obj4 = (object)val4; } NodeGraph.FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1 += (hook_FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1)obj4; } private static void RebuildBlockMap(orig_RebuildBlockMap orig, NodeGraph self) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 2; i++) { NodeGraph nodeGraph = SceneInfo.instance.GetNodeGraph((GraphType)i); nodeGraph.cellSize *= Mathf.Pow(StageScale.CurrentScale, 2f); Node[] nodes = nodeGraph.nodes; for (int j = 0; j < nodes.Length; j++) { ref Vector3 position = ref nodes[j].position; position *= StageScale.CurrentScale; } } orig.Invoke(self); } public static float GetMinRangeScaled(float minRange) { if (StageScale.CurrentScale < 1f) { return minRange * StageScale.CurrentScale; } return minRange; } public static float GetMaxRangeScaled(float maxRange) { if (StageScale.CurrentScale > 1f) { return maxRange * StageScale.CurrentScale; } return maxRange; } private static void FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1(orig_FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1 orig, NodeGraph self, Vector3 position, float minRange, float maxRange, HullMask hullMask, NodeFlags requiredFlags, NodeFlags forbiddenFlags, bool preventOverhead, List<NodeIndex> dest) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) minRange = GetMinRangeScaled(minRange); maxRange = GetMaxRangeScaled(maxRange); orig.Invoke(self, position, minRange, maxRange, hullMask, requiredFlags, forbiddenFlags, preventOverhead, dest); } private static void FindNodesInRange_Vector3_float_float_HullMask_List1(orig_FindNodesInRange_Vector3_float_float_HullMask_List1 orig, NodeGraph self, Vector3 position, float minRange, float maxRange, HullMask hullMask, List<NodeIndex> dest) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) minRange = GetMinRangeScaled(minRange); maxRange = GetMaxRangeScaled(maxRange); orig.Invoke(self, position, minRange, maxRange, hullMask, dest); } private static NodeIndex FindClosestNodeWithRaycast(orig_FindClosestNodeWithRaycast orig, NodeGraph self, Vector3 position, HullClassification hullClassification, float maxDistance, int maxRaycasts) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) maxDistance = GetMaxRangeScaled(maxDistance); return orig.Invoke(self, position, hullClassification, maxDistance, maxRaycasts); } private static NodeIndex FindClosestNode(orig_FindClosestNode orig, NodeGraph self, Vector3 position, HullClassification hullClassification, float maxDistance) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) maxDistance = GetMaxRangeScaled(maxDistance); return orig.Invoke(self, position, hullClassification, maxDistance); } } [BepInPlugin("Onyx.StageScale", "StageScale", "1.1.2")] public sealed class StageScale : BaseUnityPlugin { [CompilerGenerated] private static class <>O { public static hook_Start <0>__SceneDirector_Start; } public const string PluginGUID = "Onyx.StageScale"; public const string PluginAuthor = "Onyx"; public const string PluginName = "StageScale"; public const string PluginVersion = "1.1.2"; public static StageScale Instance; public static Dictionary<string, ConfigEntry<float>> StageScales = new Dictionary<string, ConfigEntry<float>>(); public static ConfigEntry<bool> ScaleInteractables; public static ConfigEntry<bool> ScaleEnemies; public static List<string> ScaleBlacklist = new List<string>(); public static GameObject Root; private static float _currentScale; public static float CurrentScale => _currentScale; public void Awake() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown Log.Init(((BaseUnityPlugin)this).Logger); Instance = SingletonHelper.Assign<StageScale>(Instance, this); object obj = <>O.<0>__SceneDirector_Start; if (obj == null) { hook_Start val = SceneDirector_Start; <>O.<0>__SceneDirector_Start = val; obj = (object)val; } SceneDirector.Start += (hook_Start)obj; JumpVolume.OnTriggerStay += new Manipulator(JumpVolume_OnTriggerStay); SceneManager.sceneLoaded += sceneLoaded; DirectorCore.TrySpawnObject += new hook_TrySpawnObject(ScaleAfterWorldLoad); SphereZone.IsInBounds += new Manipulator(IsInBounds); HoldoutZoneController.IsPointInChargingRadius += new hook_IsPointInChargingRadius(IsPointInChargingRadius); HalcyoniteShrineInteractable.Awake += new hook_Awake(HalcyoniteShrineInteractable_Awake); Interactor.FindBestInteractableObject += new hook_FindBestInteractableObject(FindBestInteractableObject); Run.HandlePlayerFirstEntryAnimation += new Manipulator(HandlePlayerFirstEntryAnimation); new ILHook((MethodBase)Extensions.GetStateMachineTarget(AccessTools.Method(typeof(OutsideInteractableLocker), "ChestLockCoroutine", (Type[])null, (Type[])null)), new Manipulator(ChestLockCoroutine)); MonoDetourManager.InvokeHookInitializers(Assembly.GetExecutingAssembly()); AssetReferenceT<GameObject> val2 = new AssetReferenceT<GameObject>(RoR2_Base_Brother.BrotherSunderWave_prefab); AsyncOperationHandle<GameObject> val3 = AssetAsyncReferenceManager<GameObject>.LoadAsset(val2, (AsyncReferenceHandleUnloadType)2); val3.Completed += delegate(AsyncOperationHandle<GameObject> x) { ScaleBlacklist.Add(((Object)x.Result).name); }; ScaleBlacklist.Add("BatteryAttachmentPoint"); } private void HandlePlayerFirstEntryAnimation(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(Transform), "get_position") })) { val.EmitDelegate<Func<Vector3, Vector3>>((Func<Vector3, Vector3>)FixDropPodLocation); } else { Log.Error("failed to find patch location"); } static Vector3 FixDropPodLocation(Vector3 position) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"HOWWWWWWWWWWWWW"); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(new Ray(position + Vector3.up * CurrentScale * 2f, Vector3.down), ref val2, 20f * CurrentScale, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { Debug.Log((object)"hitsomething"); position = ((RaycastHit)(ref val2)).point + Vector3.up; } return position; } } private void ShopTerminalBehavior_DropPickup(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(Transform), "TransformVector") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<Vector3, ShopTerminalBehavior, Vector3>>((Func<Vector3, ShopTerminalBehavior, Vector3>)fixShopDropScaling); } else { Log.Error("failed to find patch location"); } static Vector3 fixShopDropScaling(Vector3 vector, ShopTerminalBehavior self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) Vector3 val2 = ((Component)self).transform.TransformVector(self.dropVelocity); return new Vector3(val2.x / CurrentScale, self.dropVelocity.y, val2.z / CurrentScale); } } private void ChestLockCoroutine(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); int num = default(int); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(OutsideInteractableLocker), "get_radius"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(OutsideInteractableLocker), "get_radius"), (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)increaseTPRadius); } else { Log.Error("failed to find patch location"); } static float increaseTPRadius(float radius) { return radius * Mathf.Pow(CurrentScale, 2f); } } private GameObject FindBestInteractableObject(orig_FindBestInteractableObject orig, Interactor self, Ray raycastRay, float maxRaycastDistance, Vector3 overlapPosition, float overlapRadius) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (ScaleInteractables.Value) { overlapRadius *= CurrentScale; } return orig.Invoke(self, raycastRay, maxRaycastDistance, overlapPosition, overlapRadius); } private void HalcyoniteShrineInteractable_Awake(orig_Awake orig, HalcyoniteShrineInteractable self) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (ScaleInteractables.Value) { self.rewardOffset *= CurrentScale; } } private void IsInBounds(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int num = 0; int num2 = default(int); while (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(SphereZone), "radius"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(SphereZone), "radius"), (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { num++; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, SphereZone, float>>((Func<float, SphereZone, float>)fixRadius); } if (num < 1) { Log.Error("failed to find patch location"); } static float fixRadius(float radius, SphereZone self) { if (NetworkedScaler.hasScaler(((Component)self).transform)) { radius *= Mathf.Pow(CurrentScale, 2f); } return radius; } } private bool IsPointInChargingRadius(orig_IsPointInChargingRadius orig, HoldoutZoneController self, Vector3 origin, float chargingRadiusSqr, Vector3 point) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((Component)self).transform.Find("NetworkedScaler(Clone)"))) { chargingRadiusSqr *= Mathf.Pow(CurrentScale, 2f); } return orig.Invoke(self, origin, chargingRadiusSqr, point); } private void sceneLoaded(Scene scene, LoadSceneMode arg1) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)SceneCatalog.currentSceneDef) || !StageScales.TryGetValue(Language.GetString(SceneCatalog.currentSceneDef.nameToken), out var value)) { return; } _currentScale = value.Value; Root = new GameObject("StageScaleRoot"); for (int i = 0; i < 2; i++) { NodeGraph nodeGraph = SceneInfo.instance.GetNodeGraph((GraphType)i); nodeGraph.cellSize *= Mathf.Pow(CurrentScale, 2f); Node[] nodes = nodeGraph.nodes; for (int j = 0; j < nodes.Length; j++) { ref Vector3 position = ref nodes[j].position; position *= CurrentScale; } nodeGraph.RebuildBlockMap(); } } private GameObject ScaleAfterWorldLoad(orig_TrySpawnObject orig, DirectorCore self, DirectorSpawnRequest directorSpawnRequest) { GameObject val = orig.Invoke(self, directorSpawnRequest); if ((Object)(object)val != (Object)null && !(directorSpawnRequest.spawnCard is CharacterSpawnCard) && ScaleInteractables.Value) { ((MonoBehaviour)Instance).StartCoroutine(NetworkedScaler.AttachLater(val.transform)); } return val; } private static void SceneDirector_Start(orig_Start orig, SceneDirector self) { ScaleWorld(); orig.Invoke(self); } public static void ScaleWorld() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid I