Table of Contents

Class LobbyZoneManager

Namespace
Uncreated.Warfare.Lobby
Assembly
Uncreated.Warfare.dll

Handles visual effects in the lobby.

public class LobbyZoneManager : IHostedService, ILevelHostedService, IEventListener<QuestObjectInteracted>, ILayoutStartingListener, IEventListener<PlayerTeamChanged>, IEventListener<PlayerLeft>
Inheritance
LobbyZoneManager
Implements
Inherited Members

Constructors

LobbyZoneManager(ZoneStore, LobbyConfiguration, IFactionDataStore, ILogger<LobbyZoneManager>, WarfareModule, ITeamSelectorBehavior, IPlayerService, OptionsUI, LayoutFactory)

public LobbyZoneManager(ZoneStore zoneStore, LobbyConfiguration lobbyConfig, IFactionDataStore factionDataStore, ILogger<LobbyZoneManager> logger, WarfareModule module, ITeamSelectorBehavior behavior, IPlayerService playerService, OptionsUI optionsUi, LayoutFactory layoutFactory)

Parameters

zoneStore ZoneStore
lobbyConfig LobbyConfiguration
factionDataStore IFactionDataStore
logger ILogger<LobbyZoneManager>
module WarfareModule
behavior ITeamSelectorBehavior
playerService IPlayerService
optionsUi OptionsUI
layoutFactory LayoutFactory

Properties

Disabled

If the lobby is disabled.

public bool Disabled { get; }

Property Value

bool

Remarks

Added this so older maps can be loaded in the mean time before their lobby is upgraded.

JoinDelay

Number of seconds to wait until joining the team.

public TimeSpan JoinDelay { get; }

Property Value

TimeSpan

Methods

GetActivePlayerCount()

Gets the total of all players on a team.

public int GetActivePlayerCount()

Returns

int

GetLobbyZone()

Gets a reference to the zone being used as the lobby zone.

public Zone? GetLobbyZone()

Returns

Zone

GetTeamPlayerCount(int)

Gets the total cached player count on a single team.

public int GetTeamPlayerCount(int teamIndex)

Parameters

teamIndex int

Returns

int

Remarks

Out of bounds indices just return 0.

JoinLobbyAsync(WarfarePlayer, CancellationToken)

Teleport a player to the lobby and leave their group.

public UniTask JoinLobbyAsync(WarfarePlayer player, CancellationToken token = default)

Parameters

player WarfarePlayer
token CancellationToken

Returns

UniTask

StartJoiningTeam(WarfarePlayer, int)

public void StartJoiningTeam(WarfarePlayer player, int teamIndex)

Parameters

player WarfarePlayer
teamIndex int