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 Zorro.Settings;
using Zorro.UI;
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.2.1.0")]
[assembly: AssemblyInformationalVersion("0.2.1+49bd353d22b81981d35fdebaead1e6e596e4faeb")]
[assembly: AssemblyProduct("com.github.MiiMii1205.TimeTheme")]
[assembly: AssemblyTitle("TimeTheme")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.2.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace 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
{
private static readonly Vector3 _dc = Vector4.op_Implicit(ExtColor.PToVec4(TimeThemePlugin.DayTabsBackground));
private static readonly Vector3 _nc = Vector4.op_Implicit(ExtColor.PToVec4(TimeThemePlugin.NightTabsBackground));
[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);
}
[HarmonyPatch(typeof(SettingsTABSButton), "Update")]
[HarmonyPrefix]
public static void RunManagerAwakePostfix(SettingsTABSButton __instance, ref bool __runOriginal)
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: 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_0049: 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_005e: Unknown result type (might be due to invalid IL or missing references)
if (TimeThemePlugin.IsDarkTheme && !((TAB_Button)__instance).Selected)
{
__runOriginal = false;
((Graphic)((TAB_Button)__instance).text).color = Color.Lerp(((Graphic)((TAB_Button)__instance).text).color, TimeThemePlugin.DarkTabText, Time.unscaledDeltaTime * 7f);
((TAB_Button)__instance).background.color = Color.Lerp(((TAB_Button)__instance).background.color, TimeThemePlugin.NightTabsBackground, Time.unscaledDeltaTime * 7f);
__instance.SelectedGraphic.gameObject.SetActive(((TAB_Button)__instance).Selected);
}
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.github.MiiMii1205.TimeTheme", "TimeTheme", "0.2.1")]
public class TimeThemePlugin : BaseUnityPlugin
{
public static Action<bool> OnThemeChanged;
private bool m_isDay = true;
private static Graphic[] m_graphs = Array.Empty<Graphic>();
private static Graphic[] m_settingsGraphs = 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>[21]
{
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.56078434f, 23f / 85f, 0.7019608f, 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)),
new Tuple<Color, Color>(new Color(0.1792453f, 0.1253449f, 0.09046815f, 62f / 85f), new Color(0f, 0f, 0f, 62f / 85f))
};
private static Tuple<Color, Color>[] m_dayNightOptionsColors = new Tuple<Color, Color>[11]
{
new Tuple<Color, Color>(new Color(1f, 1f, 1f, 1f), new Color(0.7843137f, 0.4980392f, 83f / 85f, 1f)),
new Tuple<Color, Color>(new Color(0.1792453f, 0.1253449f, 0.09046815f, 62f / 85f), new Color(0f, 0f, 0f, 62f / 85f)),
new Tuple<Color, Color>(new Color(49f / 51f, 49f / 51f, 49f / 51f, 1f), new Color(0.7450981f, 0.4627451f, 0.9372549f, 1f)),
new Tuple<Color, Color>(new Color(0.935506f, 0.7352661f, 0.2251314f, 1f), new Color(0.9921569f, 0.5921569f, 1f, 1f)),
new Tuple<Color, Color>(new Color(0.9607844f, 0.9607844f, 0.9607844f, 1f), new Color(0.7450981f, 0.4627451f, 0.9372549f, 1f)),
new Tuple<Color, Color>(new Color(0.7843137f, 0.7843137f, 0.7843137f, 0.5019608f), new Color(0.572549f, 0.2901961f, 64f / 85f, 0.5019608f)),
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(0.5157232f, 0.46707f, 0.410308f, 1f), new Color(0.3019608f, 0f, 0.3843137f, 1f)),
new Tuple<Color, Color>(new Color(0.7843137f, 0.7843137f, 0.7843137f, 1f), new Color(0.572549f, 0.2901961f, 64f / 85f, 1f)),
new Tuple<Color, Color>(new Color(1f, 0.629899f, 0f, 0.7686275f), new Color(0.85490197f, 0.6f, 1f, 0.7686275f)),
new Tuple<Color, Color>(new Color(0.95686f, 1f, 0f, 0.7615f), new Color(1f, 0.81960785f, 1f, 0.7615f))
};
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;
private Coroutine? m_apUpdates;
private ColorBlock m_defaultInputFieldColorBlock;
private ColorBlock m_nightInputFieldColorBlock;
private ColorBlock m_defaultDropdownColorBlock;
private ColorBlock m_nightDropdownColorBlock;
private static Slider[] m_prefabPips;
private static SharedSettingsMenu m_settingTab;
private static GameObject[] m_settingsCells;
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 AnimatorOverrideController DarkPipsAnimator { get; set; }
public AnimatorOverrideController NightResetButtonAnimController { get; set; }
public AnimatorOverrideController NightControlAnimController { get; set; }
public RuntimeAnimatorController DayAnimController
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
set;
}
public RuntimeAnimatorController DayControlAnimController
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
set;
}
public RuntimeAnimatorController DayResetButtonAnimController
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
set;
}
public RuntimeAnimatorController DaySliderAnimController
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
set;
}
public static Color DayTabsBackground
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
return m_dayNightOptionsColors[1].Item1;
}
}
public static Color NightTabsBackground
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
return m_dayNightOptionsColors[1].Item2;
}
}
public static Color DarkTabText
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
return m_dayNightOptionsColors[0].Item2;
}
}
public static bool IsDarkTheme
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
return !Instance.m_isDay;
}
}
public static string Name => "TimeTheme";
public static string Version => "0.2.1";
private void Awake()
{
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: 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_00a4: 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_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_0117: 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_014c: Unknown result type (might be due to invalid IL or missing references)
//IL_014d: Unknown result type (might be due to invalid IL or missing references)
//IL_0155: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_0177: 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_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
//IL_01db: 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_01fd: 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)
//IL_0223: Unknown result type (might be due to invalid IL or missing references)
//IL_0236: Unknown result type (might be due to invalid IL or missing references)
//IL_0258: Unknown result type (might be due to invalid IL or missing references)
//IL_0259: Unknown result type (might be due to invalid IL or missing references)
//IL_0263: Unknown result type (might be due to invalid IL or missing references)
//IL_0269: 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");
DarkPipsAnimator = bundle.LoadAsset<AnimatorOverrideController>("DarkSliderPip.overrideController");
NightControlAnimController = bundle.LoadAsset<AnimatorOverrideController>("UI_DarkControl.overrideController");
NightResetButtonAnimController = bundle.LoadAsset<AnimatorOverrideController>("DarkResetButton.overrideController");
Log.LogInfo((object)"Time Theme bundle is loaded!");
});
ColorBlock val = default(ColorBlock);
((ColorBlock)(ref val)).highlightedColor = m_dayNightOptionsColors[2].Item2;
((ColorBlock)(ref val)).normalColor = m_dayNightOptionsColors[0].Item2;
((ColorBlock)(ref val)).disabledColor = m_dayNightOptionsColors[5].Item2;
((ColorBlock)(ref val)).pressedColor = m_dayNightOptionsColors[8].Item2;
((ColorBlock)(ref val)).selectedColor = m_dayNightOptionsColors[4].Item2;
((ColorBlock)(ref val)).colorMultiplier = 1f;
((ColorBlock)(ref val)).fadeDuration = 0.1f;
m_nightInputFieldColorBlock = val;
val = default(ColorBlock);
((ColorBlock)(ref val)).highlightedColor = m_dayNightOptionsColors[2].Item1;
((ColorBlock)(ref val)).normalColor = m_dayNightOptionsColors[0].Item1;
((ColorBlock)(ref val)).disabledColor = m_dayNightOptionsColors[5].Item1;
((ColorBlock)(ref val)).pressedColor = m_dayNightOptionsColors[8].Item1;
((ColorBlock)(ref val)).selectedColor = m_dayNightOptionsColors[4].Item1;
((ColorBlock)(ref val)).colorMultiplier = 1f;
((ColorBlock)(ref val)).fadeDuration = 0.1f;
m_defaultInputFieldColorBlock = val;
val = default(ColorBlock);
((ColorBlock)(ref val)).highlightedColor = m_dayNightOptionsColors[2].Item2;
((ColorBlock)(ref val)).normalColor = m_dayNightOptionsColors[0].Item2;
((ColorBlock)(ref val)).disabledColor = m_dayNightOptionsColors[5].Item2;
((ColorBlock)(ref val)).pressedColor = m_dayNightOptionsColors[8].Item2;
((ColorBlock)(ref val)).selectedColor = m_dayNightOptionsColors[3].Item2;
((ColorBlock)(ref val)).colorMultiplier = 1f;
((ColorBlock)(ref val)).fadeDuration = 0.1f;
m_nightDropdownColorBlock = val;
val = default(ColorBlock);
((ColorBlock)(ref val)).highlightedColor = m_dayNightOptionsColors[2].Item1;
((ColorBlock)(ref val)).normalColor = m_dayNightOptionsColors[0].Item1;
((ColorBlock)(ref val)).disabledColor = m_dayNightOptionsColors[5].Item1;
((ColorBlock)(ref val)).pressedColor = m_dayNightOptionsColors[8].Item1;
((ColorBlock)(ref val)).selectedColor = m_dayNightOptionsColors[3].Item1;
((ColorBlock)(ref val)).colorMultiplier = 1f;
((ColorBlock)(ref val)).fadeDuration = 0.1f;
m_defaultDropdownColorBlock = val;
Harmony val2 = new Harmony("com.github.MiiMii1205.TimeTheme");
val2.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;
OnThemeChanged?.Invoke(m_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 void DoPipAnimsUpdates(bool isDay, bool wasDay)
{
if (m_apUpdates != null)
{
((MonoBehaviour)this).StopCoroutine(m_apUpdates);
}
m_apUpdates = ((MonoBehaviour)this).StartCoroutine(UpdatePipsAnims(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);
DoPipAnimsUpdates(isDay, wasDay);
}
private IEnumerator UpdateAnims(bool isDay, bool wasDay)
{
if (!wasDay)
{
}
for (int i = 0; i < m_anims.Length; i++)
{
if (!Object.op_Implicit((Object)(object)m_anims[i]))
{
continue;
}
Animator val = m_anims[i];
if (val == null)
{
continue;
}
string text = ((Object)val.runtimeAnimatorController).name.Replace("(Instance)", "").Replace("(Clone)", "");
switch (text)
{
case "UI_EmoteWheelSegment":
case "UI_DarkEmoteWheelSegment":
{
string text2 = (wasDay ? "UI_EmoteWheelSegment" : "UI_DarkEmoteWheelSegment");
if (text == text2)
{
if (text == "UI_EmoteWheelSegment" && (Object)(object)DayAnimController == (Object)null)
{
DayAnimController = Object.Instantiate<RuntimeAnimatorController>(val.runtimeAnimatorController);
}
RuntimeAnimatorController runtimeAnimatorController2 = Object.Instantiate<RuntimeAnimatorController>((RuntimeAnimatorController)(isDay ? ((object)DayAnimController) : ((object)DarkSlicesAnimator)));
val.runtimeAnimatorController = runtimeAnimatorController2;
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;
}
break;
}
case "ResetButton":
case "DarkResetButton":
{
string text2 = (wasDay ? "ResetButton" : "DarkResetButton");
if (text == text2)
{
if (text == "ResetButton" && (Object)(object)DayResetButtonAnimController == (Object)null)
{
DayResetButtonAnimController = Object.Instantiate<RuntimeAnimatorController>(val.runtimeAnimatorController);
}
RuntimeAnimatorController runtimeAnimatorController3 = Object.Instantiate<RuntimeAnimatorController>((RuntimeAnimatorController)(isDay ? ((object)DayResetButtonAnimController) : ((object)NightResetButtonAnimController)));
val.runtimeAnimatorController = runtimeAnimatorController3;
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;
}
break;
}
case "UI_DarkControl":
case "UI_Control":
{
string text2 = (wasDay ? "UI_Control" : "UI_DarkControl");
if (text == text2)
{
if (text == "UI_Control" && (Object)(object)DayControlAnimController == (Object)null)
{
DayControlAnimController = Object.Instantiate<RuntimeAnimatorController>(val.runtimeAnimatorController);
}
RuntimeAnimatorController runtimeAnimatorController = Object.Instantiate<RuntimeAnimatorController>((RuntimeAnimatorController)(isDay ? ((object)DayControlAnimController) : ((object)NightControlAnimController)));
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;
}
break;
}
}
}
}
private IEnumerator UpdatePipsAnims(bool isDay, bool wasDay)
{
string oldAnimName = (wasDay ? "SliderPip" : "DarkSliderPip");
Slider[] sliderPips = CollectionExtensions.AddRangeToArray<Slider>(((Component)m_settingTab.m_settingsContentParent).GetComponentsInChildren<Slider>(true), m_prefabPips);
Animator val = default(Animator);
for (int i = 0; i < sliderPips.Length; i++)
{
if (!((Component)sliderPips[i]).TryGetComponent<Animator>(ref val))
{
continue;
}
string text = ((Object)val.runtimeAnimatorController).name.Replace("(Instance)", "").Replace("(Clone)", "");
if (text == oldAnimName)
{
if (text == "SliderPip" && (Object)(object)DaySliderAnimController == (Object)null)
{
DaySliderAnimController = Object.Instantiate<RuntimeAnimatorController>(val.runtimeAnimatorController);
}
RuntimeAnimatorController runtimeAnimatorController = Object.Instantiate<RuntimeAnimatorController>((RuntimeAnimatorController)(isDay ? ((object)DaySliderAnimController) : ((object)DarkPipsAnimator)));
val.runtimeAnimatorController = runtimeAnimatorController;
if (PExt.IsPlaying(val, "Highlighted", 0) || PExt.IsPlaying(val, "A_DarkPipHighlighted", 0))
{
val.SetTrigger(Highlighted);
}
else if (PExt.IsPlaying(val, "Selected", 0) || PExt.IsPlaying(val, "A_DarkPipSelected", 0))
{
val.SetTrigger(Selected);
}
else if (PExt.IsPlaying(val, "Disabled", 0) || PExt.IsPlaying(val, "A_DarkPipDisabled", 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 val8 = default(Color);
for (int i = 0; i < m_graphs.Length; i++)
{
if (!Object.op_Implicit((Object)(object)m_graphs[i]))
{
continue;
}
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 k = 0; k < array.Length; k++)
{
bool flag10 = k == 20;
bool flag11 = flag10;
if (flag11)
{
string name = ((Object)m_graphs[i]).name;
bool flag5 = ((name == "Background" || name == "BG") ? true : false);
flag11 = flag5;
}
if (flag11)
{
continue;
}
Color b = (wasDay ? array[k].Item1 : array[k].Item2);
Color val7 = (isDay ? array[k].Item1 : array[k].Item2);
if (CompareColors(m_graphs[i].color, b))
{
((Color)(ref val8))..ctor(val7.r, val7.g, val7.b, m_graphs[i].color.a);
if (((Behaviour)m_graphs[i]).isActiveAndEnabled)
{
val = (Tweener)(object)DOTweenModuleUI.DOColor(m_graphs[i], val8, 0.25f);
}
else
{
m_graphs[i].color = val8;
}
break;
}
}
}
if (val != null)
{
yield return null;
}
}
Graphic[] graphs = CollectionExtensions.AddRangeToArray<Graphic>(((Component)((Component)m_settingTab.m_settingsContentParent).transform).GetComponentsInChildren<Graphic>(true), m_settingsGraphs);
TMP_InputField val9 = default(TMP_InputField);
TMP_Dropdown val10 = default(TMP_Dropdown);
Color val12 = default(Color);
Color val16 = default(Color);
for (int i = 0; i < graphs.Length; i++)
{
if (((Object)graphs[i]).name.StartsWith("Input") && ((Component)graphs[i]).TryGetComponent<TMP_InputField>(ref val9))
{
if (((Behaviour)graphs[i]).isActiveAndEnabled)
{
DoColorBlocks((Selectable)(object)val9, m_dayNightOptionsColors, isDay, wasDay);
}
else
{
((Selectable)val9).colors = (isDay ? m_defaultInputFieldColorBlock : m_nightInputFieldColorBlock);
}
}
else if (((Object)graphs[i]).name == "Dropdown" && ((Component)graphs[i]).TryGetComponent<TMP_Dropdown>(ref val10))
{
if (((Behaviour)graphs[i]).isActiveAndEnabled)
{
DoColorBlocks((Selectable)(object)val10, m_dayNightOptionsColors, isDay, wasDay);
}
else
{
((Selectable)val10).colors = (isDay ? m_defaultDropdownColorBlock : m_nightDropdownColorBlock);
}
}
else
{
if (((Object)graphs[i]).name == "Handle")
{
if (!wasDay)
{
_ = m_dayNightOptionsColors[6].Item2;
}
else
{
_ = m_dayNightOptionsColors[6].Item1;
}
Color val11 = (isDay ? m_dayNightOptionsColors[6].Item1 : m_dayNightOptionsColors[6].Item2);
((Color)(ref val12))..ctor(val11.r, val11.g, val11.b, graphs[i].color.a);
if (((Behaviour)graphs[i]).isActiveAndEnabled)
{
DOTweenModuleUI.DOColor(graphs[i], val12, 0.25f);
}
else
{
graphs[i].color = val12;
}
continue;
}
for (int l = 0; l < m_dayNightOptionsColors.Length; l++)
{
Color val13 = (wasDay ? m_dayNightOptionsColors[l].Item1 : m_dayNightOptionsColors[l].Item2);
Color val14 = (isDay ? m_dayNightOptionsColors[l].Item1 : m_dayNightOptionsColors[l].Item2);
Vector4 val15 = ExtColor.PToVec4(graphs[i].color);
if (new Vector3(val15.x, val15.y, val15.z) == new Vector3(val13.r, val13.g, val13.b))
{
((Color)(ref val16))..ctor(val14.r, val14.g, val14.b, graphs[i].color.a);
if (((Behaviour)graphs[i]).isActiveAndEnabled)
{
DOTweenModuleUI.DOColor(graphs[i], val16, 0.25f);
}
else
{
graphs[i].color = val16;
}
break;
}
}
}
yield return null;
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static bool CompareColors(Color a, Color b)
{
//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_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
return new Vector3(a.r, a.g, a.b) == new Vector3(b.r, b.g, b.b);
}
private static void DoColorBlocks(Selectable selectable, Tuple<Color, Color>[] colors, bool isDay, bool wasDay)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: 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_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)
//IL_0046: 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_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_00db: 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_015e: Unknown result type (might be due to invalid IL or missing references)
//IL_0163: Unknown result type (might be due to invalid IL or missing references)
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_016c: 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_01ef: Unknown result type (might be due to invalid IL or missing references)
//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
//IL_0276: Unknown result type (might be due to invalid IL or missing references)
//IL_027b: Unknown result type (might be due to invalid IL or missing references)
//IL_027f: Unknown result type (might be due to invalid IL or missing references)
//IL_0284: 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_013f: 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_0148: Unknown result type (might be due to invalid IL or missing references)
//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
//IL_0242: Unknown result type (might be due to invalid IL or missing references)
//IL_0257: Unknown result type (might be due to invalid IL or missing references)
//IL_025c: Unknown result type (might be due to invalid IL or missing references)
//IL_0260: Unknown result type (might be due to invalid IL or missing references)
//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
//IL_02e3: Unknown result type (might be due to invalid IL or missing references)
//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
Selectable selectable2 = selectable;
for (int i = 0; i < colors.Length; i++)
{
Color b = (wasDay ? colors[i].Item1 : colors[i].Item2);
Color val = (isDay ? colors[i].Item1 : colors[i].Item2);
ColorBlock colors2 = selectable2.colors;
if (CompareColors(((ColorBlock)(ref colors2)).normalColor, b))
{
TweenerCore<Color, Color, ColorOptions> val2 = DOTween.To((DOGetter<Color>)delegate
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: 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)
ColorBlock colors12 = selectable2.colors;
return ((ColorBlock)(ref colors12)).normalColor;
}, (DOSetter<Color>)delegate(Color x)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: 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)
Selectable obj5 = selectable2;
ColorBlock colors11 = selectable2.colors;
((ColorBlock)(ref colors11)).normalColor = x;
obj5.colors = colors11;
}, val, 0.25f);
colors2 = selectable2.colors;
TweenSettingsExtensions.SetTarget<TweenerCore<Color, Color, ColorOptions>>(val2, (object)((ColorBlock)(ref colors2)).normalColor);
}
colors2 = selectable2.colors;
if (CompareColors(((ColorBlock)(ref colors2)).disabledColor, b))
{
TweenerCore<Color, Color, ColorOptions> val3 = DOTween.To((DOGetter<Color>)delegate
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: 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)
ColorBlock colors10 = selectable2.colors;
return ((ColorBlock)(ref colors10)).disabledColor;
}, (DOSetter<Color>)delegate(Color x)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: 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)
Selectable obj4 = selectable2;
ColorBlock colors9 = selectable2.colors;
((ColorBlock)(ref colors9)).disabledColor = x;
obj4.colors = colors9;
}, val, 0.25f);
colors2 = selectable2.colors;
TweenSettingsExtensions.SetTarget<TweenerCore<Color, Color, ColorOptions>>(val3, (object)((ColorBlock)(ref colors2)).disabledColor);
}
colors2 = selectable2.colors;
if (CompareColors(((ColorBlock)(ref colors2)).highlightedColor, b))
{
TweenerCore<Color, Color, ColorOptions> val4 = DOTween.To((DOGetter<Color>)delegate
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: 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)
ColorBlock colors8 = selectable2.colors;
return ((ColorBlock)(ref colors8)).highlightedColor;
}, (DOSetter<Color>)delegate(Color x)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: 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)
Selectable obj3 = selectable2;
ColorBlock colors7 = selectable2.colors;
((ColorBlock)(ref colors7)).highlightedColor = x;
obj3.colors = colors7;
}, val, 0.25f);
colors2 = selectable2.colors;
TweenSettingsExtensions.SetTarget<TweenerCore<Color, Color, ColorOptions>>(val4, (object)((ColorBlock)(ref colors2)).highlightedColor);
}
colors2 = selectable2.colors;
if (CompareColors(((ColorBlock)(ref colors2)).selectedColor, b))
{
TweenerCore<Color, Color, ColorOptions> val5 = DOTween.To((DOGetter<Color>)delegate
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: 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)
ColorBlock colors6 = selectable2.colors;
return ((ColorBlock)(ref colors6)).selectedColor;
}, (DOSetter<Color>)delegate(Color x)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: 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)
Selectable obj2 = selectable2;
ColorBlock colors5 = selectable2.colors;
((ColorBlock)(ref colors5)).selectedColor = x;
obj2.colors = colors5;
}, val, 0.25f);
colors2 = selectable2.colors;
TweenSettingsExtensions.SetTarget<TweenerCore<Color, Color, ColorOptions>>(val5, (object)((ColorBlock)(ref colors2)).selectedColor);
}
colors2 = selectable2.colors;
if (CompareColors(((ColorBlock)(ref colors2)).pressedColor, b))
{
TweenerCore<Color, Color, ColorOptions> val6 = DOTween.To((DOGetter<Color>)delegate
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: 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)
ColorBlock colors4 = selectable2.colors;
return ((ColorBlock)(ref colors4)).pressedColor;
}, (DOSetter<Color>)delegate(Color x)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: 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)
Selectable obj = selectable2;
ColorBlock colors3 = selectable2.colors;
((ColorBlock)(ref colors3)).pressedColor = x;
obj.colors = colors3;
}, val, 0.25f);
colors2 = selectable2.colors;
TweenSettingsExtensions.SetTarget<TweenerCore<Color, Color, ColorOptions>>(val6, (object)((ColorBlock)(ref colors2)).pressedColor);
}
}
}
public static void RefreshGraphicLists()
{
m_graphs = ((Component)((Component)GUIManager.instance).transform).GetComponentsInChildren<Graphic>(true);
m_anims = ((Component)((Component)GUIManager.instance).transform).GetComponentsInChildren<Animator>(true);
m_settingTab = ((Component)((Component)GUIManager.instance).transform).GetComponentInChildren<SharedSettingsMenu>(true);
m_settingsGraphs = m_settingTab.m_settingsCellPrefab.GetComponentsInChildren<Graphic>(true);
m_settingsGraphs = CollectionExtensions.AddRangeToArray<Graphic>(m_settingsGraphs, ((Component)((Component)m_settingTab).transform).GetComponentsInChildren<Graphic>(true));
m_prefabPips = Array.Empty<Slider>();
InputCellMapper instance = SingletonAsset<InputCellMapper>.Instance;
if (Object.op_Implicit((Object)(object)instance?.EnumSettingCell))
{
m_settingsGraphs = CollectionExtensions.AddRangeToArray<Graphic>(m_settingsGraphs, ((Component)instance.EnumSettingCell.transform).GetComponentsInChildren<Graphic>(true));
m_prefabPips = CollectionExtensions.AddRangeToArray<Slider>(m_prefabPips, ((Component)instance.EnumSettingCell.transform).GetComponentsInChildren<Slider>(true));
}
if (Object.op_Implicit((Object)(object)instance?.ButtonSettingCell))
{
m_settingsGraphs = CollectionExtensions.AddRangeToArray<Graphic>(m_settingsGraphs, ((Component)instance.ButtonSettingCell.transform).GetComponentsInChildren<Graphic>(true));
m_prefabPips = CollectionExtensions.AddRangeToArray<Slider>(m_prefabPips, ((Component)instance.ButtonSettingCell.transform).GetComponentsInChildren<Slider>(true));
}
if (Object.op_Implicit((Object)(object)instance?.FloatSettingCell))
{
m_settingsGraphs = CollectionExtensions.AddRangeToArray<Graphic>(m_settingsGraphs, ((Component)instance.FloatSettingCell.transform).GetComponentsInChildren<Graphic>(true));
m_prefabPips = CollectionExtensions.AddRangeToArray<Slider>(m_prefabPips, ((Component)instance.FloatSettingCell.transform).GetComponentsInChildren<Slider>(true));
}
if (Object.op_Implicit((Object)(object)instance?.StringSettingCell))
{
m_settingsGraphs = CollectionExtensions.AddRangeToArray<Graphic>(m_settingsGraphs, ((Component)instance.StringSettingCell.transform).GetComponentsInChildren<Graphic>(true));
m_prefabPips = CollectionExtensions.AddRangeToArray<Slider>(m_prefabPips, ((Component)instance.StringSettingCell.transform).GetComponentsInChildren<Slider>(true));
}
if (Object.op_Implicit((Object)(object)instance?.IntSettingCell))
{
m_settingsGraphs = CollectionExtensions.AddRangeToArray<Graphic>(m_settingsGraphs, ((Component)instance.IntSettingCell.transform).GetComponentsInChildren<Graphic>(true));
m_prefabPips = CollectionExtensions.AddRangeToArray<Slider>(m_prefabPips, ((Component)instance.IntSettingCell.transform).GetComponentsInChildren<Slider>(true));
}
if (Object.op_Implicit((Object)(object)instance?.KeyCodeSettingCell))
{
m_settingsGraphs = CollectionExtensions.AddRangeToArray<Graphic>(m_settingsGraphs, ((Component)instance.KeyCodeSettingCell.transform).GetComponentsInChildren<Graphic>(true));
m_prefabPips = CollectionExtensions.AddRangeToArray<Slider>(m_prefabPips, ((Component)instance.KeyCodeSettingCell.transform).GetComponentsInChildren<Slider>(true));
}
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}