manager/LobbyPlayerSlot.cs

Component representing a lobby slot. It exposes SlotIndex and computes whether a player occupies that slot and which player does by querying Scene components for Player matching LobbySlotIndex.

Rough CodeReflection
using Sandbox;

public sealed class LobbyPlayerSlot : Component
{
	[Property] public int SlotIndex { get; set; }
	public bool IsOccupied => Scene.GetAllComponents<Player>().Any( x => x.LobbySlotIndex == SlotIndex );
	public Player OccupyingPlayer => Scene.GetAllComponents<Player>().FirstOrDefault( x => x.LobbySlotIndex == SlotIndex );
}