Decompiled source of CleanestHud v2.0.2
plugins/CleanestHud.dll
Decompiled 3 days 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 CleanestHud.HudChanges; using CleanestHud.HudChanges.NormalHud; using CleanestHud.HudChanges.NormalHud.DifficultyHud; using CleanestHud.HudChanges.NormalHud.HealthBarArea; using CleanestHud.HudChanges.NormalHud.ScoreboardPanel; using CleanestHud.HudChanges.NormalHud.SkillsAndEquipsArea; using CleanestHud.HudChanges.Simulacrum; using CleanestHud.HudChanges.SurvivorSpecific; using CleanestHud.ModSupport; using EntityStates.Seeker; using JetBrains.Annotations; using LeeHyperrealMod; using LeeHyperrealMod.Content.Controllers; using LeeHyperrealMod.Modules.Survivors; using LookingGlass.ItemCounters; using LookingGlass.StatsDisplay; using Mdh.DroneTechSurvivorUIController; using Mdh.EntityStates.Seeker.Meditate; using Mdh.LeeHyperrealMod.Content.Controllers.LeeHyperrealUIController; using Mdh.RoR2.BossGroup; using Mdh.RoR2.CameraModes.CameraModeBase; using Mdh.RoR2.ConVar.BaseConVar; using Mdh.RoR2.EscapeSequenceController; using Mdh.RoR2.UI.AllyCardController; using Mdh.RoR2.UI.BuffDisplay; using Mdh.RoR2.UI.DifficultyBarController; using Mdh.RoR2.UI.HUD; using Mdh.RoR2.UI.HealthBar; using Mdh.RoR2.UI.InfiniteTowerWaveProgressBar; using Mdh.RoR2.UI.ItemIcon; using Mdh.RoR2.UI.NotificationUIController; using Mdh.RoR2.UI.ScoreboardController; using Mdh.RobDriver.Modules.Misc.DriverHooks; using Microsoft.CodeAnalysis; using MiscFixes.Modules; using Mono.Cecil.Cil; using MonoDetour; using MonoDetour.Cil; using MonoDetour.Cil.Analysis; using MonoDetour.DetourTypes; using MonoDetour.HookGen; using MonoMod.Cil; using R2API.Utils; using RiskOfOptions; using RoR2; using RoR2.CameraModes; using RoR2.ConVar; using RoR2.ContentManagement; using RoR2.UI; using RoR2.UI.SkinControllers; using RoR2BepInExPack.GameAssetPathsBetter; using RobDriver.Modules.Misc; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("DriverMod")] [assembly: IgnoresAccessChecksTo("ExtraSkillSlots")] [assembly: IgnoresAccessChecksTo("LeeHyperrealMod")] [assembly: IgnoresAccessChecksTo("LookingGlass")] [assembly: IgnoresAccessChecksTo("MystMod")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("LordVGames.CleanestHud")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("2.0.2.0")] [assembly: AssemblyInformationalVersion("2.0.2+366b3abdcf4ddd6b208fe31f93b827395e4cbbf3")] [assembly: AssemblyProduct("LordVGames.CleanestHud")] [assembly: AssemblyTitle("CleanestHud")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.0.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [CompilerGenerated] internal sealed class <>z__ReadOnlyArray<T> : IEnumerable, ICollection, IList, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>, IList<T> { int ICollection.Count => _items.Length; bool ICollection.IsSynchronized => false; object ICollection.SyncRoot => this; object IList.this[int index] { get { return _items[index]; } set { throw new NotSupportedException(); } } bool IList.IsFixedSize => true; bool IList.IsReadOnly => true; int IReadOnlyCollection<T>.Count => _items.Length; T IReadOnlyList<T>.this[int index] => _items[index]; int ICollection<T>.Count => _items.Length; bool ICollection<T>.IsReadOnly => true; T IList<T>.this[int index] { get { return _items[index]; } set { throw new NotSupportedException(); } } public <>z__ReadOnlyArray(T[] items) { _items = items; } IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)_items).GetEnumerator(); } void ICollection.CopyTo(Array array, int index) { ((ICollection)_items).CopyTo(array, index); } int IList.Add(object value) { throw new NotSupportedException(); } void IList.Clear() { throw new NotSupportedException(); } bool IList.Contains(object value) { return ((IList)_items).Contains(value); } int IList.IndexOf(object value) { return ((IList)_items).IndexOf(value); } void IList.Insert(int index, object value) { throw new NotSupportedException(); } void IList.Remove(object value) { throw new NotSupportedException(); } void IList.RemoveAt(int index) { throw new NotSupportedException(); } IEnumerator<T> IEnumerable<T>.GetEnumerator() { return ((IEnumerable<T>)_items).GetEnumerator(); } void ICollection<T>.Add(T item) { throw new NotSupportedException(); } void ICollection<T>.Clear() { throw new NotSupportedException(); } bool ICollection<T>.Contains(T item) { return ((ICollection<T>)_items).Contains(item); } void ICollection<T>.CopyTo(T[] array, int arrayIndex) { ((ICollection<T>)_items).CopyTo(array, arrayIndex); } bool ICollection<T>.Remove(T item) { throw new NotSupportedException(); } int IList<T>.IndexOf(T item) { return ((IList<T>)_items).IndexOf(item); } void IList<T>.Insert(int index, T item) { throw new NotSupportedException(); } void IList<T>.RemoveAt(int index) { throw new NotSupportedException(); } } [CompilerGenerated] internal sealed class <>z__ReadOnlySingleElementList<T> : IEnumerable, ICollection, IList, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>, IList<T> { private sealed class Enumerator : IDisposable, IEnumerator, IEnumerator<T> { object IEnumerator.Current => _item; T IEnumerator<T>.Current => _item; public Enumerator(T item) { _item = item; } bool IEnumerator.MoveNext() { if (!_moveNextCalled) { return _moveNextCalled = true; } return false; } void IEnumerator.Reset() { _moveNextCalled = false; } void IDisposable.Dispose() { } } int ICollection.Count => 1; bool ICollection.IsSynchronized => false; object ICollection.SyncRoot => this; object IList.this[int index] { get { if (index != 0) { throw new IndexOutOfRangeException(); } return _item; } set { throw new NotSupportedException(); } } bool IList.IsFixedSize => true; bool IList.IsReadOnly => true; int IReadOnlyCollection<T>.Count => 1; T IReadOnlyList<T>.this[int index] { get { if (index != 0) { throw new IndexOutOfRangeException(); } return _item; } } int ICollection<T>.Count => 1; bool ICollection<T>.IsReadOnly => true; T IList<T>.this[int index] { get { if (index != 0) { throw new IndexOutOfRangeException(); } return _item; } set { throw new NotSupportedException(); } } public <>z__ReadOnlySingleElementList(T item) { _item = item; } IEnumerator IEnumerable.GetEnumerator() { return new Enumerator(_item); } void ICollection.CopyTo(Array array, int index) { array.SetValue(_item, index); } int IList.Add(object value) { throw new NotSupportedException(); } void IList.Clear() { throw new NotSupportedException(); } bool IList.Contains(object value) { return EqualityComparer<T>.Default.Equals(_item, (T)value); } int IList.IndexOf(object value) { if (!EqualityComparer<T>.Default.Equals(_item, (T)value)) { return -1; } return 0; } void IList.Insert(int index, object value) { throw new NotSupportedException(); } void IList.Remove(object value) { throw new NotSupportedException(); } void IList.RemoveAt(int index) { throw new NotSupportedException(); } IEnumerator<T> IEnumerable<T>.GetEnumerator() { return new Enumerator(_item); } void ICollection<T>.Add(T item) { throw new NotSupportedException(); } void ICollection<T>.Clear() { throw new NotSupportedException(); } bool ICollection<T>.Contains(T item) { return EqualityComparer<T>.Default.Equals(_item, item); } void ICollection<T>.CopyTo(T[] array, int arrayIndex) { array[arrayIndex] = _item; } bool ICollection<T>.Remove(T item) { throw new NotSupportedException(); } int IList<T>.IndexOf(T item) { if (!EqualityComparer<T>.Default.Equals(_item, item)) { return -1; } return 0; } void IList<T>.Insert(int index, T item) { throw new NotSupportedException(); } void IList<T>.RemoveAt(int index) { throw new NotSupportedException(); } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Mdh.RobDriver.Modules.Misc.DriverHooks { internal static class NormalHudSetup { public delegate void PrefixSignature(ref HUD hud); public delegate ReturnFlow ControlFlowPrefixSignature(ref HUD hud); public delegate void PostfixSignature(ref HUD hud); 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 ControlFlowPrefix(ControlFlowPrefixSignature 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() { return typeof(DriverHooks).GetMethod("NormalHudSetup", (BindingFlags)(-1), null, new Type[1] { typeof(HUD) }, null) ?? throw new MissingMethodException("RobDriver.Modules.Misc.DriverHooks", "NormalHudSetup"); } } internal static class Init { public delegate void PrefixSignature(); public delegate ReturnFlow ControlFlowPrefixSignature(); 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 ControlFlowPrefix(ControlFlowPrefixSignature 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() { return typeof(DriverHooks).GetMethod("Init", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RobDriver.Modules.Misc.DriverHooks", "Init"); } } } namespace Mdh.EntityStates.Seeker.Meditate { internal static class SetupInputUIIcons { public delegate void PrefixSignature(Meditate self); public delegate void PostfixSignature(Meditate 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() { return typeof(Meditate).GetMethod("SetupInputUIIcons", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("EntityStates.Seeker.Meditate", "SetupInputUIIcons"); } } } namespace Mdh.LeeHyperrealMod.Content.Controllers.LeeHyperrealUIController { internal static class Awake { public delegate void PrefixSignature(LeeHyperrealUIController self); public delegate ReturnFlow ControlFlowPrefixSignature(LeeHyperrealUIController self); public delegate void PostfixSignature(LeeHyperrealUIController 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 ControlFlowPrefix(ControlFlowPrefixSignature 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() { return typeof(LeeHyperrealUIController).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("LeeHyperrealMod.Content.Controllers.LeeHyperrealUIController", "Awake"); } } internal static class OnDestroy { public delegate void PrefixSignature(LeeHyperrealUIController self); public delegate ReturnFlow ControlFlowPrefixSignature(LeeHyperrealUIController self); public delegate void PostfixSignature(LeeHyperrealUIController 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 ControlFlowPrefix(ControlFlowPrefixSignature 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() { return typeof(LeeHyperrealUIController).GetMethod("OnDestroy", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("LeeHyperrealMod.Content.Controllers.LeeHyperrealUIController", "OnDestroy"); } } internal static class InitializeUI { public delegate void PrefixSignature(LeeHyperrealUIController self); public delegate ReturnFlow ControlFlowPrefixSignature(LeeHyperrealUIController self); public delegate void PostfixSignature(LeeHyperrealUIController 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 ControlFlowPrefix(ControlFlowPrefixSignature 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() { return typeof(LeeHyperrealUIController).GetMethod("InitializeUI", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("LeeHyperrealMod.Content.Controllers.LeeHyperrealUIController", "InitializeUI"); } } internal static class InitializeHoldOKTag { public delegate void PrefixSignature(LeeHyperrealUIController self); public delegate ReturnFlow ControlFlowPrefixSignature(LeeHyperrealUIController self); public delegate void PostfixSignature(LeeHyperrealUIController 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 ControlFlowPrefix(ControlFlowPrefixSignature 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() { return typeof(LeeHyperrealUIController).GetMethod("InitializeHoldOKTag", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("LeeHyperrealMod.Content.Controllers.LeeHyperrealUIController", "InitializeHoldOKTag"); } } internal static class InitializeSkillIconMaterial { public delegate void PrefixSignature(LeeHyperrealUIController self); public delegate ReturnFlow ControlFlowPrefixSignature(LeeHyperrealUIController self); public delegate void PostfixSignature(LeeHyperrealUIController 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 ControlFlowPrefix(ControlFlowPrefixSignature 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() { return typeof(LeeHyperrealUIController).GetMethod("InitializeSkillIconMaterial", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("LeeHyperrealMod.Content.Controllers.LeeHyperrealUIController", "InitializeSkillIconMaterial"); } } } namespace Mdh.DroneTechSurvivorUIController { internal static class Awake { public delegate void PrefixSignature(DroneTechSurvivorUIController self); public delegate void PostfixSignature(DroneTechSurvivorUIController 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() { return typeof(DroneTechSurvivorUIController).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("DroneTechSurvivorUIController", "Awake"); } } internal static class OnEnable { public delegate void PrefixSignature(DroneTechSurvivorUIController self); public delegate void PostfixSignature(DroneTechSurvivorUIController 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() { return typeof(DroneTechSurvivorUIController).GetMethod("OnEnable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("DroneTechSurvivorUIController", "OnEnable"); } } internal static class TryUpdateIcons { public delegate void PrefixSignature(DroneTechSurvivorUIController self, ref List<DroneInfo> DroneQueue, ref List<DroneInfo> AllDrones); public delegate void PostfixSignature(DroneTechSurvivorUIController self, ref List<DroneInfo> DroneQueue, ref List<DroneInfo> AllDrones, ref bool returnValue); 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() { return typeof(DroneTechSurvivorUIController).GetMethod("TryUpdateIcons", (BindingFlags)(-1), null, new Type[2] { typeof(List<DroneInfo>), typeof(List<DroneInfo>) }, null) ?? throw new MissingMethodException("DroneTechSurvivorUIController", "TryUpdateIcons"); } } } namespace Mdh.RoR2.ConVar.BaseConVar { internal static class AttemptSetString { public delegate void PrefixSignature(BaseConVar self, ref string newValue); public delegate void PostfixSignature(BaseConVar self, ref string newValue); 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() { return typeof(BaseConVar).GetMethod("AttemptSetString", (BindingFlags)(-1), null, new Type[1] { typeof(string) }, null) ?? throw new MissingMethodException("RoR2.ConVar.BaseConVar", "AttemptSetString"); } } } namespace Mdh.RoR2.CameraModes.CameraModeBase { internal static class OnTargetChanged { public delegate void PrefixSignature(CameraModeBase self, ref CameraRigController cameraRigController, ref OnTargetChangedArgs args); public delegate void PostfixSignature(CameraModeBase self, ref CameraRigController cameraRigController, ref OnTargetChangedArgs args); 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() { return typeof(CameraModeBase).GetMethod("OnTargetChanged", (BindingFlags)(-1), null, new Type[2] { typeof(CameraRigController), typeof(OnTargetChangedArgs) }, null) ?? throw new MissingMethodException("RoR2.CameraModes.CameraModeBase", "OnTargetChanged"); } } } namespace Mdh.RoR2.EscapeSequenceController { internal static class SetHudCountdownEnabled { public delegate void PrefixSignature(EscapeSequenceController self, ref HUD hud, ref bool shouldEnableCountdownPanel); public delegate void PostfixSignature(EscapeSequenceController self, ref HUD hud, ref bool shouldEnableCountdownPanel); 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() { return typeof(EscapeSequenceController).GetMethod("SetHudCountdownEnabled", (BindingFlags)(-1), null, new Type[2] { typeof(HUD), typeof(bool) }, null) ?? throw new MissingMethodException("RoR2.EscapeSequenceController", "SetHudCountdownEnabled"); } } internal static class OnEnable { public delegate void PrefixSignature(EscapeSequenceController self); public delegate void PostfixSignature(EscapeSequenceController 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() { return typeof(EscapeSequenceController).GetMethod("OnEnable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.EscapeSequenceController", "OnEnable"); } } } namespace Mdh.RoR2.BossGroup { internal static class Awake { public delegate void PrefixSignature(BossGroup self); public delegate void PostfixSignature(BossGroup 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() { return typeof(BossGroup).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.BossGroup", "Awake"); } } internal static class UpdateObservations { public delegate void PrefixSignature(BossGroup self, ref BossMemory memory); public delegate void PostfixSignature(BossGroup self, ref BossMemory memory); 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() { return typeof(BossGroup).GetMethod("UpdateObservations", (BindingFlags)(-1), null, new Type[1] { typeof(BossMemory).MakeByRefType() }, null) ?? throw new MissingMethodException("RoR2.BossGroup", "UpdateObservations"); } } internal static class OnEnable { public delegate void PrefixSignature(BossGroup self); public delegate void PostfixSignature(BossGroup 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() { return typeof(BossGroup).GetMethod("OnEnable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.BossGroup", "OnEnable"); } } } namespace Mdh.RoR2.UI.InfiniteTowerWaveProgressBar { internal static class OnEnable { public delegate void PrefixSignature(InfiniteTowerWaveProgressBar self); public delegate void PostfixSignature(InfiniteTowerWaveProgressBar 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() { return typeof(InfiniteTowerWaveProgressBar).GetMethod("OnEnable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.InfiniteTowerWaveProgressBar", "OnEnable"); } } } namespace Mdh.RoR2.UI.NotificationUIController { internal static class SetUpNotification { public delegate void PrefixSignature(NotificationUIController self, ref NotificationInfo notificationInfo); public delegate void PostfixSignature(NotificationUIController self, ref NotificationInfo notificationInfo); 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() { return typeof(NotificationUIController).GetMethod("SetUpNotification", (BindingFlags)(-1), null, new Type[1] { typeof(NotificationInfo) }, null) ?? throw new MissingMethodException("RoR2.UI.NotificationUIController", "SetUpNotification"); } } internal static class OnEnable { public delegate void PrefixSignature(NotificationUIController self); public delegate void PostfixSignature(NotificationUIController 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() { return typeof(NotificationUIController).GetMethod("OnEnable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.NotificationUIController", "OnEnable"); } } } namespace Mdh.RoR2.UI.ScoreboardController { internal static class Awake { public delegate void PrefixSignature(ScoreboardController self); public delegate ReturnFlow ControlFlowPrefixSignature(ScoreboardController self); public delegate void PostfixSignature(ScoreboardController 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 ControlFlowPrefix(ControlFlowPrefixSignature 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() { return typeof(ScoreboardController).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.ScoreboardController", "Awake"); } } internal static class Rebuild { public delegate void PrefixSignature(ScoreboardController self); public delegate ReturnFlow ControlFlowPrefixSignature(ScoreboardController self); public delegate void PostfixSignature(ScoreboardController 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 ControlFlowPrefix(ControlFlowPrefixSignature 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() { return typeof(ScoreboardController).GetMethod("Rebuild", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.ScoreboardController", "Rebuild"); } } internal static class SelectFirstScoreboardStrip { public delegate void PrefixSignature(ScoreboardController self); public delegate ReturnFlow ControlFlowPrefixSignature(ScoreboardController self); public delegate void PostfixSignature(ScoreboardController 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 ControlFlowPrefix(ControlFlowPrefixSignature 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() { return typeof(ScoreboardController).GetMethod("SelectFirstScoreboardStrip", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.ScoreboardController", "SelectFirstScoreboardStrip"); } } internal static class OnEnable { public delegate void PrefixSignature(ScoreboardController self); public delegate ReturnFlow ControlFlowPrefixSignature(ScoreboardController self); public delegate void PostfixSignature(ScoreboardController 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 ControlFlowPrefix(ControlFlowPrefixSignature 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() { return typeof(ScoreboardController).GetMethod("OnEnable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.ScoreboardController", "OnEnable"); } } } namespace Mdh.RoR2.UI.ItemIcon { internal static class Awake { public delegate void PrefixSignature(ItemIcon self); public delegate void PostfixSignature(ItemIcon 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() { return typeof(ItemIcon).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.ItemIcon", "Awake"); } } internal static class SetItemIndex_RoR2_ItemIndex_System_Int32_System_Single { public delegate void PrefixSignature(ItemIcon self, ref ItemIndex newItemIndex, ref int newItemCount, ref float newDurationPercent); public delegate void PostfixSignature(ItemIcon self, ref ItemIndex newItemIndex, ref int newItemCount, ref float newDurationPercent); 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() { return typeof(ItemIcon).GetMethod("SetItemIndex", (BindingFlags)(-1), null, new Type[3] { typeof(ItemIndex), typeof(int), typeof(float) }, null) ?? throw new MissingMethodException("RoR2.UI.ItemIcon", "SetItemIndex"); } } } namespace Mdh.RoR2.UI.HealthBar { internal static class Awake { public delegate void PrefixSignature(HealthBar self); public delegate void PostfixSignature(HealthBar 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() { return typeof(HealthBar).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.HealthBar", "Awake"); } } internal static class InitializeHealthBar { public delegate void PrefixSignature(HealthBar self); public delegate void PostfixSignature(HealthBar 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() { return typeof(HealthBar).GetMethod("InitializeHealthBar", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.HealthBar", "InitializeHealthBar"); } } internal static class OnEnable { public delegate void PrefixSignature(HealthBar self); public delegate void PostfixSignature(HealthBar 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() { return typeof(HealthBar).GetMethod("OnEnable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.HealthBar", "OnEnable"); } } internal static class BarInfoCollection { internal static class Init { public delegate void PrefixSignature(BarInfoCollection self); public delegate void PostfixSignature(BarInfoCollection 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() { return typeof(BarInfoCollection).GetMethod("Init", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.HealthBar+BarInfoCollection", "Init"); } } } } namespace Mdh.RoR2.UI.DifficultyBarController { internal static class Awake { public delegate void PrefixSignature(DifficultyBarController self); public delegate void PostfixSignature(DifficultyBarController 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() { return typeof(DifficultyBarController).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.DifficultyBarController", "Awake"); } } internal static class OnCurrentSegmentIndexChanged { public delegate void PrefixSignature(DifficultyBarController self, ref int newSegmentIndex); public delegate void PostfixSignature(DifficultyBarController self, ref int newSegmentIndex); 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() { return typeof(DifficultyBarController).GetMethod("OnCurrentSegmentIndexChanged", (BindingFlags)(-1), null, new Type[1] { typeof(int) }, null) ?? throw new MissingMethodException("RoR2.UI.DifficultyBarController", "OnCurrentSegmentIndexChanged"); } } } namespace Mdh.RoR2.UI.BuffDisplay { internal static class Awake { public delegate void PrefixSignature(BuffDisplay self); public delegate void PostfixSignature(BuffDisplay 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() { return typeof(BuffDisplay).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.BuffDisplay", "Awake"); } } internal static class UpdateLayout { public delegate void PrefixSignature(BuffDisplay self); public delegate void PostfixSignature(BuffDisplay 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() { return typeof(BuffDisplay).GetMethod("UpdateLayout", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.BuffDisplay", "UpdateLayout"); } } internal static class OnEnable { public delegate void PrefixSignature(BuffDisplay self); public delegate void PostfixSignature(BuffDisplay 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() { return typeof(BuffDisplay).GetMethod("OnEnable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.BuffDisplay", "OnEnable"); } } } namespace Mdh.RoR2.UI.AllyCardController { internal static class Awake { public delegate void PrefixSignature(AllyCardController self); public delegate void PostfixSignature(AllyCardController 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() { return typeof(AllyCardController).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.AllyCardController", "Awake"); } } internal static class UpdateInfo { public delegate void PrefixSignature(AllyCardController self); public delegate void PostfixSignature(AllyCardController 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() { return typeof(AllyCardController).GetMethod("UpdateInfo", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.AllyCardController", "UpdateInfo"); } } } namespace Mdh.RoR2.UI.HUD { internal static class ShouldHudDisplayDelegate { internal static class Invoke { public delegate void PrefixSignature(ShouldHudDisplayDelegate self, ref HUD hud, ref bool shouldDisplay); public delegate void PostfixSignature(ShouldHudDisplayDelegate self, ref HUD hud, ref bool shouldDisplay); 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() { return typeof(ShouldHudDisplayDelegate).GetMethod("Invoke", (BindingFlags)(-1), null, new Type[2] { typeof(HUD), typeof(bool).MakeByRefType() }, null) ?? throw new MissingMethodException("RoR2.UI.HUD+ShouldHudDisplayDelegate", "Invoke"); } } } internal static class Awake { public delegate void PrefixSignature(HUD self); public delegate void PostfixSignature(HUD 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() { return typeof(HUD).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.HUD", "Awake"); } } internal static class OnEnable { public delegate void PrefixSignature(HUD self); public delegate void PostfixSignature(HUD 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() { return typeof(HUD).GetMethod("OnEnable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.HUD", "OnEnable"); } } internal static class OnDestroy { public delegate void PrefixSignature(HUD self); public delegate void PostfixSignature(HUD 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() { return typeof(HUD).GetMethod("OnDestroy", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.HUD", "OnDestroy"); } } } 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 : Attribute, IMonoDetourTargets { public Type? TargetType { get; } public bool IncludeNestedTypes { get; set; } public string[]? Members { get; set; } public string[]? MemberNamePrefixes { get; set; } public string[]? MemberNameSuffixes { get; set; } public bool GenerateControlFlowVariants { get; set; } public MonoDetourTargetsAttribute(Type? targetType = null) { TargetType = targetType; IncludeNestedTypes = true; base..ctor(); } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Microsoft.CodeAnalysis.Embedded] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Microsoft.CodeAnalysis.Embedded] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace Microsoft.CodeAnalysis { [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace CleanestHud { internal class AssetEdits { internal static void EditScoreboardStripAsset(GameObject scoreboardStripAsset) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) scoreboardStripAsset.GetComponent<RawImage>().texture = (Texture)(object)ModAssets.AssetBundle.LoadAsset<Texture2D>("NewNavHighlight"); Transform child = scoreboardStripAsset.transform.GetChild(0); ((Component)child).GetComponent<Image>().sprite = HudResources.HudAssets.WhiteSprite; Transform obj = child.Find("ClassBackground"); obj.DisableImageComponent(); obj.localScale = new Vector3(1.075f, 1.075f, 1.075f); ((Component)obj).GetComponent<RectTransform>().pivot = new Vector2(0f, 0f); obj.GetChild(0).localPosition = new Vector3(-5f, -5f, 0f); Transform obj2 = child.Find("NameObject"); obj2.GetChild(1).DisableImageComponent(); Transform child2 = obj2.GetChild(0); child2.localPosition = new Vector3(-5f, -26f, 0f); ((TMP_Text)((Component)child2).GetComponent<HGTextMeshProUGUI>()).alignment = (TextAlignmentOptions)514; child.Find("EquipmentBackground").DisableImageComponent(); ((Graphic)((Component)child.Find("TotalTextContainer/MoneyText")).GetComponent<HGTextMeshProUGUI>()).color = Color.white; ScoreboardStrip component = scoreboardStripAsset.GetComponent<ScoreboardStrip>(); component.itemInventoryDisplay.itemIconPrefabWidth = ConfigOptions.ScoreboardItemIconWidth.Value; component.itemInventoryDisplay.maxHeight = 50f; } internal static void EditItemIconIngame(GameObject itemIconIngameAsset) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0058: 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) //IL_0062: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00a2: Unknown result type (might be due to invalid IL or missing references) ((Component)itemIconIngameAsset.transform.GetChild(1)).GetComponent<RawImage>().texture = (Texture)(object)ModAssets.AssetBundle.LoadAsset<Texture2D>("NewNavHighlight"); HGButton component = itemIconIngameAsset.GetComponent<HGButton>(); ((ColorBlock)(ref ((Selectable)component).m_Colors)).highlightedColor = Helpers.ChangeColorWhileKeepingAlpha(((ColorBlock)(ref ((Selectable)component).m_Colors)).highlightedColor, Color.white); ((ColorBlock)(ref ((Selectable)component).m_Colors)).normalColor = Helpers.ChangeColorWhileKeepingAlpha(((ColorBlock)(ref ((Selectable)component).m_Colors)).normalColor, Color.white); ((ColorBlock)(ref ((Selectable)component).m_Colors)).pressedColor = Helpers.ChangeColorWhileKeepingAlpha(((ColorBlock)(ref ((Selectable)component).m_Colors)).pressedColor, Color.white); ((ColorBlock)(ref ((Selectable)component).m_Colors)).selectedColor = Helpers.ChangeColorWhileKeepingAlpha(((ColorBlock)(ref ((Selectable)component).m_Colors)).selectedColor, Color.white); ((Selectable)component).m_Colors.m_ColorMultiplier = 1.5f; } internal static void RemoveGameEndReportPanelDetails(GameObject gameEndReportPanelAsset) { //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) Transform obj = gameEndReportPanelAsset.transform.Find("SafeArea (JUICED)"); Transform val = obj.Find("BodyArea"); Transform obj2 = obj.Find("HeaderArea"); HGTextMeshProUGUI component = ((Component)obj2.Find("DeathFlavorText")).GetComponent<HGTextMeshProUGUI>(); ((TMP_Text)component).fontStyle = (FontStyles)0; ((TMP_Text)component).fontSizeMax = 30f; ((Graphic)((Component)obj2.Find("ResultArea/ResultLabel")).GetComponent<HGTextMeshProUGUI>()).material = HudResources.HudAssets.FontMaterial; Transform obj3 = val.Find("StatsAndChatArea"); Transform val2 = obj3.Find("ChatArea"); Transform child = val2.GetChild(0); Transform child2 = child.GetChild(2).GetChild(0); Transform obj4 = obj3.Find("StatsContainer"); Transform val3 = obj4.Find("Stats Body"); Transform obj5 = val3.Find("ScrollView"); Transform val4 = obj5.Find("Viewport/Content"); Transform val5 = obj5.Find("Scrollbar Vertical"); val2.DisableImageComponent(); child.GetChild(0).DisableImageComponent(); ((Component)child2.GetChild(1)).gameObject.SetActive(false); ((Component)child2.GetChild(2)).gameObject.SetActive(false); ((Component)obj4.Find("BorderImage")).gameObject.SetActive(false); obj4.Find("Stats And Player Nav/Stats Header").DisableImageComponent(); val3.DisableImageComponent(); val4.Find("SelectedDifficultyStrip").DisableImageComponent(); val4.Find("EnabledArtifactsStrip").DisableImageComponent(); val5.DisableImageComponent(); val5.Find("Sliding Area/Handle").DisableImageComponent(); RectTransform component2 = ((Component)val2).GetComponent<RectTransform>(); component2.sizeDelta = new Vector2(817f, 200f); ((Transform)component2).localPosition = new Vector3(441.5f, -311.66666f, 0f); Transform obj6 = val.Find("RightArea/InfoArea"); Transform obj7 = obj6.Find("Info Body"); Transform val6 = obj7.Find("ItemArea"); Transform val7 = val6.Find("ScrollView"); Transform val8 = obj7.Find("UnlockArea"); Transform val9 = val8.Find("ScrollView"); obj6.Find("BorderImage").DisableImageComponent(); obj6.Find("Info Header").DisableImageComponent(); val6.Find("Item Header").DisableImageComponent(); val7.DisableImageComponent(); val7.Find("Scrollbar Vertical").DisableImageComponent(); val8.Find("Unlocked Header").DisableImageComponent(); val9.DisableImageComponent(); val9.Find("Scrollbar Vertical").DisableImageComponent(); } internal static void RemoveChatBoxDetails(GameObject chatBoxAsset) { //IL_0034: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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) chatBoxAsset.DisableImageComponent(); Transform obj = chatBoxAsset.transform.Find("PermanentBG"); Image component = ((Component)obj).GetComponent<Image>(); component.sprite = HudResources.HudAssets.WhiteSprite; ((Graphic)component).color = Color32.op_Implicit(new Color32((byte)0, (byte)0, (byte)0, (byte)212)); Image component2 = ((Component)obj.Find("Input Field")).GetComponent<Image>(); component2.sprite = HudResources.HudAssets.WhiteSprite; ((Graphic)component2).color = Color32.op_Implicit(new Color32((byte)0, (byte)0, (byte)0, (byte)100)); RectTransform component3 = ((Component)obj).GetComponent<RectTransform>(); ((Transform)component3).localPosition = new Vector3(0f, 1f, 0f); component3.sizeDelta = new Vector2(0f, 48f); Transform obj2 = chatBoxAsset.transform.Find("StandardRect/Scroll View"); obj2.Find("Background").DisableImageComponent(); obj2.Find("BorderImage").DisableImageComponent(); ((Behaviour)((Component)obj2.Find("Scrollbar Vertical")).GetComponent<Scrollbar>()).enabled = true; } } public static class ConfigOptions { public static class SpecialConfig { public enum SeekerMeditateHudPosition { AboveHealthBar, OverCrosshair } public enum SeekerLotusHudPosition { AboveSkillsMiddle, LeftOfSkills } } public static ConfigEntry<bool> AllowHudStructureEdits; public static ConfigEntry<bool> AllowHudDetailsEdits; public static ConfigEntry<bool> AllowHudColorEdits; public static ConfigEntry<bool> AllowSurvivorSpecificEdits; public static ConfigEntry<float> HudTransparency; public static ConfigEntry<bool> ShowSkillKeybinds; public static ConfigEntry<bool> ShowSkillAndEquipmentOutlines; public static ConfigEntry<bool> ShowSprintAndInventoryKeybinds; public static ConfigEntry<bool> AllowInspectPanelFadeIn; public static ConfigEntry<float> InspectPanelFadeInDuration; public static ConfigEntry<bool> AllowAllyCardBackgrounds; public static ConfigEntry<bool> AllowScoreboardLabels; public static ConfigEntry<bool> AllowScoreboardItemHighlightColoring; public static ConfigEntry<float> ScoreboardItemIconWidth; public static ConfigEntry<bool> AllowAutoScoreboardHighlight; public static ConfigEntry<bool> EnableConsistentDifficultyBarBrightness; public static ConfigEntry<bool> AllowSimulacrumWaveBarAnimating; public static ConfigEntry<bool> AllowVoidFiendMeterAnimating; public static ConfigEntry<SpecialConfig.SeekerMeditateHudPosition> SeekerMeditateHudPosition; public static ConfigEntry<SpecialConfig.SeekerLotusHudPosition> SeekerLotusHudPosition; public static ConfigEntry<string> BodyNameBlacklist_Config; internal static string[] BodyNameBlacklist_Array; public static ConfigEntry<bool> AllowDebugLogging; public static event Action OnShowSkillKeybindsChanged; public static event Action OnShowSkillAndEquipmentOutlinesChanged; public static event Action OnShowSprintAndInventoryKeybindsChanged; private static void HudTransparency_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { Extensions.GetOrAddComponent<CanvasGroup>((Component)(object)Main.MyHud).alpha = HudTransparency.Value; InspectionPanel.SetInspectPanelMaxAlpha(); } } private static void ShowSkillKeybinds_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { HudDetails.SetSkillsAndEquipmentReminderTextStatus(); ConfigOptions.OnShowSkillKeybindsChanged?.Invoke(); SprintAndInventoryReminders.RepositionSprintAndInventoryReminders(); SkillsScaler.RepositionSkillScaler(); } } private static void ShowSkillAndEquipmentOutlines_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { SkillSlots.SetSkillOutlinesStatus(); ConfigOptions.OnShowSkillAndEquipmentOutlinesChanged?.Invoke(); } } private static void ShowSprintAndInventoryKeybinds_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { SprintAndInventoryReminders.SetSprintAndInventoryKeybindsStatus(); ConfigOptions.OnShowSprintAndInventoryKeybindsChanged?.Invoke(); } } private static void AllowInspectPanelFadeIn_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { InspectionPanel.SetInspectPanelFadeInStatus(); } } private static void InspectPanelFadeInDuration_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { InspectionPanel.SetInspectPanelFadeInStatus(); } } private static void AllowAllyCardBackgrounds_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { if (AllowAllyCardBackgrounds.Value) { AllyCards.ColorAllAllyCardBackgrounds(); } AllyCards.SetAllyCardBackgroundsStatus(); } } private static void AllowScoreboardLabels_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { HudDetails.SetScoreboardLabelsActiveOrNot(Main.MyHudLocator.FindChild("ScoreboardPanel")); } } private static void AllowScoreboardItemHighlightColoring_SettingChanged(object sender, EventArgs e) { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) if (!Main.IsHudEditable) { return; } ScoreboardController component = ((Component)Main.MyHudLocator.FindChild("ScoreboardPanel")).GetComponent<ScoreboardController>(); for (int i = 0; i < component.stripAllocator.elements.Count; i++) { Color newColor; if ((Object)(object)component.stripAllocator.elements[i].userBody == (Object)null) { Color color = ((Graphic)((Component)((Component)component.stripAllocator.elements[i]).transform.GetChild(0)).GetComponent<Image>()).color; color.a = 1f; newColor = color; } else { newColor = component.stripAllocator.elements[i].userBody.bodyColor; } HUD myHud = Main.MyHud; if (myHud != null) { ((MonoBehaviour)myHud).StartCoroutine(HudColor.DelayColorItemIconHighlights(component.stripAllocator.elements[i], newColor)); } } } private static void ScoreboardItemIconWidth_SettingChanged(object sender, EventArgs e) { if (!Main.IsHudEditable) { return; } ScoreboardController val = default(ScoreboardController); ((Component)HudResources.ImportantHudTransforms.ScoreboardPanel).TryGetComponent<ScoreboardController>(ref val); if ((Object)(object)val == (Object)null) { return; } ScoreboardStrip val2 = default(ScoreboardStrip); foreach (ScoreboardStrip element in val.stripAllocator.elements) { ((Component)element).TryGetComponent<ScoreboardStrip>(ref val2); if (val2 != null) { val2.itemInventoryDisplay.itemIconPrefabWidth = ScoreboardItemIconWidth.Value; } } } private static void EnableConsistentDifficultyBarBrightness_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { InfiniteLastDifficulty.SetFakeInfiniteLastDifficultySegmentStatus(); DifficultyBar.HudColorEdits(); } } private static void AllowSimulacrumWaveBarAnimating_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { WavePanel.SetSimulacrumWaveBarAnimatorStatus(); } } private static void AllowVoidFiendMeterAnimating_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { VoidFiend.SetVoidFiendMeterAnimatorStatus(); } } private static void SeekerMeditateHudPosition_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { Seeker.RepositionSeekerMeditationUI(); } } private static void SeekerLotusUiPosition_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { Seeker.RepositionSeekerLotusUI(); } } private static void BodyNameBlacklist_Config_SettingChanged(object sender, EventArgs e) { BodyNameBlacklist_Array = BodyNameBlacklist_Config.Value.Split(','); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static void BindConfigOptions(ConfigFile config) { AllowHudStructureEdits = Extensions.BindOption<bool>(config, "HUD Settings", "Allow HUD structure edits", "Should the structure editing phase of the HUD loading be allowed to happen?\n\nNOTE: This option is REALLY not supported, it will likely cause problems! Especially with some already supported modded survivors! This will also only take effect next stage or the next time the HUD is created!", true, (ConfigFlags)2); AllowHudDetailsEdits = Extensions.BindOption<bool>(config, "HUD Settings", "Allow HUD details edits", "Should the details editing phase of the HUD loading be allowed to happen?\n\nNOTE: This option is not very supported, it may not fully work! This will also only take effect next stage or the next time the HUD is created!", true, (ConfigFlags)2); AllowHudColorEdits = Extensions.BindOption<bool>(config, "HUD Settings", "Allow HUD color edits", "Should the HUD be colored based on the survivor being played/spectated?\n\nNOTE: This option is not very supported, it may not fully work! This will also only take effect next stage or the next time the HUD is created!", true, (ConfigFlags)2); HudTransparency = Extensions.BindOptionSteppedSlider(config, "HUD Settings", "HUD Transparency", "How transparent should the entire HUD be?\n1 = 100% opaque (no transparency), 0.8 = 80% opaque (20% transparency)", 0.8f, 0.05f, 0f, 10f, (ConfigFlags)2); ShowSkillAndEquipmentOutlines = Extensions.BindOption<bool>(config, "HUD Settings", "Show skill outlines", "Should skills have survivor-colored outlines?", true, (ConfigFlags)2); ShowSkillKeybinds = Extensions.BindOption<bool>(config, "HUD Settings", "Show skill & equipment keybinds", "Should the keybinds set for your 4 skills & equipment be displayed below your skills be shown?", false, (ConfigFlags)2); ShowSprintAndInventoryKeybinds = Extensions.BindOption<bool>(config, "HUD Settings", "Show sprint and inventory keybinds", "Should the keybinds set for sprinting and opening the inventory menu be shown?", false, (ConfigFlags)2); AllowInspectPanelFadeIn = Extensions.BindOption<bool>(config, "HUD Settings", "Allow inspect panel fade-in", "Should the inspect panel do it's fade-in animation whenever an item is clicked?", false, (ConfigFlags)2); InspectPanelFadeInDuration = Extensions.BindOptionSteppedSlider(config, "HUD Settings", "Inspect panel fade-in duration", "Set a custom duration for the inspect panel's fade-in animation. Vanilla is 0.2", 0.4f, 0.05f, 0f, 5f, (ConfigFlags)2); AllowAllyCardBackgrounds = Extensions.BindOption<bool>(config, "HUD Settings", "Allow ally backgrounds", "Should the allies on the left side of the HUD have their backgrounds? If Allowd, the backgrounds will be properly colored.", true, (ConfigFlags)2); AllowScoreboardLabels = Extensions.BindOption<bool>(config, "HUD Settings", "Allow inventories menu labels", "Should the player/items/equipment labels be visible on the inventories screen?", false, (ConfigFlags)2); AllowScoreboardItemHighlightColoring = Extensions.BindOption<bool>(config, "HUD Settings", "Allow changing inventory item icon highlight colors", "Should the highlights for item icons in the TAB inventories menu be colored based on the survivor that has those items?", true, (ConfigFlags)2); ScoreboardItemIconWidth = Extensions.BindOptionSlider<float>(config, "HUD Settings", "TAB Menu Item Icon Size", "Control how dense or spacious the item icons are in the TAB menu. Larger values will put more space between icons while making them smaller, and vice versa for smaller values.", 57f, (ConfigFlags)2); AllowAutoScoreboardHighlight = Extensions.BindOption<bool>(config, "HUD Settings", "Allow auto highlight when opening the inventory menu", "Should the automatic highlight for the first person in TAB inventories list be allowed?", false, (ConfigFlags)2); EnableConsistentDifficultyBarBrightness = Extensions.BindOption<bool>(config, "HUD Settings", "Enable consistent difficulty bar segment brightness", "Should the coloring for the difficulty bar stay at the same brightness instead of getting darker as the difficulty increases?", true, (ConfigFlags)2); AllowSimulacrumWaveBarAnimating = Extensions.BindOption<bool>(config, "HUD Settings", "Allow simulacrum wave progress bar animations", "Should the progress bar on the simulacrum's wave UI be allowed to animate & squish around whenever enemies spawn/enemies are left?\nNOTE: Will cause the bar to become stuck squished after a second or 2 of an active wave.", false, (ConfigFlags)2); AllowSurvivorSpecificEdits = Extensions.BindOption<bool>(config, "HUD Settings - Survivor Specific", "Allow survivor-specific HUD edits", "Should the editing phase for survivor-specific HUD elements be allowed to happen? This should be turned off if HUD structure edits are turned off.\n\nNOTE: This option is REALLY not supported, it may cause problems! This will also only take effect next stage or the next time the HUD is created!", true, (ConfigFlags)2); AllowVoidFiendMeterAnimating = Extensions.BindOption<bool>(config, "HUD Settings - Survivor Specific", "Allow Void Fiend corruption meter animations", "Should Void Fiend's corruption meter be allowed to animate & squish around whenever the percentage changes?\nNOTE: Currently, when the animations disabled, the colors of the meter do not change based on your form.", false, (ConfigFlags)2); SeekerMeditateHudPosition = Extensions.BindOption<SpecialConfig.SeekerMeditateHudPosition>(config, "HUD Settings - Survivor Specific", "Seeker Meditate Minigame UI Position", "Choose the position for the UI of the minigame you do for Seeker's meditation.", SpecialConfig.SeekerMeditateHudPosition.OverCrosshair, (ConfigFlags)2); SeekerLotusHudPosition = Extensions.BindOption<SpecialConfig.SeekerLotusHudPosition>(config, "HUD Settings - Survivor Specific", "Seeker Lotus UI Position", "Choose the position for the lotus flower thing on the UI that shows your progress towards your 7th meditation.", SpecialConfig.SeekerLotusHudPosition.LeftOfSkills, (ConfigFlags)2); BodyNameBlacklist_Config = Extensions.BindOption<string>(config, "HUD Settings - Survivor Specific", "Survivor Blacklist", "If the HUD gets messed up when playing with certain survivors, add their BODY name (i.e. CommandoBody) here to stop the majority of the mod's hud changes when playing that survivor. Each body name needs separated by a comma and NO spaces.", "", (ConfigFlags)2); BodyNameBlacklist_Array = BodyNameBlacklist_Config.Value.Split(','); AllowDebugLogging = Extensions.BindOption<bool>(config, "Other", "Allow debug logging", "Allow to do some extra debug logging that can help diagnose issues with the mod.", false, (ConfigFlags)2); if (RiskOfOptionsMod.ModIsRunning) { HudTransparency.SettingChanged += HudTransparency_SettingChanged; ShowSkillAndEquipmentOutlines.SettingChanged += ShowSkillAndEquipmentOutlines_SettingChanged; ShowSkillKeybinds.SettingChanged += ShowSkillKeybinds_SettingChanged; ShowSprintAndInventoryKeybinds.SettingChanged += ShowSprintAndInventoryKeybinds_SettingChanged; AllowInspectPanelFadeIn.SettingChanged += AllowInspectPanelFadeIn_SettingChanged; InspectPanelFadeInDuration.SettingChanged += InspectPanelFadeInDuration_SettingChanged; AllowAllyCardBackgrounds.SettingChanged += AllowAllyCardBackgrounds_SettingChanged; AllowScoreboardItemHighlightColoring.SettingChanged += AllowScoreboardItemHighlightColoring_SettingChanged; ScoreboardItemIconWidth.SettingChanged += ScoreboardItemIconWidth_SettingChanged; EnableConsistentDifficultyBarBrightness.SettingChanged += EnableConsistentDifficultyBarBrightness_SettingChanged; AllowSimulacrumWaveBarAnimating.SettingChanged += AllowSimulacrumWaveBarAnimating_SettingChanged; AllowVoidFiendMeterAnimating.SettingChanged += AllowVoidFiendMeterAnimating_SettingChanged; SeekerMeditateHudPosition.SettingChanged += SeekerMeditateHudPosition_SettingChanged; SeekerLotusHudPosition.SettingChanged += SeekerLotusUiPosition_SettingChanged; BodyNameBlacklist_Config.SettingChanged += BodyNameBlacklist_Config_SettingChanged; RiskOfOptionsMod.SetupModCategoryInfo(); } if (LookingGlassMod.ModIsRunning) { LookingGlassMod.HookStatsPanelConfig_SettingChanged(); } } } internal static class Extensions { internal static Transform FindWithPartialMatch(this Transform thisTransform, string partialName) { if (thisTransform.childCount == 0) { return null; } for (int i = 0; i < thisTransform.childCount; i++) { Transform child = thisTransform.GetChild(i); if (((Object)child).name.Contains(partialName)) { return child; } } return null; } internal static List<Transform> FindListOfPartialMatches(this Transform thisTransform, string partialName) { List<Transform> list = new List<Transform>(); if (thisTransform.childCount == 0) { return null; } for (int i = 0; i < thisTransform.childCount; i++) { Transform child = thisTransform.GetChild(i); if (((Object)child).name.Contains(partialName)) { list.Add(child); } } return list; } internal static void DisableImageComponent(this Transform transform, string callingCodeName = "") { Image val = default(Image); if ((Object)(object)transform == (Object)null) { Log.Error("Transform was null when trying to disable an image component on it!"); if (!Utility.IsNullOrWhiteSpace(callingCodeName)) { Log.Error("Method was called by: " + callingCodeName); } } else if (((Component)transform).TryGetComponent<Image>(ref val)) { ((Behaviour)val).enabled = false; } else { Log.Error("Could not find image component in transform " + ((Object)transform).name); if (!Utility.IsNullOrWhiteSpace(callingCodeName)) { Log.Error("Method was called by: " + callingCodeName); } } } internal static void DisableImageComponent(this GameObject gameObject, string callingCodeName = "") { Image val = default(Image); if ((Object)(object)gameObject == (Object)null) { Log.Error("GameObject " + ((Object)gameObject).name + " was null when trying to disable an image component on it!"); if (!Utility.IsNullOrWhiteSpace(callingCodeName)) { Log.Error("Method was called by: " + callingCodeName); } } else if (gameObject.TryGetComponent<Image>(ref val)) { ((Behaviour)val).enabled = false; } else { Log.Error("Could not find image component in GameObject " + ((Object)gameObject).name); if (!Utility.IsNullOrWhiteSpace(callingCodeName)) { Log.Error("Method was called by: " + callingCodeName); } } } internal static void DisableImageComponent(this AllyCardController allyCardController) { Image val = default(Image); if (((Component)allyCardController).TryGetComponent<Image>(ref val)) { ((Behaviour)val).enabled = false; } else { Log.Error("Could not find image component in allyCardController " + ((Object)allyCardController).name); } } internal static void DisableRawImageComponent(this Transform transform) { RawImage val = default(RawImage); if ((Object)(object)transform == (Object)null) { Log.Error("Transform " + ((Object)transform).name + " was null when trying to disable a raw image component on it!"); } else if (((Component)transform).TryGetComponent<RawImage>(ref val)) { ((Behaviour)val).enabled = false; } else { Log.Error("Could not find image component in transform " + ((Object)transform).name); } } internal static void DisableRawImageComponent(this GameObject gameObject) { RawImage val = default(RawImage); if ((Object)(object)gameObject == (Object)null) { Log.Error("GameObject " + ((Object)gameObject).name + " was null when trying to disable a raw image component on it!"); } else if (gameObject.TryGetComponent<RawImage>(ref val)) { ((Behaviour)val).enabled = false; } else { Log.Error("Could not find raw image component in allyCardController " + ((Object)gameObject).name); } } internal static void LogILInstructions(this ILWeaver w) { Log.Warning(MethodBodyExtensions.CreateInformationalSnapshotJIT(w.Method.Body).ToStringWithAnnotations()); } } internal static class Helpers { internal static bool IsGameModeSimulacrum => Run.instance.gameModeIndex == GameModeCatalog.FindGameModeIndex("InfiniteTowerRun"); internal static bool AreSimulacrumWavesRunning { get { Run instance = Run.instance; if ((Object)(object)((InfiniteTowerRun)((instance is InfiniteTowerRun) ? instance : null)).waveController != (Object)null) { return true; } return false; } } public static Color GetAdjustedColor(Color rgbColor, float saturationMultiplier = 1f, float brightnessMultiplier = 1f, float colorIntensityMultiplier = 1f, float transparencyMultiplier = 1f) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) //IL_002b: 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_0049: 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) float num = default(float); float num2 = default(float); float num3 = default(float); Color.RGBToHSV(rgbColor, ref num, ref num2, ref num3); Color result = Color.HSVToRGB(num, num2 * saturationMultiplier, num3 * brightnessMultiplier, true); result.r = rgbColor.r * colorIntensityMultiplier; result.g = rgbColor.g * colorIntensityMultiplier;