예제 #1
0
        public static void RefreshPlayerEntries(bool changeConfig = false)
        {
            if (RoomManager.field_Internal_Static_ApiWorld_0 == null || Player.prop_Player_0 == null || Player.prop_Player_0.gameObject == null || !PlayerListMod.playerList.active)
            {
                return;
            }

            foreach (PlayerEntry entry in new List <EntryBase>(playerEntries.Values)) // Slow but allows me to remove things during its run
            {
                if (entry.player == null)
                {
                    entry.Remove();
                }
            }

            foreach (PlayerEntry entry in playerEntries.Values)
            {
                entry.Refresh();
            }

            localPlayerEntry.Refresh();

            RefreshLayout();
            shouldSaveConfig = changeConfig;
        }
예제 #2
0
        public static void RefreshAllEntries()
        {
            // Dont refresh if the local player gameobject has been deleted or if the playerlist is hidden
            if (RoomManager.field_Internal_Static_ApiWorld_0 == null || Player.prop_Player_0 == null || !MenuManager.playerList.active)
            {
                return;
            }

            localPlayerEntry?.Refresh();
            RefreshGeneralInfoEntries();
        }
예제 #3
0
        public static void RefreshPlayerEntries(bool bypassActive = false)
        {
            if (RoomManager.field_Internal_Static_ApiWorld_0 == null || Player.prop_Player_0 == null || Player.prop_Player_0.gameObject == null || Player.prop_Player_0.prop_VRCPlayerApi_0 == null || (!MenuManager.playerList.active && !bypassActive))
            {
                return;
            }

            foreach (PlayerEntry entry in playerEntries)
            {
                PlayerEntry.UpdateEntry(entry.player.prop_PlayerNet_0, entry, bypassActive);
            }
            localPlayerEntry.Refresh();
        }