using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; 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.Configuration; using HarmonyLib; using Microsoft.CodeAnalysis; using Unity.Netcode; using Unity.Netcode.Components; using UnityEngine; using UnityEngine.Events; using UnityEngine.Networking; 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.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("Antro.FurniturePresets")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Antro.FurniturePresets")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0.0")] [assembly: AssemblyProduct("Antro.FurniturePresets")] [assembly: AssemblyTitle("Antro.FurniturePresets")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [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 DiscordInviteMod { [BepInPlugin("Antro.discord_invite", "Discord Invite Button", "1.0.3")] public class DiscordInvitePlugin : BaseUnityPlugin { private const string SharedObjectName = "SharedDiscordInviteButton_BG"; private void Awake() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown if ((Object)(object)GameObject.Find("SharedDiscordInviteButton_BG") == (Object)null) { GameObject val = new GameObject("SharedDiscordInviteButton_BG"); Object.DontDestroyOnLoad((Object)(object)val); val.AddComponent(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Discord Invite Button initialized successfully!"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Discord Invite Button already exists from another mod. Skipping creation."); } } } public class DiscordInviteComponent : MonoBehaviour { private readonly string discordUrl = "https://discord.gg/bPjcrJxBmP"; private readonly string logoUrl = "https://i.imgur.com/48jKo1r_d.png?maxwidth=520&shape=thumb&fidelity=high"; private readonly string arrowUrl = "https://i.imgur.com/TUT8ICu_d.png?maxwidth=520&shape=thumb&fidelity=high"; private readonly float logoSize = 300f; private readonly float padding = 40f; private readonly float arrowSize = 160f; private readonly float baseRadius = 260f; private readonly float animAmplitude = 25f; private readonly float animSpeed = 5f; private Texture2D logoTexture; private Texture2D arrowTexture; private GUIStyle transparentStyle; private string folderPath; private bool hasClickedLogo = false; private const string PrefsKey = "Antro_DiscordInvite_HasClicked"; private bool shouldShowButton = false; private bool isSubMenuOpen = false; private HashSet