Table of Contents

Class Team

Namespace
Uncreated.Warfare.Layouts.Teams
Assembly
Uncreated.Warfare.dll

Represents a team or 'side' in a round.

public class Team : IEquatable<Team>
Inheritance
Team
Implements
Inherited Members

Constructors

Team()

public Team()

Fields

NoTeam

public static readonly Team NoTeam

Field Value

Team

Properties

Configuration

Extra configuration about the team from the TeamManager config.

public IConfigurationSection Configuration { get; }

Property Value

IConfigurationSection

Faction

Information about the faction for this team.

public required FactionInfo Faction { get; init; }

Property Value

FactionInfo

GroupId

Id of the in-game group used for this team.

public CSteamID GroupId { get; init; }

Property Value

CSteamID

Id

Unique ID for the team.

public required int Id { get; init; }

Property Value

int

IsValid

If this team has a valid Id and GroupId.

public bool IsValid { get; }

Property Value

bool

Opponents

List of all opponent teams.

[JsonIgnore]
[JsonIgnore]
public IReadOnlyCollection<Team> Opponents { get; }

Property Value

IReadOnlyCollection<Team>

Methods

DeclareEnemies(params IReadOnlyCollection<Team>)

public static void DeclareEnemies(params IReadOnlyCollection<Team> teams)

Parameters

teams IReadOnlyCollection<Team>

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(Team?)

Indicates whether the current object is equal to another object of the same type.

public virtual bool Equals(Team? other)

Parameters

other Team

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

IsFriendly(CSteamID)

public virtual bool IsFriendly(CSteamID otherGroupId)

Parameters

otherGroupId CSteamID

Returns

bool

IsFriendly(Team)

public virtual bool IsFriendly(Team other)

Parameters

other Team

Returns

bool

IsOpponent(CSteamID)

public virtual bool IsOpponent(CSteamID otherGroupId)

Parameters

otherGroupId CSteamID

Returns

bool

IsOpponent(Team)

public bool IsOpponent(Team other)

Parameters

other Team

Returns

bool

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(ulong, Team?)

public static bool operator ==(ulong team1, Team? team2)

Parameters

team1 ulong
team2 Team

Returns

bool

operator ==(Team?, ulong)

public static bool operator ==(Team? team1, ulong team2)

Parameters

team1 Team
team2 ulong

Returns

bool

operator ==(Team?, Team?)

public static bool operator ==(Team? team1, Team? team2)

Parameters

team1 Team
team2 Team

Returns

bool

operator !=(ulong, Team?)

public static bool operator !=(ulong team1, Team? team2)

Parameters

team1 ulong
team2 Team

Returns

bool

operator !=(Team?, ulong)

public static bool operator !=(Team? team1, ulong team2)

Parameters

team1 Team
team2 ulong

Returns

bool

operator !=(Team?, Team?)

public static bool operator !=(Team? team1, Team? team2)

Parameters

team1 Team
team2 Team

Returns

bool