using BepInEx;
using BepInEx.Bootstrap;
using LobbyCompatibility.Enums;
using LobbyCompatibility.Features;
using System.Runtime.CompilerServices;

namespace MuzikaGromche
{
    internal static class Compatibility
    {
        [MethodImpl(MethodImplOptions.NoInlining)]
        public static void Register(BaseUnityPlugin plugin)
        {
            if (Chainloader.PluginInfos.ContainsKey("BMX.LobbyCompatibility"))
            {
                RegisterLobbyCompatibility(plugin.Info.Metadata);
            }
        }

        [MethodImpl(MethodImplOptions.NoInlining)]
        private static void RegisterLobbyCompatibility(BepInPlugin plugin)
        {
            PluginHelper.RegisterPlugin(plugin.GUID, plugin.Version, CompatibilityLevel.Everyone, VersionStrictness.Patch);
        }
    }
}
