Decompiled source of CleanestHud v0.9.0
plugins/CleanestHud.dll
Decompiled 2 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 EntityStates.Seeker; using IL.RoR2.UI; using LookingGlass.StatsDisplay; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.Seeker; using On.RoR2; using On.RoR2.CameraModes; using On.RoR2.UI; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.CameraModes; using RoR2.HudOverlay; using RoR2.UI; using RoR2.UI.SkinControllers; using SS2; using SS2.Items; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("CleanestHud")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+69ca49699e1f6140c4b0e1a2a631e6d53cbeee6d")] [assembly: AssemblyProduct("CleanestHud")] [assembly: AssemblyTitle("CleanestHud")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace CleanestHud { public static class Assets { public static AssetBundle ModIconAssetBundle; public const string BundleName = "cleanesthudicon"; public static string AssetBundlePath => Path.Combine(Path.GetDirectoryName(Plugin.PluginInfo.Location), "cleanesthudicon"); public static void Init() { ModIconAssetBundle = AssetBundle.LoadFromFile(AssetBundlePath); } } public static class ConfigOptions { public static class SpecialConfig { public enum SeekerMeditateHudPosition { AboveHealthBar, OverCrosshair } public enum SeekerLotusHudPosition { AboveHealthBar, LeftOfHealthbar } } public static ConfigEntry<string> BodyNameBlacklist_Config; internal static string[] BodyNameBlacklist_Array; public static ConfigEntry<float> HudTransparency; public static ConfigEntry<bool> ShowSkillKeybinds; public static ConfigEntry<bool> ShowSprintAndInventoryKeybinds; public static ConfigEntry<bool> AllowInspectPanelFadeIn; public static ConfigEntry<float> InspectPanelFadeInDuration; public static ConfigEntry<bool> EnableAllyCardBackgrounds; public static ConfigEntry<bool> EnableScoreboardItemHighlightColoring; public static ConfigEntry<bool> EnableAutoScoreboardHighlight; public static ConfigEntry<bool> EnableGradualDifficultyBarColor; 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<bool> EnableDebugLogging; private static void BodyNameBlacklist_Config_SettingChanged(object sender, EventArgs e) { BodyNameBlacklist_Array = BodyNameBlacklist_Config.Value.Split(','); } private static void HudTransparency_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { (((Component)Main.MyHud).GetComponent<CanvasGroup>() ?? ((Component)Main.MyHud).gameObject.AddComponent<CanvasGroup>()).alpha = HudTransparency.Value; HudDetails.SetInspectPanelMaxAlpha(); } } private static void ShowSkillKeybinds_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { HudDetails.SetSkillsAndEquipmentReminderTextStatus(); HudStructure.RepositionSkillScaler(); HudStructure.RepositionSprintAndInventoryReminders(); } } private static void ShowSprintAndInventoryKeybinds_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { HudDetails.SetSprintAndInventoryKeybindsStatus(); } } private static void AllowInspectPanelFadeIn_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { HudDetails.SetInspectPanelFadeInStatus(); } } private static void InspectPanelFadeInDuration_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { HudDetails.SetInspectPanelFadeInStatus(); } } private static void EnableAllyCardBackgrounds_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { if (EnableAllyCardBackgrounds.Value) { HudColor.ColorAllAllyCardBackgrounds(); } HudDetails.SetAllyCardBackgroundsStatus(); } } private static void EnableScoreboardItemHighlightColoring_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { ScoreboardController component = ((Component)HudResources.ImportantHudTransforms.SpringCanvas.Find("ScoreboardPanel")).GetComponent<ScoreboardController>(); for (int i = 0; i < component.stripAllocator.elements.Count; i++) { ((MonoBehaviour)Main.MyHud).StartCoroutine(HudColor.DelayColorItemIconHighlights(component.stripAllocator.elements[i], !EnableScoreboardItemHighlightColoring.Value)); } } } private static void EnableGradualDifficultyBarColor_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { HudDetails.SetFakeInfiniteLastDifficultySegment(); HudColor.ColorDifficultyBar(); } } private static void AllowSimulacrumWaveBarAnimating_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { HudDetails.SetSimulacrumWaveBarAnimatorStatus(); } } private static void AllowVoidFiendMeterAnimating_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { SurvivorSpecific.SetVoidFiendMeterAnimatorStatus(); } } private static void SeekerMeditateHudPosition_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { SurvivorSpecific.RepositionSeekerMeditationUI(); } } private static void SeekerLotusUiPosition_SettingChanged(object sender, EventArgs e) { if (Main.IsHudEditable) { SurvivorSpecific.RepositionSeekerLotusUI(); } } internal static void BindConfigOptions(ConfigFile config) { HudTransparency = config.Bind<float>("HUD Settings", "HUD Transparency", 0.8f, "How transparent should the entire HUD be?\n1 = 100% opaque (no transparency), 0.8 = 80% opaque (20% transparency)"); ShowSkillKeybinds = config.Bind<bool>("HUD Settings", "Show skill & equipment keybinds", false, "Should the keybinds set for your 4 skills & equipment be displayed below your skills be shown?"); ShowSprintAndInventoryKeybinds = config.Bind<bool>("HUD Settings", "Show sprint and inventory keybinds", false, "Should the keybinds set for sprinting and opening the inventory menu be shown?"); AllowInspectPanelFadeIn = config.Bind<bool>("HUD Settings", "Allow inspect panel fade-in", false, "Should the inspect panel do it's fade-in animation whenever an item is clicked?"); InspectPanelFadeInDuration = config.Bind<float>("HUD Settings", "Inspect panel fade-in duration", 0.4f, "Set a custom duration for the inspect panel's fade-in animation. Vanilla is 0.2"); EnableAllyCardBackgrounds = config.Bind<bool>("HUD Settings", "Enable ally backgrounds", true, "Should the allies on the left side of the HUD have their backgrounds? If enabled, the backgrounds will be properly colored."); EnableGradualDifficultyBarColor = config.Bind<bool>("HUD Settings", "Enable gradual color change for the difficulty bar", false, "Should the coloring for the difficulty bar gradually get darker as the difficulty increases?Currently, if disabled, the consistent coloring only works until the \"HAHAHAHA\" part of the difficulty is reached."); AllowSimulacrumWaveBarAnimating = config.Bind<bool>("HUD Settings", "Allow simulacrum wave progress bar animations", false, "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."); EnableScoreboardItemHighlightColoring = config.Bind<bool>("HUD Settings", "Enable changing inventory item icon highlight colors", false, "Should the highlight for icons in the TAB inventories menu be colored? WARNING: Will likely cause a lag spike when opening the TAB menu at high item counts!"); EnableAutoScoreboardHighlight = config.Bind<bool>("HUD Settings", "Enable auto highlight when opening the inventory menu", false, "Should the automatic highlight for the first person in TAB inventories list be enabled?"); AllowVoidFiendMeterAnimating = config.Bind<bool>("HUD Settings - Survivor Specific", "Allow Void Fiend corruption meter animations", false, "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."); SeekerMeditateHudPosition = config.Bind<SpecialConfig.SeekerMeditateHudPosition>("HUD Settings - Survivor Specific", "Seeker Meditate Minigame UI Position", SpecialConfig.SeekerMeditateHudPosition.OverCrosshair, "Choose the position for the UI of the minigame you do for Seeker's meditation."); SeekerLotusHudPosition = config.Bind<SpecialConfig.SeekerLotusHudPosition>("HUD Settings - Survivor Specific", "Seeker Lotus UI Position", SpecialConfig.SeekerLotusHudPosition.LeftOfHealthbar, "Choose the position for the lotus flower thing on the UI that shows your progress towards your 7th meditation."); BodyNameBlacklist_Config = config.Bind<string>("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 mod's hud changes when playing that survivor. Each body name needs separated by a comma and NO spaces."); BodyNameBlacklist_Array = BodyNameBlacklist_Config.Value.Split(','); EnableDebugLogging = config.Bind<bool>("Other", "Enable debug logging", false, "Enable to do some extra debug logging that can help diagnose issues with the mod."); if (ModSupport.RiskOfOptionsMod.ModIsRunning) { BodyNameBlacklist_Config.SettingChanged += BodyNameBlacklist_Config_SettingChanged; HudTransparency.SettingChanged += HudTransparency_SettingChanged; ShowSkillKeybinds.SettingChanged += ShowSkillKeybinds_SettingChanged; ShowSprintAndInventoryKeybinds.SettingChanged += ShowSprintAndInventoryKeybinds_SettingChanged; AllowInspectPanelFadeIn.SettingChanged += AllowInspectPanelFadeIn_SettingChanged; InspectPanelFadeInDuration.SettingChanged += InspectPanelFadeInDuration_SettingChanged; EnableAllyCardBackgrounds.SettingChanged += EnableAllyCardBackgrounds_SettingChanged; EnableScoreboardItemHighlightColoring.SettingChanged += EnableScoreboardItemHighlightColoring_SettingChanged; EnableGradualDifficultyBarColor.SettingChanged += EnableGradualDifficultyBarColor_SettingChanged; AllowSimulacrumWaveBarAnimating.SettingChanged += AllowSimulacrumWaveBarAnimating_SettingChanged; AllowVoidFiendMeterAnimating.SettingChanged += AllowVoidFiendMeterAnimating_SettingChanged; SeekerMeditateHudPosition.SettingChanged += SeekerMeditateHudPosition_SettingChanged; SeekerLotusHudPosition.SettingChanged += SeekerLotusUiPosition_SettingChanged; ModSupport.RiskOfOptionsMod.AddOptions(); } if (ModSupport.LookingGlassMod.ModIsRunning && ModSupport.LookingGlassMod.StatsPanelEnabledConfig != null) { ModSupport.LookingGlassMod.StatsPanelEnabledConfig.SettingChanged += ModSupport.LookingGlassMod.StatsPanelEnabledConfig_SettingChanged; } } } internal static class Extensions { public 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; } public 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 class HudResources { internal static class HudAssets { internal static Sprite WhiteSprite; internal static Material FontMaterial; internal static Sprite DefaultDifficultyBarBackdropSprite; internal static GameObject SimulacrumWaveUI; internal static GameObject EnemyInfoPanel; internal static GameObject GameEndReportPanel; internal static GameObject ViendCrosshair; internal static GameObject ViendCorruption; internal static GameObject ScoreboardStrip; internal static GameObject ItemIconScoreboard; internal static GameObject MoonDetonationPanel; internal static GameObject StatStripTemplate; internal static GameObject ChatBox; internal static Sprite LastDifficultySegmentSprite; internal static void LoadHudAssets() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) WhiteSprite = Sprite.Create(Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/texWhite.png").WaitForCompletion(), new Rect(0f, 0f, 4f, 4f), Vector2.zero); FontMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/Fonts/Bombardier/tmpBombDropshadow3D.mat").WaitForCompletion(); ChatBox = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/ChatBox.prefab").WaitForCompletion(); SimulacrumWaveUI = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerDefaultWaveUI.prefab").WaitForCompletion(); EnemyInfoPanel = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/EnemyInfoPanel.prefab").WaitForCompletion(); GameEndReportPanel = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/GameEndReportPanel.prefab").WaitForCompletion(); ViendCrosshair = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorCrosshair.prefab").WaitForCompletion(); ViendCorruption = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorCorruptionUISimplified.prefab").WaitForCompletion(); ScoreboardStrip = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/ScoreboardStrip.prefab").WaitForCompletion(); ItemIconScoreboard = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/ItemIconScoreboard.prefab").WaitForCompletion(); MoonDetonationPanel = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/HudCountdownPanel.prefab").WaitForCompletion(); StatStripTemplate = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/StatStripTemplate.prefab").WaitForCompletion(); } } internal static class ImportantHudTransforms { internal static Transform MainUIArea; internal static Transform MainContainer; internal static Transform UpperRightCluster; internal static Transform RunInfoHudPanel; internal static Transform RightInfoBar; internal static Transform SpringCanvas; internal static Transform TopCenterCluster; internal static Transform BottomLeftCluster; internal static Transform BottomCenterCluster; internal static Transform BottomRightCluster; internal static Transform RightCluster; internal static Transform BarRoots; internal static Transform SkillsScaler; internal static Transform InspectPanelArea { get { if (!Main.IsHudFinishedLoading) { return null; } return Helpers.GetContainerFromScoreboardPanel(SpringCanvas.Find("ScoreboardPanel")).GetChild(2).GetChild(0); } } internal static void FindHudTransforms() { MainUIArea = Main.MyHud.mainUIPanel.transform; MainContainer = Main.MyHud.mainContainer.transform; UpperRightCluster = ((Component)Main.MyHud.gameModeUiRoot).transform; RunInfoHudPanel = UpperRightCluster.GetChild(0); RightInfoBar = RunInfoHudPanel.Find("RightInfoBar"); SpringCanvas = MainUIArea.Find("SpringCanvas"); TopCenterCluster = SpringCanvas.Find("TopCenterCluster"); BottomLeftCluster = SpringCanvas.Find("BottomLeftCluster"); BottomCenterCluster = SpringCanvas.Find("BottomCenterCluster"); BottomRightCluster = SpringCanvas.Find("BottomRightCluster"); RightCluster = SpringCanvas.Find("RightCluster"); BarRoots = BottomLeftCluster.Find("BarRoots"); SkillsScaler = BottomRightCluster.Find("Scaler"); } } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { if (ConfigOptions.EnableDebugLogging.Value) { _logSource.LogDebug(data); } } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } internal static class Main { internal static class OnHooks { [CompilerGenerated] private sealed class <DelayScoreboardController_Rebuild>d__11 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public ScoreboardController scoreboardController; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DelayScoreboardController_Rebuild>d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; EditScoreboardControllerElements(scoreboardController); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <WaitForHpBarToFinishLoading>d__1 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Transform hpBarShrunkenRoot; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <WaitForHpBarToFinishLoading>d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (hpBarShrunkenRoot.childCount == 0) { Log.Debug("HUD HP bar does not have any children to modify yet, waiting"); <>2__current = null; <>1__state = 1; return true; } BeginLiveHudChanges(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal static void HUD_Awake(orig_Awake orig, HUD hud) { orig.Invoke(hud); Log.Debug("HUD_Awake"); MyHud = hud; HudResources.ImportantHudTransforms.FindHudTransforms(); Transform hpBarShrunkenRoot = MyHud.mainUIPanel.transform.Find("SpringCanvas").Find("BottomLeftCluster").Find("BarRoots") .Find("HealthbarRoot") .Find("ShrunkenRoot"); ((MonoBehaviour)MyHud).StartCoroutine(WaitForHpBarToFinishLoading(hpBarShrunkenRoot)); } [IteratorStateMachine(typeof(<WaitForHpBarToFinishLoading>d__1))] private static IEnumerator WaitForHpBarToFinishLoading(Transform hpBarShrunkenRoot) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <WaitForHpBarToFinishLoading>d__1(0) { hpBarShrunkenRoot = hpBarShrunkenRoot }; } private static void BeginLiveHudChanges() { CharacterBody hudTargetBody = HudTargetBody; IsHudFinishedLoading = true; if (ConfigOptions.BodyNameBlacklist_Array.Contains(((Object)hudTargetBody).name.Substring(0, ((Object)hudTargetBody).name.Length - 7))) { IsHudUserBlacklisted = true; return; } HudStructure.EditHudStructure(); HudDetails.EditHudDetails(); OnCameraChange(hudTargetBody); } internal static void HUD_OnDestroy(orig_OnDestroy orig, HUD self) { orig.Invoke(self); IsHudFinishedLoading = false; IsHudUserBlacklisted = false; } internal static void CameraModeBase_OnTargetChanged(orig_OnTargetChanged orig, CameraModeBase self, CameraRigController cameraRigController, OnTargetChangedArgs args) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, cameraRigController, args); if (Object.op_Implicit((Object)(object)cameraRigController.targetBody)) { if (!IsHudEditable) { Log.Debug("Camera changed while HUD was not editable, returning"); } else { OnCameraChange(cameraRigController.targetBody); } } } internal static void OnCameraChange(CharacterBody targetCharacterBody) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) HudColor.SurvivorColor = Helpers.GetAdjustedColor(targetCharacterBody.bodyColor, 0.85f, 0.85f); Log.Debug("cameraRigController.targetBody.baseNameToken is " + targetCharacterBody.baseNameToken); string baseNameToken = targetCharacterBody.baseNameToken; if (!(baseNameToken == "VOIDSURVIVOR_BODY_NAME")) { if (baseNameToken == "SEEKER_BODY_NAME") { ((MonoBehaviour)MyHud).StartCoroutine(SurvivorSpecific.DelayRepositionSeekerLotusUI()); } } else { ((MonoBehaviour)MyHud).StartCoroutine(SurvivorSpecific.DelayEditVoidFiendCorruptionUI()); } } internal static void AllyCardController_Awake(orig_Awake orig, AllyCardController self) { orig.Invoke(self); if (!IsHudUserBlacklisted) { Transform child = ((Component)self).transform.GetChild(0); ((MonoBehaviour)MyHud).StartCoroutine(HudDetails.DelayEditAllyCardPortrait(child)); if (!ConfigOptions.EnableAllyCardBackgrounds.Value) { ((Behaviour)((Component)self).GetComponent<Image>()).enabled = false; } } } internal static void AllyCardController_UpdateInfo(orig_UpdateInfo orig, AllyCardController self) { orig.Invoke(self); if (!IsHudUserBlacklisted && ConfigOptions.EnableAllyCardBackgrounds.Value) { HudColor.ColorAllyCardControllerBackground(self); } } internal static void InfiniteTowerWaveProgressBar_OnEnable(orig_OnEnable orig, InfiniteTowerWaveProgressBar simulacrumTowerWaveProgressBar) { orig.Invoke(simulacrumTowerWaveProgressBar); if (!IsHudUserBlacklisted) { simulacrumTowerWaveProgressBar.barImage.sprite = HudResources.HudAssets.WhiteSprite; HudColor.ColorSimulacrumWaveProgressBar(((Component)simulacrumTowerWaveProgressBar.barImage).transform.parent); HudDetails.SetSimulacrumWaveBarAnimatorStatus(); } } internal static void NotificationUIController_SetUpNotification(orig_SetUpNotification orig, NotificationUIController self, NotificationInfo notificationInfo) { orig.Invoke(self, notificationInfo); if (!IsHudUserBlacklisted) { ((MonoBehaviour)MyHud).StartCoroutine(HudDetails.DelayRemoveNotificationBackground()); } } internal static void ScoreboardController_Rebuild(orig_Rebuild orig, ScoreboardController scoreboardController) { orig.Invoke(scoreboardController); if (!IsHudUserBlacklisted) { ((MonoBehaviour)MyHud).StartCoroutine(DelayScoreboardController_Rebuild(scoreboardController)); } } [IteratorStateMachine(typeof(<DelayScoreboardController_Rebuild>d__11))] private static IEnumerator DelayScoreboardController_Rebuild(ScoreboardController scoreboardController) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DelayScoreboardController_Rebuild>d__11(0) { scoreboardController = scoreboardController }; } private static void EditScoreboardControllerElements(ScoreboardController scoreboardController) { HudStructure.EditScoreboardPanel(); foreach (ScoreboardStrip element in scoreboardController.stripAllocator.elements) { HudColor.ColorScoreboardStrip(element); if (ConfigOptions.EnableScoreboardItemHighlightColoring.Value) { HudColor.HandleItemIconColoring(scoreboardController); } } } internal static void ScoreboardController_SelectFirstScoreboardStrip(orig_SelectFirstScoreboardStrip orig, ScoreboardController self) { if (IsHudUserBlacklisted) { orig.Invoke(self); } else if (ConfigOptions.EnableAutoScoreboardHighlight.Value) { orig.Invoke(self); } } internal static void DifficultyBarController_OnCurrentSegmentIndexChanged(orig_OnCurrentSegmentIndexChanged orig, DifficultyBarController self, int newSegmentIndex) { orig.Invoke(self, newSegmentIndex); if (!IsHudUserBlacklisted && newSegmentIndex > 6 && !ConfigOptions.EnableGradualDifficultyBarColor.Value) { HudDetails.SetFakeInfiniteLastDifficultySegment(); } } internal static void VoidSurvivorController_OnOverlayInstanceAdded(orig_OnOverlayInstanceAdded orig, VoidSurvivorController self, OverlayController controller, GameObject instance) { orig.Invoke(self, controller, instance); if (!IsHudUserBlacklisted) { ((Behaviour)self.overlayInstanceAnimator).enabled = ConfigOptions.AllowVoidFiendMeterAnimating.Value; } } internal static void MeditationUI_SetupInputUIIcons(orig_SetupInputUIIcons orig, MeditationUI self) { orig.Invoke(self); if (!IsHudUserBlacklisted) { SurvivorSpecific.RepositionSeekerMeditationUI(); } } } internal static class ILHooks { internal static void BuffDisplay_UpdateLayout(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)1, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt<BuffIcon>(x, "get_rectTransform"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<RectTransform>(x, "set_anchoredPosition") })) { Log.Error("COULD NOT IL HOOK BuffDisplay_UpdateLayout"); Log.Warning($"cursor is {val}"); Log.Warning($"il is {il}"); return; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Action<BuffDisplay>>((Action<BuffDisplay>)delegate(BuffDisplay buffDisplay) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) if (!(((Object)buffDisplay).name != "BuffDisplayRoot") && !IsHudUserBlacklisted && buffDisplay.buffIconDisplayData.Count >= 1) { ((Transform)buffDisplay.rectTranform).localPosition = new Vector3(-25f * (float)buffDisplay.buffIconDisplayData.Count, -45f, 0f); if ((Object)(object)buffDisplay.buffIconDisplayData[0].buffIconComponent != (Object)null) { ((Transform)buffDisplay.buffIconDisplayData[0].buffIconComponent.rectTransform).rotation = Quaternion.identity; } } }); } internal static void ScoreboardStrip_UpdateItemCountText(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCall<int>(x, "ToString"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<TMP_Text>(x, "set_text") })) { Log.Error("COULD NOT IL HOOK ScoreboardStrip_UpdateItemCountText"); Log.Warning($"cursor is {val}"); Log.Warning($"il is {il}"); return; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Action<ScoreboardStrip>>((Action<ScoreboardStrip>)delegate(ScoreboardStrip scoreboardStrip) { if (!IsHudUserBlacklisted && ConfigOptions.EnableScoreboardItemHighlightColoring.Value) { ((MonoBehaviour)MyHud).StartCoroutine(HudColor.DelayColorItemIconHighlights(scoreboardStrip)); } }); } } internal static class Events { internal static void InfiniteTowerRun_onWaveInitialized(InfiniteTowerWaveController obj) { if (!IsHudUserBlacklisted) { ((MonoBehaviour)MyHud).StartCoroutine(HudDetails.DelayRemoveSimulacrumWavePopUpPanelDetails()); ((MonoBehaviour)MyHud).StartCoroutine(HudDetails.DelayRemoveTimeUntilNextWaveBackground()); } } } internal static class Helpers { 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; result.b = rgbColor.b * colorIntensityMultiplier; result.a = rgbColor.a * transparencyMultiplier; return result; } internal static void LogMissingHudVariable(string methodName, string variableName, string containingClassName = null) { string text = "Could not do " + methodName; if (containingClassName != null) { text = text + " in " + containingClassName; } text = text + "! The " + variableName + " was null or did it not exist!"; Log.Error(text); } internal static bool AreColorsEqualIgnoringAlpha(Color color1, Color color2) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (color1.r == color2.r && color1.g == color2.g) { return color1.b == color2.b; } return false; } internal static bool IsCharacterBodyBlacklisted(CharacterBody characterBody) { Log.Debug("characterBody.name is " + ((Object)characterBody).name); return ConfigOptions.BodyNameBlacklist_Array.Contains(((Object)characterBody).name); } } internal static HUD MyHud = null; internal static bool IsHudFinishedLoading = false; internal static bool IsHudUserBlacklisted = false; internal static List<Color> LastKnownScoreboardBodyColors = new List<Color>(); internal static bool IsHudEditable { get { if (IsHudFinishedLoading) { return !IsHudUserBlacklisted; } return false; } } internal static CharacterBody HudTargetBody { get { if (!Object.op_Implicit((Object)(object)MyHud)) { Log.Error("HUD did not exist when trying to get HudTargetBody!"); } if (!Object.op_Implicit((Object)(object)MyHud.targetBodyObject)) { Log.Error("HUD did not have a valid targetBodyObject!"); } return MyHud.targetBodyObject.GetComponent<CharacterBody>(); } } 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; } } } internal static class ModSupport { internal static class RiskOfOptionsMod { private static bool? _modexists; public static bool ModIsRunning { get { if (!_modexists.HasValue) { _modexists = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); } return _modexists.Value; } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static void AddOptions() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown ModSettingsManager.SetModIcon(Assets.ModIconAssetBundle.LoadAsset<Sprite>("CleanestHudIcon.png")); ModSettingsManager.SetModDescription("Adds an artifact that disables proc chains and prevents most items from starting a proc chain."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(ConfigOptions.HudTransparency, new StepSliderConfig { min = 0f, max = 1f, increment = 0.025f })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ConfigOptions.ShowSkillKeybinds)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ConfigOptions.ShowSprintAndInventoryKeybinds)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ConfigOptions.AllowInspectPanelFadeIn)); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(ConfigOptions.InspectPanelFadeInDuration, new StepSliderConfig { min = 0.025f, max = 10f, increment = 0.025f })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ConfigOptions.EnableAllyCardBackgrounds)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ConfigOptions.EnableAutoScoreboardHighlight)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ConfigOptions.EnableGradualDifficultyBarColor)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ConfigOptions.EnableScoreboardItemHighlightColoring)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ConfigOptions.AllowSimulacrumWaveBarAnimating)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ConfigOptions.AllowVoidFiendMeterAnimating)); ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)ConfigOptions.SeekerMeditateHudPosition)); ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)ConfigOptions.SeekerLotusHudPosition)); ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(ConfigOptions.BodyNameBlacklist_Config)); } } internal static class Starstorm2 { internal static class CompositeInjectorSupport { [CompilerGenerated] private sealed class <DelayColorInjectorSlots>d__2 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DelayColorInjectorSlots>d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; ColorInjectorSlots(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <DelayEditInjectorSlots>d__0 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DelayEditInjectorSlots>d__0(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; EditInjectorSlots(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [IteratorStateMachine(typeof(<DelayEditInjectorSlots>d__0))] internal static IEnumerator DelayEditInjectorSlots() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DelayEditInjectorSlots>d__0(0); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static void EditInjectorSlots() { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) IconHolder val = default(IconHolder); if (!ModIsRunning || !Main.IsHudFinishedLoading || !((Component)Main.MyHud).gameObject.TryGetComponent<IconHolder>(ref val)) { return; } Vector3 val2 = default(Vector3); for (int i = 0; i < val.icons.Length && val.icons[i].displayRoot.activeSelf; i++) { Transform transform = val.icons[i].displayRoot.transform; ((Component)transform).GetComponent<RectTransform>(); ((Component)val.icons[i]).GetComponent<RectTransform>(); ((Component)val.icons[i]).transform.position = new Vector3(4.75f, -5.2f, 12.8f); Vector3 zero = Vector3.zero; zero.y -= 107 * (i / 10); zero.x += 100 * (i % 10); Transform transform2 = ((Component)val.icons[i]).transform; transform2.localPosition += zero; Transform child = transform.GetChild(0); ((Component)child).gameObject.SetActive(false); ((Vector3)(ref val2))..ctor(1.1f, 1.1f, 1.1f); if (child.localScale != val2) { HudStructure.ScaleEquipmentSlot(transform, 1.1f); } } } [IteratorStateMachine(typeof(<DelayColorInjectorSlots>d__2))] internal static IEnumerator DelayColorInjectorSlots() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DelayColorInjectorSlots>d__2(0); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static void ColorInjectorSlots() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) IconHolder val = default(IconHolder); if (!ModIsRunning || !Main.IsHudFinishedLoading || !((Component)Main.MyHud).gameObject.TryGetComponent<IconHolder>(ref val)) { return; } EquipmentIconButEpic[] icons = val.icons; foreach (EquipmentIconButEpic val2 in icons) { if (!val2.displayRoot.activeSelf) { break; } Transform transform = val2.displayRoot.transform; ((Graphic)((Component)transform.GetChild(0)).GetComponent<Image>()).color = Main.Helpers.GetAdjustedColor(HudColor.SurvivorColor, 1f, 1f, 0.643f); ((Graphic)((Component)transform.Find("BGPanel")).GetComponent<Image>()).color = Main.Helpers.GetAdjustedColor(HudColor.SurvivorColor, 1f, 1f, 0.643f); } } } private static bool? _modexists; internal static int KnownInjectorSlotCount = -1; internal static bool ModIsRunning { get { if (!_modexists.HasValue) { _modexists = Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm"); } return _modexists.Value; } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static void CharacterBody_onBodyInventoryChangedGlobal(CharacterBody characterBody) { if (!Main.IsHudFinishedLoading) { Log.Debug("onBodyInventoryChangedGlobal happened while the HUD was not done loading, returning"); return; } int itemCount = characterBody.inventory.GetItemCount(Items.CompositeInjector); if (itemCount != KnownInjectorSlotCount) { KnownInjectorSlotCount = itemCount; ((MonoBehaviour)Main.MyHud).StartCoroutine(CompositeInjectorSupport.DelayEditInjectorSlots()); ((MonoBehaviour)Main.MyHud).StartCoroutine(CompositeInjectorSupport.DelayColorInjectorSlots()); } } } internal static class LookingGlassMod { [CompilerGenerated] private sealed class <DelayRemoveLookingGlassStatsPanelBackground>d__6 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private Transform <rightInfoBar>5__2; private Transform <playerStats>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DelayRemoveLookingGlassStatsPanelBackground>d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <rightInfoBar>5__2 = null; <playerStats>5__3 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: { <>1__state = -1; Transform child = ((Component)Main.MyHud.gameModeUiRoot).transform.GetChild(0); <rightInfoBar>5__2 = child.Find("RightInfoBar"); <playerStats>5__3 = null; goto IL_008e; } case 2: <>1__state = -1; goto IL_008e; case 3: { <>1__state = -1; break; } IL_008e: if (!Object.op_Implicit((Object)(object)<rightInfoBar>5__2.Find("PlayerStats"))) { Log.Debug("Couldn't find LookingGlass PlayerStats, waiting a lil bit"); <>2__current = null; <>1__state = 2; return true; } <playerStats>5__3 = <rightInfoBar>5__2.Find("PlayerStats"); break; } PanelSkinController val = default(PanelSkinController); if (!((Component)<playerStats>5__3).TryGetComponent<PanelSkinController>(ref val)) { Log.Debug("Couldn't find LookingGlass PlayerStats PanelSkinController, waiting a lil bit"); <>2__current = null; <>1__state = 3; return true; } RemoveLookingGlassStatsPanelBackground(<playerStats>5__3); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private static bool? _modexists; internal static bool ModIsRunning { get { if (!_modexists.HasValue) { _modexists = Chainloader.PluginInfos.ContainsKey("droppod.lookingglass"); } return _modexists.Value; } } internal static ConfigEntry<bool> StatsPanelEnabledConfig { get { if (ModIsRunning) { return StatsDisplayClass.statsDisplay; } return null; } } internal static void StatsPanelEnabledConfig_SettingChanged(object sender, EventArgs e) { if (Main.IsHudFinishedLoading && StatsPanelEnabledConfig.Value) { ((MonoBehaviour)Main.MyHud).StartCoroutine(DelayRemoveLookingGlassStatsPanelBackground()); } } [IteratorStateMachine(typeof(<DelayRemoveLookingGlassStatsPanelBackground>d__6))] internal static IEnumerator DelayRemoveLookingGlassStatsPanelBackground() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DelayRemoveLookingGlassStatsPanelBackground>d__6(0); } private static void RemoveLookingGlassStatsPanelBackground(Transform playerStats) { Object.Destroy((Object)(object)((Component)playerStats).GetComponent<PanelSkinController>()); Object.Destroy((Object)(object)((Component)playerStats).GetComponent<Image>()); } } } [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("LordVGames.CleanestHud", "CleanestHud", "0.9.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { [CompilerGenerated] private static class <>O { public static hook_Awake <0>__HUD_Awake; public static hook_OnDestroy <1>__HUD_OnDestroy; public static hook_OnTargetChanged <2>__CameraModeBase_OnTargetChanged; public static hook_Awake <3>__AllyCardController_Awake; public static hook_UpdateInfo <4>__AllyCardController_UpdateInfo; public static hook_OnEnable <5>__InfiniteTowerWaveProgressBar_OnEnable; public static hook_SetUpNotification <6>__NotificationUIController_SetUpNotification; public static hook_Rebuild <7>__ScoreboardController_Rebuild; public static hook_SelectFirstScoreboardStrip <8>__ScoreboardController_SelectFirstScoreboardStrip; public static hook_OnCurrentSegmentIndexChanged <9>__DifficultyBarController_OnCurrentSegmentIndexChanged; public static hook_OnOverlayInstanceAdded <10>__VoidSurvivorController_OnOverlayInstanceAdded; public static hook_SetupInputUIIcons <11>__MeditationUI_SetupInputUIIcons; public static Manipulator <12>__BuffDisplay_UpdateLayout; public static Manipulator <13>__ScoreboardStrip_UpdateItemCountText; public static Action<InfiniteTowerWaveController> <14>__InfiniteTowerRun_onWaveInitialized; public static Action<CharacterBody> <15>__CharacterBody_onBodyInventoryChangedGlobal; } public const string PluginAuthor = "LordVGames"; public const string PluginName = "CleanestHud"; public const string PluginVersion = "0.9.0"; public const string PluginGUID = "LordVGames.CleanestHud"; public static PluginInfo PluginInfo { get; private set; } public void Awake() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Expected O, but got Unknown //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Expected O, but got Unknown PluginInfo = ((BaseUnityPlugin)this).Info; Log.Init(((BaseUnityPlugin)this).Logger); Assets.Init(); ConfigOptions.BindConfigOptions(((BaseUnityPlugin)this).Config); HudResources.HudAssets.LoadHudAssets(); HudStructure.AssetEdits.EditHudElementPrefabs(); HudDetails.AssetEdits.RemoveHudElementPrefabDetails(); object obj = <>O.<0>__HUD_Awake; if (obj == null) { hook_Awake val = Main.OnHooks.HUD_Awake; <>O.<0>__HUD_Awake = val; obj = (object)val; } HUD.Awake += (hook_Awake)obj; object obj2 = <>O.<1>__HUD_OnDestroy; if (obj2 == null) { hook_OnDestroy val2 = Main.OnHooks.HUD_OnDestroy; <>O.<1>__HUD_OnDestroy = val2; obj2 = (object)val2; } HUD.OnDestroy += (hook_OnDestroy)obj2; object obj3 = <>O.<2>__CameraModeBase_OnTargetChanged; if (obj3 == null) { hook_OnTargetChanged val3 = Main.OnHooks.CameraModeBase_OnTargetChanged; <>O.<2>__CameraModeBase_OnTargetChanged = val3; obj3 = (object)val3; } CameraModeBase.OnTargetChanged += (hook_OnTargetChanged)obj3; object obj4 = <>O.<3>__AllyCardController_Awake; if (obj4 == null) { hook_Awake val4 = Main.OnHooks.AllyCardController_Awake; <>O.<3>__AllyCardController_Awake = val4; obj4 = (object)val4; } AllyCardController.Awake += (hook_Awake)obj4; object obj5 = <>O.<4>__AllyCardController_UpdateInfo; if (obj5 == null) { hook_UpdateInfo val5 = Main.OnHooks.AllyCardController_UpdateInfo; <>O.<4>__AllyCardController_UpdateInfo = val5; obj5 = (object)val5; } AllyCardController.UpdateInfo += (hook_UpdateInfo)obj5; object obj6 = <>O.<5>__InfiniteTowerWaveProgressBar_OnEnable; if (obj6 == null) { hook_OnEnable val6 = Main.OnHooks.InfiniteTowerWaveProgressBar_OnEnable; <>O.<5>__InfiniteTowerWaveProgressBar_OnEnable = val6; obj6 = (object)val6; } InfiniteTowerWaveProgressBar.OnEnable += (hook_OnEnable)obj6; object obj7 = <>O.<6>__NotificationUIController_SetUpNotification; if (obj7 == null) { hook_SetUpNotification val7 = Main.OnHooks.NotificationUIController_SetUpNotification; <>O.<6>__NotificationUIController_SetUpNotification = val7; obj7 = (object)val7; } NotificationUIController.SetUpNotification += (hook_SetUpNotification)obj7; object obj8 = <>O.<7>__ScoreboardController_Rebuild; if (obj8 == null) { hook_Rebuild val8 = Main.OnHooks.ScoreboardController_Rebuild; <>O.<7>__ScoreboardController_Rebuild = val8; obj8 = (object)val8; } ScoreboardController.Rebuild += (hook_Rebuild)obj8; object obj9 = <>O.<8>__ScoreboardController_SelectFirstScoreboardStrip; if (obj9 == null) { hook_SelectFirstScoreboardStrip val9 = Main.OnHooks.ScoreboardController_SelectFirstScoreboardStrip; <>O.<8>__ScoreboardController_SelectFirstScoreboardStrip = val9; obj9 = (object)val9; } ScoreboardController.SelectFirstScoreboardStrip += (hook_SelectFirstScoreboardStrip)obj9; object obj10 = <>O.<9>__DifficultyBarController_OnCurrentSegmentIndexChanged; if (obj10 == null) { hook_OnCurrentSegmentIndexChanged val10 = Main.OnHooks.DifficultyBarController_OnCurrentSegmentIndexChanged; <>O.<9>__DifficultyBarController_OnCurrentSegmentIndexChanged = val10; obj10 = (object)val10; } DifficultyBarController.OnCurrentSegmentIndexChanged += (hook_OnCurrentSegmentIndexChanged)obj10; object obj11 = <>O.<10>__VoidSurvivorController_OnOverlayInstanceAdded; if (obj11 == null) { hook_OnOverlayInstanceAdded val11 = Main.OnHooks.VoidSurvivorController_OnOverlayInstanceAdded; <>O.<10>__VoidSurvivorController_OnOverlayInstanceAdded = val11; obj11 = (object)val11; } VoidSurvivorController.OnOverlayInstanceAdded += (hook_OnOverlayInstanceAdded)obj11; object obj12 = <>O.<11>__MeditationUI_SetupInputUIIcons; if (obj12 == null) { hook_SetupInputUIIcons val12 = Main.OnHooks.MeditationUI_SetupInputUIIcons; <>O.<11>__MeditationUI_SetupInputUIIcons = val12; obj12 = (object)val12; } MeditationUI.SetupInputUIIcons += (hook_SetupInputUIIcons)obj12; object obj13 = <>O.<12>__BuffDisplay_UpdateLayout; if (obj13 == null) { Manipulator val13 = Main.ILHooks.BuffDisplay_UpdateLayout; <>O.<12>__BuffDisplay_UpdateLayout = val13; obj13 = (object)val13; } BuffDisplay.UpdateLayout += (Manipulator)obj13; object obj14 = <>O.<13>__ScoreboardStrip_UpdateItemCountText; if (obj14 == null) { Manipulator val14 = Main.ILHooks.ScoreboardStrip_UpdateItemCountText; <>O.<13>__ScoreboardStrip_UpdateItemCountText = val14; obj14 = (object)val14; } ScoreboardStrip.UpdateItemCountText += (Manipulator)obj14; InfiniteTowerRun.onWaveInitialized += Main.Events.InfiniteTowerRun_onWaveInitialized; if (ModSupport.Starstorm2.ModIsRunning) { CharacterBody.onBodyInventoryChangedGlobal += ModSupport.Starstorm2.CharacterBody_onBodyInventoryChangedGlobal; } } } } namespace CleanestHud.HudChanges { internal class Components { public class DifficultyBarBackgroundColorChanger : MonoBehaviour { public Color newColor; public Image backgroundImage; public void Start() { backgroundImage = ((Component)this).GetComponent<Image>(); } public void LateUpdate() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (((Graphic)backgroundImage).color.a < newColor.a) { ((Graphic)backgroundImage).color = newColor; } } } public class DifficultyScalingBarColorChanger : MonoBehaviour { public Color newColor; public Image segment; public void Start() { segment = ((Component)this).GetComponent<Image>(); } public void Update() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ((Graphic)segment).color = newColor; } } public class ScoreboardStripEditor : MonoBehaviour { private Transform longBackground; private RectTransform classBackgroundRect; public Vector3 ClassBackgroundRectLocalPosition; public Vector3 ClassBackgroundRectLocalScale; public Vector2 ClassBackgroundRectPivot; private RectTransform itemsBackgroundRect; public Vector3 ItemsBackgroundRectLocalPosition; public Vector2 ItemsBackgroundRectPivot; private RectTransform equipmentBackgroundRect; public Vector3 EquipmentBackgroundRectLocalPosition; public Vector3 EquipmentBackgroundRectLocalScale; public Vector2 EquipmentBackgroundRectPivot; public void Start() { longBackground = ((Component)this).transform.GetChild(0); classBackgroundRect = ((Component)longBackground.Find("ClassBackground")).GetComponent<RectTransform>(); equipmentBackgroundRect = ((Component)longBackground.Find("EquipmentBackground")).GetComponent<RectTransform>(); itemsBackgroundRect = ((Component)longBackground.Find("ItemsBackground")).GetComponent<RectTransform>(); } public void Update() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) if (((Transform)itemsBackgroundRect).localPosition != ItemsBackgroundRectLocalPosition) { ((Transform)itemsBackgroundRect).localPosition = ItemsBackgroundRectLocalPosition; itemsBackgroundRect.pivot = ItemsBackgroundRectPivot; } if (((Transform)equipmentBackgroundRect).localPosition != EquipmentBackgroundRectLocalPosition) { ((Transform)equipmentBackgroundRect).localPosition = EquipmentBackgroundRectLocalPosition; ((Transform)equipmentBackgroundRect).localScale = EquipmentBackgroundRectLocalScale; equipmentBackgroundRect.pivot = EquipmentBackgroundRectPivot; } if (((Transform)classBackgroundRect).localPosition != ClassBackgroundRectLocalPosition) { ((Transform)classBackgroundRect).localPosition = ClassBackgroundRectLocalPosition; ((Transform)classBackgroundRect).localScale = ClassBackgroundRectLocalScale; classBackgroundRect.pivot = ClassBackgroundRectPivot; } } } public class SimulacrumBarEditor : MonoBehaviour { public Vector3 idealLocalPosition; public Vector3 idealLocalScale; public RectTransform rectTrans; public void Start() { rectTrans = ((Component)this).GetComponent<RectTransform>(); } public void LateUpdate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) ((Transform)rectTrans).localPosition = idealLocalPosition; ((Transform)rectTrans).localScale = idealLocalScale; } } public class SimulacrumBarColorChanger : MonoBehaviour { public Image fillBar; public Color newFillBarColor; public void Start() { fillBar = ((Component)this).GetComponent<Image>(); } public void LateUpdate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ((Graphic)fillBar).color = newFillBarColor; } } } internal class Helpers { internal static Transform GetContainerFromScoreboardPanel(Transform scoreboardPanel) { Transform child = scoreboardPanel.GetChild(0); if (((Object)child).name == "CommandQueueScoreboardWrapper") { child = child.GetChild(0); } return child; } internal static bool TestLevelDisplayClusterAvailability() { Transform val = Main.MyHud.mainUIPanel.transform.Find("SpringCanvas").Find("BottomCenterCluster").Find("BarRoots"); try { val.Find("LevelDisplayCluster"); } catch { Log.Info("levelDisplayCluster could not be found, not coloring hud\nthis can mean something messed up, but more than likely everthing is fine"); return false; } return true; } } internal class HudColor { [CompilerGenerated] private sealed class <ColorBackdropImageOverFadeIn>d__14 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Transform backdrop; private Image <backdropImage>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ColorBackdropImageOverFadeIn>d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <backdropImage>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <backdropImage>5__2 = ((Component)backdrop).GetComponent<Image>(); break; case 1: <>1__state = -1; break; } if (!Main.Helpers.AreColorsEqualIgnoringAlpha(((Graphic)<backdropImage>5__2).color, SurvivorColor)) { Color survivorColor = SurvivorColor; survivorColor.a = 0.055f; ((Graphic)<backdropImage>5__2).color = survivorColor; <>2__current = null; <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <DelayColorItemIconHighlights>d__19 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public ScoreboardStrip scoreboardStrip; public bool resetColors; private Transform <longBackground>5__2; private Color <colorToUse>5__3; private List<ItemIcon>.Enumerator <>7__wrap3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DelayColorItemIconHighlights>d__19(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 2) { try { } finally { <>m__Finally1(); } } <longBackground>5__2 = null; <>7__wrap3 = default(List<ItemIcon>.Enumerator); <>1__state = -2; } private bool MoveNext() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <longBackground>5__2 = ((Component)scoreboardStrip).transform.GetChild(0); if (resetColors) { <colorToUse>5__3 = Color.white; } else { <colorToUse>5__3 = scoreboardStrip.userBody.bodyColor; } <>7__wrap3 = scoreboardStrip.itemInventoryDisplay.itemIcons.GetEnumerator(); <>1__state = -3; break; case 2: <>1__state = -3; break; } if (<>7__wrap3.MoveNext()) { ((Graphic)((Component)((Component)<>7__wrap3.Current).transform.GetChild(1)).GetComponent<RawImage>()).color = <colorToUse>5__3; <>2__current = null; <>1__state = 2; return true; } <>m__Finally1(); <>7__wrap3 = default(List<ItemIcon>.Enumerator); ((Graphic)((Component)<longBackground>5__2.GetChild(7).GetChild(1)).GetComponent<RawImage>()).color = <colorToUse>5__3; return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; ((IDisposable)<>7__wrap3).Dispose(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private static Color _survivorColor; public const float DefaultHudColorIntensity = 0.643f; public const float DefaultSurvivorColorMultiplier = 0.85f; public static Color SurvivorColor { get { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return _survivorColor; } set { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) Log.Debug("SurvivorColor has changed!"); Log.Debug($"New color will be {value}"); Color currentHudColor = CurrentHudColor; Log.Debug($"currentColor is {currentHudColor}"); if (value == currentHudColor) { Log.Debug("Value is the same as current color. Returning."); return; } if (currentHudColor == Color.clear) { Log.Debug("Current color is clear. Returning."); return; } _survivorColor = value; UpdateHudColor(); } } public static Color CurrentHudColor { get { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (!Main.IsHudFinishedLoading) { Log.Error("Tried to get the HUD color, but the HUD has not finished loading!"); return Color.clear; } return ((Graphic)Main.MyHud.skillIcons[0].isReadyPanelObject.GetComponent<Image>()).color; } } public static void UpdateHudColor() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) Log.Debug("UpdateHudColor"); if (Helpers.TestLevelDisplayClusterAvailability()) { Transform val = HudResources.ImportantHudTransforms.RunInfoHudPanel.Find("InfiniteTowerDefaultWaveUI(Clone)"); if (Main.IsGameModeSimulacrum && Object.op_Implicit((Object)(object)val)) { ColorSimulacrumWaveProgressBar(val.Find("FillBarRoot")); } else { ColorDifficultyBar(); } Log.Debug($"SurvivorColor is {SurvivorColor}"); ColorXpBar(HudResources.ImportantHudTransforms.BarRoots.Find("LevelDisplayCluster").Find("ExpBarRoot")); ColorSkillAndEquipmentSlots(); ColorCurrenciesPanel(); ColorInspectionPanel(Helpers.GetContainerFromScoreboardPanel(HudResources.ImportantHudTransforms.SpringCanvas.Find("ScoreboardPanel"))); } } private static void ColorXpBar(Transform xpBarRoot) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) Image component = ((Component)xpBarRoot.Find("ShrunkenRoot").Find("FillPanel")).GetComponent<Image>(); Color survivorColor = SurvivorColor; survivorColor.a = 0.72f; ((Graphic)component).color = survivorColor; } private static void ColorSkillAndEquipmentSlots() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) GameObject isReadyPanelObject = Main.MyHud.skillIcons[0].isReadyPanelObject; GameObject isReadyPanelObject2 = Main.MyHud.skillIcons[1].isReadyPanelObject; GameObject isReadyPanelObject3 = Main.MyHud.skillIcons[2].isReadyPanelObject; GameObject isReadyPanelObject4 = Main.MyHud.skillIcons[3].isReadyPanelObject; Transform transform = Main.MyHud.equipmentIcons[0].displayRoot.transform; Transform val = transform.Find("IsReadyPanel"); Transform val2 = transform.Find("BGPanel"); Transform transform2 = Main.MyHud.equipmentIcons[1].displayRoot.transform; Transform val3 = transform2.Find("IsReadyPanel"); Transform val4 = transform2.Find("BGPanel"); ((Graphic)isReadyPanelObject.GetComponent<Image>()).color = SurvivorColor; ((Graphic)isReadyPanelObject2.GetComponent<Image>()).color = SurvivorColor; ((Graphic)isReadyPanelObject3.GetComponent<Image>()).color = SurvivorColor; ((Graphic)isReadyPanelObject4.GetComponent<Image>()).color = SurvivorColor; ((Graphic)((Component)val).GetComponent<Image>()).color = SurvivorColor; ((Graphic)((Component)val2).GetComponent<Image>()).color = Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 0.643f); ((Graphic)((Component)val3).GetComponent<Image>()).color = SurvivorColor; ((Graphic)((Component)val4).GetComponent<Image>()).color = Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 0.643f); if (ModSupport.Starstorm2.ModIsRunning) { ((MonoBehaviour)Main.MyHud).StartCoroutine(ModSupport.Starstorm2.CompositeInjectorSupport.DelayColorInjectorSlots()); } } private static void ColorCurrenciesPanel() { //IL_004a: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)Main.MyHud.moneyText).transform; Transform val = transform.Find("BackgroundPanel"); Transform parent = transform.parent; Transform val2 = parent.Find("LunarCoinRoot").Find("BackgroundPanel"); Transform obj = parent.Find("VoidCoinRoot").Find("BackgroundPanel"); Color adjustedColor = Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 0.643f); ((Graphic)((Component)val).GetComponent<RawImage>()).color = adjustedColor; ((Graphic)((Component)val2).GetComponent<RawImage>()).color = adjustedColor; ((Graphic)((Component)obj).GetComponent<RawImage>()).color = adjustedColor; } private static void ColorInspectionPanel(Transform container) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) ((Graphic)((Component)container.Find("InspectPanel").GetChild(0).GetChild(0)).GetComponent<Image>()).color = new Color(SurvivorColor.r, SurvivorColor.g, SurvivorColor.b, 0.3f); } internal static void ColorDifficultyBar() { //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) Transform val = HudResources.ImportantHudTransforms.RunInfoHudPanel.Find("DifficultyBar"); Transform obj = val.Find("Scroll View"); Transform backdrop = obj.Find("Backdrop"); obj.Find("Viewport").Find("Content"); Color[] array = Array.Empty<Color>(); array = (Color[])((!ConfigOptions.EnableGradualDifficultyBarColor.Value) ? ((Array)Enumerable.Repeat<Color>(SurvivorColor, 9).ToArray()) : ((Array)new Color[9] { SurvivorColor, Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 8f / 9f), Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 7f / 9f), Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 2f / 3f), Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 5f / 9f), Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 4f / 9f), Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 1f / 3f), Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 2f / 9f), Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 1f / 9f) })); DifficultyBarController component = ((Component)val).GetComponent<DifficultyBarController>(); for (int i = 0; i < component.segmentDefs.Length; i++) { component.segmentDefs[i].color = array[i]; } for (int j = 0; j < component.images.Length; j++) { (((Component)component.images[j]).gameObject.GetComponent<Components.DifficultyScalingBarColorChanger>() ?? ((Component)component.images[j]).gameObject.AddComponent<Components.DifficultyScalingBarColorChanger>()).newColor = array[j]; } ((MonoBehaviour)Main.MyHud).StartCoroutine(ColorBackdropImageOverFadeIn(backdrop)); } [IteratorStateMachine(typeof(<ColorBackdropImageOverFadeIn>d__14))] private static IEnumerator ColorBackdropImageOverFadeIn(Transform backdrop) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ColorBackdropImageOverFadeIn>d__14(0) { backdrop = backdrop }; } internal static void ColorSimulacrumWaveProgressBar(Transform fillBarRoot) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) if (Main.AreSimulacrumWavesRunning) { ((Graphic)((Component)fillBarRoot.GetChild(2)).GetComponent<Image>()).color = Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 0.5f); Image component = ((Component)fillBarRoot.GetChild(3)).GetComponent<Image>(); (((Component)component).GetComponent<Components.SimulacrumBarColorChanger>() ?? ((Component)component).gameObject.AddComponent<Components.SimulacrumBarColorChanger>()).newFillBarColor = Main.Helpers.GetAdjustedColor(SurvivorColor, 1f, 1f, 0.5f); } } internal static void HandleItemIconColoring(ScoreboardController scoreboardController) { if (Main.LastKnownScoreboardBodyColors.Count != scoreboardController.stripAllocator.elements.Count) { ReBuildLastKnownScoreboardBodyColors(scoreboardController); } HandleAnyChangedScoreboardStripBodyColors(scoreboardController); } private static void ReBuildLastKnownScoreboardBodyColors(ScoreboardController scoreboardController) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) Main.LastKnownScoreboardBodyColors.Clear(); foreach (ScoreboardStrip element in scoreboardController.stripAllocator.elements) { Main.LastKnownScoreboardBodyColors.Add(element.userBody.bodyColor); } } private static void HandleAnyChangedScoreboardStripBodyColors(ScoreboardController scoreboardController) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < scoreboardController.stripAllocator.elements.Count; i++) { if (scoreboardController.stripAllocator.elements[i].userBody.bodyColor != Main.LastKnownScoreboardBodyColors[i]) { Main.LastKnownScoreboardBodyColors[i] = scoreboardController.stripAllocator.elements[i].userBody.bodyColor; ((MonoBehaviour)Main.MyHud).StartCoroutine(DelayColorItemIconHighlights(scoreboardController.stripAllocator.elements[i])); } } } [IteratorStateMachine(typeof(<DelayColorItemIconHighlights>d__19))] internal static IEnumerator DelayColorItemIconHighlights(ScoreboardStrip scoreboardStrip, bool resetColors = false) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DelayColorItemIconHighlights>d__19(0) { scoreboardStrip = scoreboardStrip, resetColors = resetColors }; } internal static void ColorScoreboardStrip(ScoreboardStrip scoreboardStrip) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_0081: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)scoreboardStrip).transform; if (!((Object)(object)scoreboardStrip.userBody == (Object)null)) { Image component = ((Component)transform.GetChild(0)).GetComponent<Image>(); Color bodyColor = scoreboardStrip.userBody.bodyColor; bodyColor.a = 0.15f; if (!(((Graphic)component).color == bodyColor)) { ((Graphic)component).color = bodyColor; Color adjustedColor = Main.Helpers.GetAdjustedColor(scoreboardStrip.userBody.bodyColor, 1f, 3f); ((Graphic)((Component)transform).gameObject.GetComponent<RawImage>()).color = adjustedColor; } } } internal static void ColorAllyCardControllerBackground(AllyCardController allyCardController) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)allyCardController) && Object.op_Implicit((Object)(object)allyCardController.cachedSourceCharacterBody)) { Image component = ((Component)allyCardController).GetComponent<Image>(); Color bodyColor = allyCardController.cachedSourceCharacterBody.bodyColor; bodyColor.a = 0.15f; component.sprite = HudResources.HudAssets.WhiteSprite; ((Graphic)component).color = bodyColor; } } internal static void ColorAllAllyCardBackgrounds() { Transform child = HudResources.ImportantHudTransforms.SpringCanvas.Find("LeftCluster").GetChild(0); for (int i = 0; i < child.childCount; i++) { ColorAllyCardControllerBackground(((Component)child.GetChild(i)).GetComponent<AllyCardController>()); } } } internal class HudDetails { internal static class AssetEdits { internal static void RemoveHudElementPrefabDetails() { RemoveMonsterPanelsHudDetails(); RemoveGameEndPanelDetails(); RemoveScoreboardStripAssetDetails(); RemoveMoonDetonationPanelDetails(); RemoveStatStripTemplateImage(); RemoveChatBoxDetails(); } private static void RemoveMonsterPanelsHudDetails() { ((Behaviour)HudResources.HudAssets.EnemyInfoPanel.GetComponent<Image>()).enabled = false; Transform obj = HudResources.HudAssets.EnemyInfoPanel.transform.Find("InnerFrame"); ((Behaviour)((Component)obj).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj.Find("MonsterBodiesContainer").Find("MonsterBodyIconContainer")).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj.Find("InventoryContainer").Find("InventoryDisplay")).GetComponent<Image>()).enabled = false; } private static void RemoveGameEndPanelDetails() { //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) Transform obj = HudResources.HudAssets.GameEndReportPanel.transform.Find("SafeArea (JUICED)"); Transform obj2 = obj.Find("HeaderArea"); Transform val = obj2.Find("DeathFlavorText"); Transform obj3 = obj2.Find("ResultArea").Find("ResultLabel"); HGTextMeshProUGUI component = ((Component)val).GetComponent<HGTextMeshProUGUI>(); ((TMP_Text)component).fontStyle = (FontStyles)0; ((TMP_Text)component).fontSizeMax = 30f; ((Graphic)((Component)obj3).GetComponent<HGTextMeshProUGUI>()).material = HudResources.HudAssets.FontMaterial; Transform obj4 = obj.Find("BodyArea"); Transform obj5 = obj4.Find("StatsAndChatArea"); Transform obj6 = obj5.Find("StatsContainer"); ((Component)obj6.Find("BorderImage")).gameObject.SetActive(false); ((Behaviour)((Component)obj6.Find("Stats And Player Nav").Find("Stats Header")).GetComponent<Image>()).enabled = false; Transform obj7 = obj6.Find("Stats Body"); ((Behaviour)((Component)obj7).GetComponent<Image>()).enabled = false; Transform obj8 = obj7.Find("ScrollView"); Transform obj9 = obj8.Find("Viewport").Find("Content"); ((Behaviour)((Component)obj9.Find("SelectedDifficultyStrip")).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj9.Find("EnabledArtifactsStrip")).GetComponent<Image>()).enabled = false; Transform obj10 = obj8.Find("Scrollbar Vertical"); ((Behaviour)((Component)obj10).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj10.Find("Sliding Area").Find("Handle")).GetComponent<Image>()).enabled = false; Transform obj11 = obj5.Find("ChatArea"); ((Behaviour)((Component)obj11).GetComponent<Image>()).enabled = false; RectTransform component2 = ((Component)obj11).GetComponent<RectTransform>(); ((Transform)component2).localPosition = new Vector3(441.5f, -311.66666f, 0f); ((Transform)component2).localEulerAngles = new Vector3(0f, 357f, 0f); component2.sizeDelta = new Vector2(832f, 200f); Transform obj12 = obj4.Find("RightArea").Find("InfoArea"); ((Behaviour)((Component)obj12.Find("BorderImage")).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj12.Find("Info Header")).GetComponent<Image>()).enabled = false; Transform obj13 = obj12.Find("Info Body"); Transform obj14 = obj13.Find("ItemArea"); ((Behaviour)((Component)obj14.Find("Item Header")).GetComponent<Image>()).enabled = false; Transform obj15 = obj14.Find("ScrollView"); ((Behaviour)((Component)obj15).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj15.Find("Scrollbar Vertical")).GetComponent<Image>()).enabled = false; Transform obj16 = obj13.Find("UnlockArea"); ((Behaviour)((Component)obj16.Find("Unlocked Header")).GetComponent<Image>()).enabled = false; Transform obj17 = obj16.Find("ScrollView"); ((Behaviour)((Component)obj17).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj17.Find("Scrollbar Vertical")).GetComponent<Image>()).enabled = false; } private static void RemoveScoreboardStripAssetDetails() { Transform obj = HudResources.HudAssets.ScoreboardStrip.transform.Find("LongBackground"); ((Behaviour)((Component)obj.Find("ClassBackground")).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj.Find("ItemsBackground")).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj.Find("EquipmentBackground")).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj.Find("NameLabel").Find("NameFocusHighlight")).GetComponent<Image>()).enabled = false; } private static void RemoveMoonDetonationPanelDetails() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) ((Transform)HudResources.HudAssets.MoonDetonationPanel.GetComponent<RectTransform>()).localPosition = new Vector3(576.4219f, -200f, 0f); Transform obj = HudResources.HudAssets.MoonDetonationPanel.transform.Find("Juice").Find("Container"); ((Behaviour)((Component)obj.Find("Backdrop")).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj.Find("Border")).GetComponent<Image>()).enabled = false; HGTextMeshProUGUI component = ((Component)obj.Find("CountdownTitleLabel")).GetComponent<HGTextMeshProUGUI>(); ((TMP_Text)component).fontSharedMaterial = HudResources.HudAssets.FontMaterial; ((Graphic)component).color = Color.red; HGTextMeshProUGUI component2 = ((Component)obj.Find("CountdownLabel")).GetComponent<HGTextMeshProUGUI>(); ((TMP_Text)component2).fontSharedMaterial = HudResources.HudAssets.FontMaterial; ((Graphic)component2).color = Color.red; } private static void RemoveStatStripTemplateImage() { ((Behaviour)HudResources.HudAssets.StatStripTemplate.GetComponent<Image>()).enabled = false; } private static void RemoveChatBoxDetails() { //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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) ((Behaviour)HudResources.HudAssets.ChatBox.GetComponent<Image>()).enabled = false; Transform obj = HudResources.HudAssets.ChatBox.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 = HudResources.HudAssets.ChatBox.transform.Find("StandardRect").Find("Scroll View"); ((Behaviour)((Component)obj2.Find("Background")).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj2.Find("BorderImage")).GetComponent<Image>()).enabled = false; ((Behaviour)((Component)obj2.Find("Scrollbar Vertical")).GetComponent<Scrollbar>()).enabled = true; } } [CompilerGenerated] private sealed class <DelayEditAllyCardPortrait>d__35 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Transform portrait; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DelayEditAllyCardPortrait>d__35(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; EditAllyCardPortrait(portr