Table of Contents

Class FlagObjective

Namespace
Uncreated.Warfare.Layouts.Flags
Assembly
Uncreated.Warfare.dll
public class FlagObjective : IDisposable, IObjective, ITransformObject
Inheritance
FlagObjective
Implements
Inherited Members
Extension Methods

Constructors

FlagObjective(ZoneRegion, int)

public FlagObjective(ZoneRegion region, int index)

Parameters

region ZoneRegion
index int

FlagObjective(ZoneRegion, int, Team)

public FlagObjective(ZoneRegion region, int index, Team startingOwner)

Parameters

region ZoneRegion
index int
startingOwner Team

Properties

Center

public Vector3 Center { get; }

Property Value

Vector3

Contest

public SingleLeaderContest Contest { get; }

Property Value

SingleLeaderContest

CurrentContestState

public FlagContestState CurrentContestState { get; }

Property Value

FlagContestState

Index

public int Index { get; }

Property Value

int

IsActive

If this objective is currently active in the game (instead of waiting to be activated or something like a cache that hasn't spawned yet).

public bool IsActive { get; }

Property Value

bool

IsContested

public bool IsContested { get; }

Property Value

bool

Name

The display-name of this objective.

public string Name { get; }

Property Value

string

Owner

The team that owns this objective.

public Team Owner { get; }

Property Value

Team

Players

public ReadOnlyTrackingList<WarfarePlayer> Players { get; }

Property Value

ReadOnlyTrackingList<WarfarePlayer>

Region

public ZoneRegion Region { get; }

Property Value

ZoneRegion

Methods

Discover(Team)

Add a team to the list of teams who have discovered this flag.

public bool Discover(Team team)

Parameters

team Team

Returns

bool

true if the team is valid and didn't already discover this flag, otherwise false.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

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.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

IsDiscovered(CSteamID)

Check if a team has discovered the flag.

public bool IsDiscovered(CSteamID groupId)

Parameters

groupId CSteamID

Returns

bool

IsDiscovered(Team)

Check if a team has discovered the flag.

public bool IsDiscovered(Team team)

Parameters

team Team

Returns

bool

IsPastOwner(Team)

public bool IsPastOwner(Team team)

Parameters

team Team

Returns

bool

true if the specified Team has captured this flag at least once, otherwise false.

MarkContested(bool)

public void MarkContested(bool isContested)

Parameters

isContested bool

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.