using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Steamworks; using UnityEngine; using UnityEngine.EventSystems; 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(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("HowToFishFriend")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("HowToFishFriend")] [assembly: AssemblyTitle("HowToFishFriend")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 SocialModMod { public static class CodeFriendRowUI { public static GameObject Create(Transform parent, CodeFriendEntry friend, Color bg) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_0052: 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) //IL_0065: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_010a: 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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Expected O, but got Unknown GameObject val = new GameObject("CodeFriend_" + friend.CachedName); val.transform.SetParent(parent, false); LayoutElement val2 = val.AddComponent(); val2.preferredHeight = 52f; Image val3 = val.AddComponent(); ((Graphic)val3).color = bg; GameObject val4 = new GameObject("StatusDot"); val4.transform.SetParent(val.transform, false); Image val5 = val4.AddComponent(); val5.sprite = UISpriteFactory.CircleSprite; val5.type = (Type)0; ((Graphic)val5).color = StatusColor(friend.State); RectTransform component = val4.GetComponent(); component.anchorMin = new Vector2(0f, 0.5f); component.anchorMax = new Vector2(0f, 0.5f); component.pivot = new Vector2(0f, 0.5f); component.anchoredPosition = new Vector2(16f, 0f); component.sizeDelta = new Vector2(14f, 14f); GameObject val6 = new GameObject("Info"); val6.transform.SetParent(val.transform, false); Text val7 = val6.AddComponent(); val7.font = Resources.GetBuiltinResource("Arial.ttf"); val7.fontSize = 14; ((Graphic)val7).color = Color.white; val7.alignment = (TextAnchor)3; val7.text = friend.CachedName + "\n" + StatusLabel(friend.State); RectTransform component2 = val6.GetComponent(); component2.anchorMin = new Vector2(0f, 0f); component2.anchorMax = new Vector2(1f, 1f); component2.offsetMin = new Vector2(40f, 4f); component2.offsetMax = new Vector2(-260f, -4f); if (friend.State == FriendPlayState.PlayingThisGame && friend.LobbyId != CSteamID.Nil) { Button val8 = CreateSmallButton(val.transform, "JOIN", new Vector2(-172f, 0f), new Color(0.25f, 0.4f, 0.6f, 1f)); ((UnityEvent)val8.onClick).AddListener((UnityAction)delegate { //IL_000b: Unknown result type (might be due to invalid IL or missing references) CodeFriendService.Instance.JoinFriend(friend.SteamId); }); } if (friend.State != FriendPlayState.Offline) { Button val9 = CreateSmallButton(val.transform, "INVITE", new Vector2(-88f, 0f), new Color(0.3f, 0.55f, 0.35f, 1f)); ((UnityEvent)val9.onClick).AddListener((UnityAction)delegate { //IL_000b: Unknown result type (might be due to invalid IL or missing references) CodeFriendService.Instance.InviteFriend(friend.SteamId); }); } Button val10 = CreateSmallButton(val.transform, "REMOVE", new Vector2(-8f, 0f), new Color(0.55f, 0.25f, 0.25f, 1f)); ((UnityEvent)val10.onClick).AddListener((UnityAction)delegate { //IL_000b: Unknown result type (might be due to invalid IL or missing references) CodeFriendService.Instance.RemoveFriend(friend.SteamId); }); return val; } private static Color StatusColor(FriendPlayState state) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) return (Color)(state switch { FriendPlayState.PlayingThisGame => new Color(0.3f, 0.85f, 0.4f), FriendPlayState.OnlineElsewhere => new Color(0.4f, 0.6f, 0.95f), _ => new Color(0.4f, 0.4f, 0.4f), }); } private static string StatusLabel(FriendPlayState state) { return state switch { FriendPlayState.PlayingThisGame => "Playing How To Fish", FriendPlayState.OnlineElsewhere => "Online", _ => "Offline", }; } private static Button CreateSmallButton(Transform parent, string label, Vector2 pos, Color color) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_002c: 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_0058: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ef: 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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Button"); val.transform.SetParent(parent, false); RectTransform val2 = val.AddComponent(); val2.anchorMin = new Vector2(1f, 0.5f); val2.anchorMax = new Vector2(1f, 0.5f); val2.pivot = new Vector2(1f, 0.5f); val2.anchoredPosition = pos; val2.sizeDelta = new Vector2(76f, 30f); Image val3 = val.AddComponent(); ((Graphic)val3).color = color; Button val4 = val.AddComponent