Esempio n. 1
0
        public static string BuildLogDetail(this APIUser user)
        {
            var    PlayerManager = Wrappers.GetPlayerManager();
            var    Player        = PlayerManager.GetPlayer(user.id);
            string Information   = $"{user.displayName}'s Information\n\n";

            Console.WriteLine(Information);

            //Information += $"Username: {user.username}\n";
            //Information += $"Display Name: {user.displayName}\n";
            //Information += $"UserID: {user.id}\n";
            ////Information += $"SteamID: {(SteamID == 0 ? "Hidden." : SteamID.ToString())}\n";
            //Information += $"AvatarID: {user.avatarId}\n";
            //Information += $"Avatar Asset URL: {user.currentAvatarAssetUrl}\n";
            //Information += $"Date Logged: {DateTime.Now.ToShortDateString()} @ {DateTime.Now.ToShortTimeString()}\n";

            return(Information.ToString());
        }
Esempio n. 2
0
        public static void Update()
        {
            if (!Started)
            {
                return;
            }

            if (RoomManager.field_ApiWorld_0.instanceId != CachedInstance)
            {
                Presence.details = "Playing VRChat";

                if (Wrappers.GetPlayerManager().GetAllPlayers().Count > 0)
                {
                    Presence.state = $"With {Wrappers.GetPlayerManager().GetAllPlayers().Count - 1} other player(s)";
                }
                else
                {
                    Presence.state = $"With myself";
                }

                switch (RoomManager.field_ApiWorld_0.currentInstanceAccess)
                {
                default:
                    Presence.largeImageKey  = "il2cpp-dev";
                    Presence.smallImageKey  = "unity-logo";
                    Presence.largeImageText = "Using QoL by IL2CPP Dev Team.";
                    Presence.smallImageText = "In the loading screen";
                    break;

                case VRC.Core.ApiWorldInstance.AccessType.Public:
                    Presence.largeImageKey  = "il2cpp-dev";
                    Presence.smallImageKey  = "unity-logo";
                    Presence.largeImageText = "Using QoL by IL2CPP Dev Team.";
                    Presence.smallImageText = "In a Public Instance";
                    break;

                case VRC.Core.ApiWorldInstance.AccessType.FriendsOnly:
                    Presence.largeImageKey  = "cute-girl";
                    Presence.smallImageKey  = "unity-logo";
                    Presence.largeImageText = "Using QoL by IL2CPP Dev Team.";
                    Presence.smallImageText = "In a Friends Only Instance";
                    break;

                case VRC.Core.ApiWorldInstance.AccessType.InviteOnly:
                    Presence.largeImageKey  = "il2cpp-dev";
                    Presence.smallImageKey  = "unity-logo";
                    Presence.largeImageText = "Using QoL by IL2CPP Dev Team.";
                    Presence.smallImageText = "In an Invite Only Instance";
                    break;

                case VRC.Core.ApiWorldInstance.AccessType.FriendsOfGuests:
                    Presence.largeImageKey  = "cute-girl";
                    Presence.smallImageKey  = "unity-logo";
                    Presence.largeImageText = "Using QoL by IL2CPP Dev Team.";
                    Presence.smallImageText = "In a Friends+ Instance";
                    break;

                case VRC.Core.ApiWorldInstance.AccessType.InvitePlus:
                    Presence.largeImageKey  = "il2cpp-dev";
                    Presence.smallImageKey  = "unity-logo";
                    Presence.largeImageText = "Using QoL by IL2CPP Dev Team.";
                    Presence.smallImageText = "In an Invite+ Instance";
                    break;

                case VRC.Core.ApiWorldInstance.AccessType.Counter:
                    Presence.largeImageKey  = "il2cpp-dev";
                    Presence.smallImageKey  = "unity-logo";
                    Presence.largeImageText = "Using QoL by IL2CPP Dev Team.";
                    Presence.smallImageText = "In an Counter Instance";
                    break;
                }

                CachedInstance = RoomManager.field_ApiWorld_0.instanceId;
            }
        }