using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using DG.Tweening;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using PEAKLib.Core;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using Zorro.Core;
using Zorro.Core.CLI;
using pworld.Scripts.Extensions;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("com.github.MiiMii1205.TimeTheme")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyInformationalVersion("0.1.0+8c849a456ce4a3c72578cb1b5145b7c8a9d15571")]
[assembly: AssemblyProduct("com.github.MiiMii1205.TimeTheme")]
[assembly: AssemblyTitle("TimeTheme")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace BepInEx
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[Conditional("CodeGeneration")]
internal sealed class BepInAutoPluginAttribute : Attribute
{
public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
{
}
}
}
namespace BepInEx.Preloader.Core.Patching
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[Conditional("CodeGeneration")]
internal sealed class PatcherAutoPluginAttribute : Attribute
{
public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
{
}
}
}
namespace TimeTheme
{
public class TimeThemePatcher
{
[HarmonyPatch(typeof(RunManager), "StartRun")]
[HarmonyPostfix]
public static void RunManagerAwakePostfix(RunManager __instance)
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Invalid comparison between Unknown and I4
TimeThemePlugin.RefreshGraphicLists();
TimeThemePlugin.SwitchTheme(DayNightManager.instance.isDay > 0.5f || (int)Singleton<MapHandler>.Instance.GetCurrentSegment() >= 3);
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.github.MiiMii1205.TimeTheme", "TimeTheme", "0.1.0")]
public class TimeThemePlugin : BaseUnityPlugin
{
private bool m_isDay = true;
private static Graphic[] m_graphs = Array.Empty<Graphic>();
private static Animator[] m_anims = Array.Empty<Animator>();
private static Tuple<Color, Color> m_rebindDefaultTextColors = new Tuple<Color, Color>(new Color(0.8745098f, 0.854902f, 0.7607843f, 1f), new Color(0.654902f, 32f / 85f, 64f / 85f, 1f));
private static Tuple<Color, Color> m_rebindOverridenTextColors = new Tuple<Color, Color>(new Color(0.8679245f, 0.7459151f, 0.3316127f, 1f), new Color(0.8901961f, 0.6313726f, 1f, 1f));
private static Tuple<Color, Color>[] m_dayNightColors = new Tuple<Color, Color>[20]
{
new Tuple<Color, Color>(new Color(139f / 159f, 0.8567384f, 0.7615007f, 1f), new Color(0.6509804f, 32f / 85f, 64f / 85f, 1f)),
new Tuple<Color, Color>(new Color(79f / 106f, 0.6866916f, 0.6573958f, 1f), new Color(0.5254902f, 0.1921569f, 0.6352941f, 1f)),
new Tuple<Color, Color>(new Color(0.8745099f, 0.854902f, 0.7607844f, 1f), new Color(0.6509804f, 19f / 51f, 64f / 85f, 1f)),
new Tuple<Color, Color>(new Color(0.408805f, 0.3755061f, 0.3329575f, 1f), new Color(32f / 85f, 0.3176471f, 0.6431373f, 1f)),
new Tuple<Color, Color>(new Color(0.3396226f, 0.2996456f, 0.241901f, 1f), new Color(0.3058824f, 0.254902f, 44f / 85f, 1f)),
new Tuple<Color, Color>(new Color(0.5849056f, 0.3446479f, 0.08552865f, 0.4823529f), new Color(0.3333333f, 0.3254902f, 69f / 85f, 0.4823529f)),
new Tuple<Color, Color>(new Color(105f / 106f, 0.9718761f, 0.9485137f, 1f), new Color(0.772549f, 0.4745098f, 0.9294118f, 1f)),
new Tuple<Color, Color>(new Color(0.7735849f, 0.7577726f, 0.7261481f, 1f), new Color(0.772549f, 0.4745098f, 0.9294118f, 1f)),
new Tuple<Color, Color>(new Color(0.6289307f, 0.6142679f, 0.5438866f, 1f), new Color(0.4196078f, 0.1411765f, 0.5254902f, 1f)),
new Tuple<Color, Color>(new Color(0.9839351f, 1f, 0f, 1f), new Color(1f, 0.5568628f, 1f, 1f)),
new Tuple<Color, Color>(new Color(0.9119496f, 0.7547169f, 0f, 1f), new Color(0.9921569f, 0.4980392f, 1f, 1f)),
new Tuple<Color, Color>(new Color(1f, 0.9839351f, 0f, 1f), new Color(1f, 0.5607843f, 1f, 1f)),
new Tuple<Color, Color>(new Color(0.96855f, 0.83254f, 0.1797f, 1f), new Color(1f, 0.53333f, 1f, 1f)),
new Tuple<Color, Color>(new Color(0.2169367f, 0.2257782f, 209f / (326f * MathF.E), 1f), new Color(0.003921569f, 0.003921569f, 0.003921569f, 1f)),
new Tuple<Color, Color>(new Color(0.8941177f, 0.8627452f, 0.8235295f, 1f), new Color(0.6745098f, 0.372549f, 0.8078431f, 1f)),
new Tuple<Color, Color>(new Color(0.2509804f, 0.2078432f, 0.2941177f, 1f), new Color(5f / 51f, 0.1058824f, 0.4352941f, 1f)),
new Tuple<Color, Color>(new Color(0.2503782f, 0.20830372f, 0.2924528f, 1f), new Color(0.1019608f, 0.1058824f, 0.427451f, 1f)),
new Tuple<Color, Color>(new Color(1f, 0.4840535f, 0.4559748f, 1f), new Color(0.972549f, 0.6627451f, 0.572549f, 1f)),
new Tuple<Color, Color>(new Color(0.8679245f, 0.7459151f, 0.3316127f, 1f), new Color(0.8901961f, 0.6313726f, 1f, 1f)),
new Tuple<Color, Color>(new Color(0.8745098f, 0.854902f, 0.7607843f, 1f), new Color(0.654902f, 32f / 85f, 64f / 85f, 1f))
};
private static Tuple<Color, Color>[] m_dayNightButtonColors = new Tuple<Color, Color>[35]
{
new Tuple<Color, Color>(new Color(0.6603774f, 0.2775126f, 0.05918475f, 1f), new Color(0.3019608f, 0f, 0f, 1f)),
new Tuple<Color, Color>(new Color(93f / 106f, 0.4371066f, 0f, 1f), new Color(43f / 85f, 0.0627451f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.1415898f, 0.2924528f, 0.117257f, 1f), new Color(0f, 14f / 85f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.05117479f, 0.4339623f, 0.1149727f, 1f), new Color(0.02745098f, 21f / 85f, 0.02745098f, 1f)),
new Tuple<Color, Color>(new Color(0.7735849f, 0.5566919f, 0f, 1f), new Color(0.42745098f, 0.23137255f, 0f, 1f)),
new Tuple<Color, Color>(new Color(MathF.E * 105f / 302f, 0.7576478f, 0f, 1f), new Color(0.5921569f, 0.4117647f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.1850303f, 0.3939696f, 0.6226415f, 1f), new Color(0f, 7f / 85f, 0.2901961f, 1f)),
new Tuple<Color, Color>(new Color(0f, 0.5611874f, 63f / 106f, 1f), new Color(0f, 0.24313726f, 0.2784314f, 1f)),
new Tuple<Color, Color>(new Color(0.3918986f, 0.1843137f, 0.6235294f, 1f), new Color(0.11764706f, 0f, 0.2784314f, 1f)),
new Tuple<Color, Color>(new Color(0.5568805f, 0.1254894f, 0.8490566f, 1f), new Color(0.2509804f, 0f, 41f / 85f, 1f)),
new Tuple<Color, Color>(new Color(55f / 106f, 0.129717f, 0.1718048f, 1f), new Color(14f / 85f, 0f, 0f, 1f)),
new Tuple<Color, Color>(new Color(79f / 106f, 0.2057524f, 0f, 1f), new Color(0.36862746f, 0f, 0f, 1f)),
new Tuple<Color, Color>(new Color(79f / 106f, 0.6866916f, 0.6573958f, 1f), new Color(0.5254902f, 0.1921569f, 0.6352941f, 1f)),
new Tuple<Color, Color>(new Color(87f / 106f, 0.2682806f, 0.08904416f), new Color(0.4392157f, 0f, 0f, 1f)),
new Tuple<Color, Color>(new Color(1f, 0.4262996f, 0.25f, 1f), new Color(52f / 85f, 0f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.4006706f, 0.6039216f, 0.1411764f, 1f), new Color(8f / 85f, 0.2784314f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.640078f, 87f / 106f, 0.01935742f, 1f), new Color(27f / 85f, 0.47058824f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.185f, 0.394f, 0.6226f, 1f), new Color(0f, 7f / 85f, 0.28627452f, 1f)),
new Tuple<Color, Color>(new Color(0.1255718f, 0.267434f, 0.4226f, 1f), new Color(0f, 0f, 0.11372549f, 1f)),
new Tuple<Color, Color>(new Color(0.5189f, 0.1297f, 0.1718f, 1f), new Color(14f / 85f, 0f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.3189f, 0.07970964f, 0.105583f, 1f), new Color(0.007843138f, 0f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.3919f, 0.1843f, 0.6235f, 1f), new Color(0.11372549f, 0f, 0.2784314f, 1f)),
new Tuple<Color, Color>(new Color(0.2661904f, 0.1251821f, 0.4235f, 1f), new Color(2f / 85f, 0f, 9f / 85f, 1f)),
new Tuple<Color, Color>(new Color(0.6588235f, 0.2784314f, 1f / 17f, 1f), new Color(0.3019608f, 0f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.8784314f, 0.4352941f, 0f, 1f), new Color(43f / 85f, 0.0627451f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.2741188f, 0.5283019f, 0.3919889f, 1f), new Color(0f, 18f / 85f, 5f / 51f, 1f)),
new Tuple<Color, Color>(new Color(0.4979019f, 0.5294118f, 0.2431372f, 1f), new Color(0.2f, 11f / 51f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.24287f, 0.2515723f, 0.24287f, 1f), new Color(0.007843138f, 0.007843138f, 0.007843138f, 1f)),
new Tuple<Color, Color>(new Color(0f, 0.2607184f, 0.3773585f, 1f), new Color(0f, 0f, 7f / 85f, 1f)),
new Tuple<Color, Color>(new Color(0.509434f, 0.3279174f, 0.04645776f, 1f), new Color(0.19215687f, 0.02745098f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.5786163f, 0.172857f, 0.1758627f, 1f), new Color(19f / 85f, 0f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.3673988f, 0.08415397f, 115f / 159f, 1f), new Color(0.1254902f, 0f, 0.36078432f, 1f)),
new Tuple<Color, Color>(new Color(0.6354969f, 0.6525992f, 116f / 159f, 1f), new Color(16f / 51f, 28f / 85f, 0.39607844f, 1f)),
new Tuple<Color, Color>(new Color(0.8f, 0.571995f, 0f, 1f), new Color(0.45490196f, 0.24313726f, 0f, 1f)),
new Tuple<Color, Color>(new Color(0.1803922f, 0.2941177f, 0.5019608f, 1f), new Color(0f, 0f, 0.18431373f, 1f))
};
private static readonly int Highlighted = Animator.StringToHash("Highlighted");
private static readonly int Selected = Animator.StringToHash("Selected");
private static readonly int Disabled = Animator.StringToHash("Disabled");
private static readonly int Normal = Animator.StringToHash("Normal");
private static readonly Color BannerDayColor = new Color(75f / 106f, 75f / 106f, 75f / 106f, 1f);
private static readonly Color BannerNightColor = new Color(0.397f, 0.397f, 0.397f, 1f);
private Coroutine? m_gUpdates;
private Coroutine? m_aUpdates;
public const string Id = "com.github.MiiMii1205.TimeTheme";
internal static ManualLogSource Log { get; private set; } = null;
public static TimeThemePlugin Instance { get; set; } = null;
public AnimatorOverrideController DarkSlicesAnimator { get; set; }
public RuntimeAnimatorController DayAnimController { get; set; }
public static string Name => "TimeTheme";
public static string Version => "0.1.0";
private void Awake()
{
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Expected O, but got Unknown
Log = ((BaseUnityPlugin)this).Logger;
Instance = this;
Log.LogInfo((object)("Time Theme " + Name + " is loaded!"));
BundleLoader.LoadBundleAndContentsWithName((BaseUnityPlugin)(object)this, "timetheme.peakbundle", (Action<PeakBundle>)delegate(PeakBundle bundle)
{
DarkSlicesAnimator = bundle.LoadAsset<AnimatorOverrideController>("UI_DarkEmoteWheelSegment.overrideController");
Log.LogInfo((object)"Time Theme bundle is loaded!");
});
Harmony val = new Harmony("com.github.MiiMii1205.TimeTheme");
val.PatchAll(typeof(TimeThemePatcher));
}
private void Update()
{
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Invalid comparison between Unknown and I4
if (Object.op_Implicit((Object)(object)RunManager.Instance) && RunManager.Instance.runStarted)
{
CheckSwitchTheme(DayNightManager.instance.isDay > 0.5f || (int)Singleton<MapHandler>.Instance.GetCurrentSegment() >= 3);
}
}
[ConsoleCommand]
public static void SwitchTheme(bool toDay)
{
Instance.CheckSwitchTheme(toDay);
}
private void CheckSwitchTheme(bool isDay)
{
if (m_isDay != isDay)
{
if (m_graphs.Length == 0)
{
RefreshGraphicLists();
}
((MonoBehaviour)this).StartCoroutine(SwitchDayNight(isDay, m_isDay));
m_isDay = isDay;
}
}
private static TweenerCore<Color, Color, ColorOptions> DoReticuleColor(Color endValue, float duration)
{
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
TweenerCore<Color, Color, ColorOptions> val = DOTween.To((DOGetter<Color>)(() => GUIManager.instance.reticleColorDefault), (DOSetter<Color>)delegate(Color x)
{
//IL_0005: 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)
GUIManager.instance.reticleColorDefault = x;
}, endValue, duration);
TweenSettingsExtensions.SetTarget<TweenerCore<Color, Color, ColorOptions>>(val, (object)GUIManager.instance.reticleColorDefault);
return val;
}
private static TweenerCore<Color, Color, ColorOptions> DoPauseMenuRebind(PauseMenuRebindButton pmrb, Color endValue, float duration)
{
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
PauseMenuRebindButton pmrb2 = pmrb;
TweenerCore<Color, Color, ColorOptions> val = DOTween.To((DOGetter<Color>)(() => pmrb2.defaultTextColor), (DOSetter<Color>)delegate(Color x)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
pmrb2.defaultTextColor = x;
}, endValue, duration);
TweenSettingsExtensions.SetTarget<TweenerCore<Color, Color, ColorOptions>>(val, (object)pmrb2.defaultTextColor);
return val;
}
private static TweenerCore<Color, Color, ColorOptions> DoPauseMenuRebindOverriden(PauseMenuRebindButton pmrb, Color endValue, float duration)
{
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
PauseMenuRebindButton pmrb2 = pmrb;
TweenerCore<Color, Color, ColorOptions> val = DOTween.To((DOGetter<Color>)(() => pmrb2.overriddenTextColor), (DOSetter<Color>)delegate(Color x)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
pmrb2.overriddenTextColor = x;
}, endValue, duration);
TweenSettingsExtensions.SetTarget<TweenerCore<Color, Color, ColorOptions>>(val, (object)pmrb2.overriddenTextColor);
return val;
}
private static TweenerCore<Color, Color, ColorOptions> DoReticuleHighlightColor(Color endValue, float duration)
{
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
TweenerCore<Color, Color, ColorOptions> val = DOTween.To((DOGetter<Color>)(() => GUIManager.instance.reticleColorHighlight), (DOSetter<Color>)delegate(Color x)
{
//IL_0005: 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)
GUIManager.instance.reticleColorHighlight = x;
}, endValue, duration);
TweenSettingsExtensions.SetTarget<TweenerCore<Color, Color, ColorOptions>>(val, (object)GUIManager.instance.reticleColorHighlight);
return val;
}
private static TweenerCore<Color, Color, ColorOptions> DoSpectateColor(Color endValue, float duration)
{
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
TweenerCore<Color, Color, ColorOptions> val = DOTween.To((DOGetter<Color>)(() => GUIManager.instance.spectatingNameColor), (DOSetter<Color>)delegate(Color x)
{
//IL_0005: 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)
GUIManager.instance.spectatingNameColor = x;
}, endValue, duration);
TweenSettingsExtensions.SetTarget<TweenerCore<Color, Color, ColorOptions>>(val, (object)GUIManager.instance.spectatingNameColor);
return val;
}
private static TweenerCore<Color, Color, ColorOptions> DoSpectateYouColor(Color endValue, float duration)
{
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
TweenerCore<Color, Color, ColorOptions> val = DOTween.To((DOGetter<Color>)(() => GUIManager.instance.spectatingYourselfColor), (DOSetter<Color>)delegate(Color x)
{
//IL_0005: 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)
GUIManager.instance.spectatingYourselfColor = x;
}, endValue, duration);
TweenSettingsExtensions.SetTarget<TweenerCore<Color, Color, ColorOptions>>(val, (object)GUIManager.instance.spectatingYourselfColor);
return val;
}
private void DoGraphicUpdates(bool isDay, bool wasDay)
{
if (m_gUpdates != null)
{
((MonoBehaviour)this).StopCoroutine(m_gUpdates);
}
m_gUpdates = ((MonoBehaviour)this).StartCoroutine(UpdateGraphics(isDay, wasDay));
}
private void DoAnimsUpdates(bool isDay, bool wasDay)
{
if (m_aUpdates != null)
{
((MonoBehaviour)this).StopCoroutine(m_aUpdates);
}
m_aUpdates = ((MonoBehaviour)this).StartCoroutine(UpdateAnims(isDay, wasDay));
}
private IEnumerator SwitchDayNight(bool isDay, bool wasDay)
{
DoReticuleColor(isDay ? m_dayNightColors[0].Item1 : m_dayNightColors[0].Item2, 0.25f);
DoReticuleHighlightColor(isDay ? m_dayNightColors[10].Item1 : m_dayNightColors[10].Item2, 0.25f);
DoSpectateColor(isDay ? m_dayNightColors[0].Item1 : m_dayNightColors[0].Item2, 0.25f);
DoSpectateYouColor(isDay ? m_dayNightColors[11].Item1 : m_dayNightColors[11].Item2, 0.25f);
yield return null;
DoGraphicUpdates(isDay, wasDay);
DoAnimsUpdates(isDay, wasDay);
}
private IEnumerator UpdateAnims(bool isDay, bool wasDay)
{
string oldAnimName = (wasDay ? "UI_EmoteWheelSegment" : "UI_DarkEmoteWheelSegment");
for (int i = 0; i < m_anims.Length; i++)
{
Animator val = m_anims[i];
if (val == null)
{
continue;
}
string text = ((Object)val.runtimeAnimatorController).name.Replace("(Instance)", "").Replace("(Clone)", "");
if (text == oldAnimName)
{
if (text == "UI_EmoteWheelSegment" && (Object)(object)DayAnimController == (Object)null)
{
DayAnimController = Object.Instantiate<RuntimeAnimatorController>(val.runtimeAnimatorController);
}
RuntimeAnimatorController runtimeAnimatorController = Object.Instantiate<RuntimeAnimatorController>((RuntimeAnimatorController)(isDay ? ((object)DayAnimController) : ((object)DarkSlicesAnimator)));
val.runtimeAnimatorController = runtimeAnimatorController;
if (PExt.IsPlaying(val, "Highlighted", 0) || PExt.IsPlaying(val, "A_DarkHighlighted", 0))
{
val.SetTrigger(Highlighted);
}
else if (PExt.IsPlaying(val, "Selected", 0))
{
val.SetTrigger(Selected);
}
else if (PExt.IsPlaying(val, "Disabled", 0) || PExt.IsPlaying(val, "A_DarkDisabled", 0))
{
val.SetTrigger(Disabled);
}
else
{
val.SetTrigger(Normal);
}
yield return null;
}
}
}
private IEnumerator UpdateGraphics(bool isDay, bool wasDay)
{
HashSet<int> changedUIControl = new HashSet<int>();
PauseMenuRebindButton val3 = default(PauseMenuRebindButton);
Color val6 = default(Color);
Color val10 = default(Color);
for (int i = 0; i < m_graphs.Length; i++)
{
Tuple<Color, Color>[] array = m_dayNightColors;
Tweener val = null;
Graphic obj = m_graphs[i];
Image val2 = (Image)(object)((obj is Image) ? obj : null);
bool flag = val2 != null;
bool flag2 = flag;
if (flag2)
{
bool flag3 = Object.op_Implicit((Object)(object)val2.sprite);
bool flag4 = flag3;
if (flag4)
{
bool flag5;
switch (((Object)val2.sprite).name)
{
case "UI_Banner":
case "UI_Blur_DoubleArrow":
case "UI_Blur_Arrow":
case "DottedLine":
flag5 = true;
break;
default:
flag5 = false;
break;
}
flag4 = flag5;
}
flag2 = flag4 || ((Object)val2).name == "BadgeSash";
}
if (flag2)
{
array = m_dayNightButtonColors;
}
bool flag6 = m_graphs[i] is TextMeshProUGUI;
bool flag7 = flag6;
if (flag7)
{
bool flag5;
switch (((Object)m_graphs[i]).name)
{
case "HeroText":
case "HeroTimeOfDay":
case "HeroDay":
flag5 = true;
break;
default:
flag5 = false;
break;
}
flag7 = flag5;
}
if (flag7)
{
continue;
}
if (m_graphs[i] is TextMeshProUGUI && ((Object)((Component)m_graphs[i]).transform.parent).name.StartsWith("UI_Control") && ((Component)((Component)m_graphs[i]).transform.parent).TryGetComponent<PauseMenuRebindButton>(ref val3) && !changedUIControl.Contains(((Object)((Component)val3).transform).GetInstanceID()))
{
if (((Behaviour)m_graphs[i]).isActiveAndEnabled)
{
DoPauseMenuRebind(val3, isDay ? m_rebindDefaultTextColors.Item1 : m_rebindDefaultTextColors.Item2, 0.25f);
val = (Tweener)(object)DoPauseMenuRebindOverriden(val3, isDay ? m_rebindOverridenTextColors.Item1 : m_rebindOverridenTextColors.Item2, 0.25f);
}
else
{
val3.defaultTextColor = (isDay ? m_rebindDefaultTextColors.Item1 : m_rebindDefaultTextColors.Item2);
val3.overriddenTextColor = (isDay ? m_rebindOverridenTextColors.Item1 : m_rebindOverridenTextColors.Item2);
}
changedUIControl.Add(((Object)val3).GetInstanceID());
}
Graphic obj2 = m_graphs[i];
Image val4 = (Image)(object)((obj2 is Image) ? obj2 : null);
bool flag8 = val4 != null && Object.op_Implicit((Object)(object)val4.sprite);
bool flag9 = flag8;
if (flag9)
{
string name = ((Object)val4.sprite).name;
bool flag5 = ((name == "EndgameBanner" || name == "EndgameBannerLose") ? true : false);
flag9 = flag5;
}
if (flag9 && ((Object)((Component)m_graphs[i]).transform.parent).name.StartsWith("Banner"))
{
Color val5 = (isDay ? BannerDayColor : BannerNightColor);
((Color)(ref val6))..ctor(val5.r, val5.g, val5.b, m_graphs[i].color.a);
if (((Behaviour)m_graphs[i]).isActiveAndEnabled)
{
val = (Tweener)(object)DOTweenModuleUI.DOColor(m_graphs[i], val6, 0.25f);
}
else
{
m_graphs[i].color = val6;
}
}
else
{
for (int j = 0; j < array.Length; j++)
{
Color val7 = (wasDay ? array[j].Item1 : array[j].Item2);
Color val8 = (isDay ? array[j].Item1 : array[j].Item2);
Vector4 val9 = ExtColor.PToVec4(m_graphs[i].color);
if (new Vector3(val9.x, val9.y, val9.z) == new Vector3(val7.r, val7.g, val7.b))
{
((Color)(ref val10))..ctor(val8.r, val8.g, val8.b, m_graphs[i].color.a);
if (((Behaviour)m_graphs[i]).isActiveAndEnabled)
{
val = (Tweener)(object)DOTweenModuleUI.DOColor(m_graphs[i], val10, 0.25f);
}
else
{
m_graphs[i].color = val10;
}
break;
}
}
}
if (val != null)
{
yield return null;
}
}
}
public static void RefreshGraphicLists()
{
m_graphs = ((Component)((Component)GUIManager.instance).transform).GetComponentsInChildren<Graphic>(true);
m_anims = ((Component)((Component)GUIManager.instance).transform).GetComponentsInChildren<Animator>(true);
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}