using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; 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("MoreRevamp")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+81e6a2062cefcaa2dc724dc0f00869c02e0502cf")] [assembly: AssemblyProduct("MoreRevamp")] [assembly: AssemblyTitle("MoreRevamp")] [assembly: AssemblyVersion("1.0.0.0")] 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; } } } namespace MoreRevamp { [BepInPlugin("com.github.end-4.moreRevamp", "MoreRevamp", "1.0.4")] public class Plugin : BaseUnityPlugin { internal static ManualLogSource Log; private static Sprite _largeBorderSprite = Addressables.LoadAssetAsync((object)"Assets/Textures/UI/Controls/Round_BorderLarge.png").WaitForCompletion(); private static Sprite _smallBorderSprite = Addressables.LoadAssetAsync((object)"Assets/Textures/UI/Controls/Round_BorderSmall.png").WaitForCompletion(); private static Sprite _largeFillSprite = Addressables.LoadAssetAsync((object)"Assets/Textures/UI/Controls/Round_FillLarge.png").WaitForCompletion(); private static Sprite _smallFillSprite = Addressables.LoadAssetAsync((object)"Assets/Textures/UI/Controls/Round_FillSmall.png").WaitForCompletion(); private static Sprite _crossSprite = Addressables.LoadAssetAsync((object)"Assets/Textures/UI/Controls/Check.png").WaitForCompletion(); private static Sprite _dropdownBorderSprite = Addressables.LoadAssetAsync((object)"Assets/Textures/UI/Controls/Round_DropdownPanel.png").WaitForCompletion(); private static readonly float PixelsPerUnitMultiplier = 5.4f; public static string GetObjectPath(GameObject g) { string text = ((Object)g).name; while ((Object)(object)g.transform.parent != (Object)null) { g = ((Component)g.transform.parent).gameObject; text = ((Object)g).name + "/" + text; } return text; } private void Awake() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; new Harmony("MoreRevamp").PatchAll(); Log.LogInfo((object)"Patches applied"); } private static void ApplyImageSprite(Image image, Sprite sourceSprite) { //IL_0007: 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_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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) RectTransform rectTransform = ((Graphic)image).rectTransform; Vector2 sizeDelta = rectTransform.sizeDelta; Color color = ((Graphic)image).color; image.sprite = sourceSprite; image.type = (Type)1; image.pixelsPerUnitMultiplier = PixelsPerUnitMultiplier; rectTransform.sizeDelta = sizeDelta; ((Graphic)image).color = color; } public static void ApplyLargeBorder(Image image) { ApplyImageSprite(image, _largeBorderSprite); } public static void ApplySmallBorder(Image image) { ApplyImageSprite(image, _smallBorderSprite); } public static void ApplyLargeFill(Image image) { ApplyImageSprite(image, _largeFillSprite); } public static void ApplySmallFill(Image image) { ApplyImageSprite(image, _smallFillSprite); } public static void ApplyDropdownBorder(Image image) { ApplyImageSprite(image, _dropdownBorderSprite); } public static void ApplyCross(Image image) { ApplyImageSprite(image, _crossSprite); } public static void ForceUIColor(Image image) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) ((Graphic)image).color = Color.white; } public static void ChangeSize(Image image, float width, float height) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) ((Graphic)image).rectTransform.sizeDelta = new Vector2(width, height); } public static void ChangeAnchor(Image image, float x, float y) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) ((Graphic)image).rectTransform.anchoredPosition = new Vector2(x, y); } public static void ApplyUIComponentColors(Selectable d) { //IL_0001: 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_001d: 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) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) ColorBlock colors = d.colors; ((ColorBlock)(ref colors)).normalColor = Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)); ((ColorBlock)(ref colors)).selectedColor = Color32.op_Implicit(new Color32((byte)130, (byte)130, (byte)130, byte.MaxValue)); ((ColorBlock)(ref colors)).pressedColor = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue)); d.colors = colors; } public static void ForceRGBAmount(Image image, float amount, float hasColorThreshold = 0f) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_0056: Unknown result type (might be due to invalid IL or missing references) float num = ((((Graphic)image).color.r > hasColorThreshold) ? amount : 0f); float num2 = ((((Graphic)image).color.g > hasColorThreshold) ? amount : 0f); float num3 = ((((Graphic)image).color.b > hasColorThreshold) ? amount : 0f); float a = ((Graphic)image).color.a; ((Graphic)image).color = new Color(num, num2, num3, a); } public static void HideImage(Image image) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) ((Graphic)image).color = Color.clear; } } [HarmonyPatch(typeof(Image), "OnEnable")] public static class ImagePatch { [HarmonyPostfix] public static void Postfix(Image __instance) { //IL_065e: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) string objectPath = Plugin.GetObjectPath(((Component)__instance).gameObject); string text = ((Object)__instance).name.ToLower(); bool flag = (Object)(object)((Component)__instance).GetComponent