Skip to main content

ServerLockCollection

A class in Root.Township, Alta.Networking.Servers.

The set of join locks on a server, held as ServerHandler.ServerLocks. While any lock is in it, the server turns away joining players with the highest-level lock's message (used during wipes).

Constructors​

MemberWhat it is
ServerLockCollection()Creates a ServerLockCollection with default values.

Fields​

2 private and internal fields
MemberWhat it is
private HashSet<ServerJoinLock> locksThe active locks.
private static Logger loggerNLog logger for this class.

Properties​

MemberWhat it is
int Count { get; }Number of active locks; above zero means players can't join.

Methods​

MemberWhat it is
bool Add(ServerJoinLock serverLock)Adds a lock and logs it. Returns false if it was already there.
IEnumerator<ServerJoinLock> GetEnumerator()Enumerates the active locks.
bool Remove(ServerJoinLock serverLock)Removes a lock and logs it. Returns false if it wasn't there.
1 private and internal method
MemberWhat it is
private IEnumerator System.Collections.IEnumerable.GetEnumerator()Enumerates the active locks.

Used in​

Members of other types that take, return or hold a ServerLockCollection: