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 System.Text; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Photon.Pun; using RoundsTheGathering.Data; using RoundsTheGathering.GameIntegration; using RoundsTheGathering.Networking; using RoundsTheGathering.UI; using TMPro; using UnboundLib; using UnboundLib.GameModes; using UnboundLib.Networking; using UnboundLib.Utils; using UnboundLib.Utils.UI; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")] [assembly: AssemblyCompany("RoundsTheGathering")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+661a91535814621160b5d94d61679bade4fe1c2d")] [assembly: AssemblyProduct("Deck picking ability for ROUNDS (like MAGIC)")] [assembly: AssemblyTitle("RoundsTheGathering")] [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 RoundsTheGathering { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("RoundsTheGathering", "Deck picking ability for ROUNDS (like MAGIC)", "1.0.0")] public class Plugin : BaseUnityPlugin { internal static ManualLogSource Logger; private void Awake() { //IL_001c: 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_004a: Expected O, but got Unknown Logger = ((BaseUnityPlugin)this).Logger; RTGLog.Section("Plugin Awake"); new Harmony("RoundsTheGathering").PatchAll(); ((Component)this).gameObject.AddComponent(); ((Component)this).gameObject.AddComponent(); GameObject val = new GameObject("RTG_UIRoot"); Object.DontDestroyOnLoad((Object)(object)val); val.AddComponent(); val.AddComponent(); val.AddComponent(); RTGLog.Line("Plugin RoundsTheGathering loaded."); } } internal static class RTGLog { private const string Sep = "====================="; public static void Section(string title) { Plugin.Logger.LogInfo((object)"====================="); Plugin.Logger.LogInfo((object)("[RTG] " + title)); Plugin.Logger.LogInfo((object)"====================="); } public static void Line(string message) { Plugin.Logger.LogInfo((object)("[RTG] " + message)); } public static void Warn(string message) { Plugin.Logger.LogWarning((object)("[RTG] " + message)); } public static void Error(string message) { Plugin.Logger.LogError((object)("[RTG] " + message)); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "RoundsTheGathering"; public const string PLUGIN_NAME = "Deck picking ability for ROUNDS (like MAGIC)"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace RoundsTheGathering.UI { public class CreateDeckScreen : MonoBehaviour { public static CreateDeckScreen instance; private Canvas _canvas; private TMP_InputField _nameField; private TMP_InputField _maxSizeField; private Button _createBtn; private TextMeshProUGUI _errorText; private void Awake() { instance = this; BuildUI(); } private void BuildUI() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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_011d: 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) //IL_0127: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: 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_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0221: 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_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Expected O, but got Unknown //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Expected O, but got Unknown _canvas = UIHelper.CreateFullscreenCanvas("RTG_CreateDeckScreen", 210); UIHelper.CreateDimmedBackground(((Component)_canvas).transform); Transform transform = ((Component)_canvas).transform; Vector2 anchorMin = new Vector2(0.28f, 0.12f); Vector2 anchorMax = new Vector2(0.72f, 0.88f); Color? bg = new Color(0.08f, 0.08f, 0.12f, 1f); RectTransform parent = UIHelper.CreatePanel(transform, "Panel", anchorMin, anchorMax, default(Vector2), default(Vector2), bg); RectTransform parent2 = UIHelper.CreatePanel((Transform)(object)parent, "Title", new Vector2(0f, 0.88f), Vector2.one); UIHelper.CreateText((Transform)(object)parent2, "TitleText", "Create New Deck", 34, (TextAlignmentOptions)514); RectTransform parent3 = UIHelper.CreatePanel((Transform)(object)parent, "NameLabel", new Vector2(0.05f, 0.74f), new Vector2(0.95f, 0.82f)); UIHelper.CreateText((Transform)(object)parent3, "Lbl", "Deck Name", 22, (TextAlignmentOptions)4097); _nameField = UIHelper.CreateInputField((Transform)(object)parent, "NameField", "Enter deck name...", Vector2.zero, Vector2.zero, 22, (ContentType)0); RectTransform component = ((Component)_nameField).GetComponent(); component.anchorMin = new Vector2(0.05f, 0.61f); component.anchorMax = new Vector2(0.95f, 0.73f); Vector2 offsetMin = (component.offsetMax = Vector2.zero); component.offsetMin = offsetMin; ((UnityEvent)(object)_nameField.onValueChanged).AddListener((UnityAction)delegate { Validate(); }); RectTransform parent4 = UIHelper.CreatePanel((Transform)(object)parent, "SizeLabel", new Vector2(0.05f, 0.48f), new Vector2(0.95f, 0.57f)); UIHelper.CreateText((Transform)(object)parent4, "Lbl", "Max Deck Size (default 50)", 22, (TextAlignmentOptions)4097); _maxSizeField = UIHelper.CreateInputField((Transform)(object)parent, "MaxSizeField", "50", Vector2.zero, Vector2.zero, 22, (ContentType)2); RectTransform component2 = ((Component)_maxSizeField).GetComponent(); component2.anchorMin = new Vector2(0.05f, 0.35f); component2.anchorMax = new Vector2(0.95f, 0.47f); offsetMin = (component2.offsetMax = Vector2.zero); component2.offsetMin = offsetMin; _maxSizeField.text = "50"; ((UnityEvent)(object)_maxSizeField.onValueChanged).AddListener((UnityAction)delegate { Validate(); }); RectTransform parent5 = UIHelper.CreatePanel((Transform)(object)parent, "ErrorPanel", new Vector2(0.05f, 0.26f), new Vector2(0.95f, 0.34f)); _errorText = UIHelper.CreateText((Transform)(object)parent5, "ErrorText", "", 18, (TextAlignmentOptions)514, (Color?)new Color(1f, 0.35f, 0.35f)); _createBtn = AnchorButton(parent, "CreateBtn", "Create Deck!", new Vector2(0.12f, 0.12f), new Vector2(0.88f, 0.24f), new Color(0.15f, 0.5f, 0.15f), 26); ((UnityEvent)_createBtn.onClick).AddListener(new UnityAction(OnCreateClicked)); Button val = AnchorButton(parent, "BackBtn", "Back", new Vector2(0.05f, 0.02f), new Vector2(0.4f, 0.1f), new Color(0.3f, 0.3f, 0.3f), 20); ((UnityEvent)val.onClick).AddListener(new UnityAction(OnBackClicked)); Validate(); ((Component)_canvas).gameObject.SetActive(false); } private static Button AnchorButton(RectTransform parent, string name, string label, Vector2 anchorMin, Vector2 anchorMax, Color bgColor, int fontSize) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_001e: 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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) //IL_008e: 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_00b6: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0130: 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_016c: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.SetParent((Transform)(object)parent, false); RectTransform val2 = val.AddComponent(); val2.anchorMin = anchorMin; val2.anchorMax = anchorMax; Vector2 offsetMin = (val2.offsetMax = Vector2.zero); val2.offsetMin = offsetMin; Image val3 = val.AddComponent(); ((Graphic)val3).color = bgColor; Button val4 = val.AddComponent