Table of Contents

Class Zone

Namespace
Uncreated.Warfare.Zones
Assembly
Uncreated.Warfare.dll
[CannotApplyEqualityOperator]
public class Zone : IDeployable, ITranslationArgument, IEquatable<Zone>
Inheritance
Zone
Implements
Inherited Members
Extension Methods

Properties

AABBInfo

Used when Shape is AABB.

[JsonPropertyName("aabb")]
public ZoneAABBInfo? AABBInfo { get; set; }

Property Value

ZoneAABBInfo

Center

3D center of the zone.

[JsonPropertyName("center_pos")]
public Vector3 Center { get; set; }

Property Value

Vector3

CircleInfo

Used when Shape is Cylinder or Sphere.

[JsonPropertyName("circle")]
public ZoneCircleInfo? CircleInfo { get; set; }

Property Value

ZoneCircleInfo

Creator

User that original created the zone in the editor.

[JsonPropertyName("creator")]
public CSteamID Creator { get; set; }

Property Value

CSteamID

Faction

Linked faction name, only used for main base and anti-main-camp zones.

[JsonPropertyName("faction")]
public string? Faction { get; set; }

Property Value

string

GridObjects

Instance IDs of all interactable powered objects that should be enabled when the zone is in rotation.

[JsonPropertyName("grid_objects")]
public List<uint> GridObjects { get; set; }

Property Value

List<uint>

IsPrimary

If this zone is the 'primary' zone. Zones can have non-primary zones which are just extensions of themselves.

[JsonPropertyName("is_primary")]
public bool IsPrimary { get; set; }

Property Value

bool

Name

Unique name of the zone.

[JsonPropertyName("name")]
public string Name { get; set; }

Property Value

string

PolygonInfo

Used when Shape is Polygon.

[JsonPropertyName("polygon")]
public ZonePolygonInfo? PolygonInfo { get; set; }

Property Value

ZonePolygonInfo

Shape

Shape of the bounds of the zone.

[JsonPropertyName("shape")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public ZoneShape Shape { get; set; }

Property Value

ZoneShape

ShortName

Shortened Name.

[JsonPropertyName("short_name")]
public string? ShortName { get; set; }

Property Value

string

Spawn

Position where someone teleporting to the zone should spawn.

[JsonPropertyName("spawn_pos")]
public Vector3 Spawn { get; set; }

Property Value

Vector3

SpawnYaw

Yaw angle at which someone teleporting to the zone should spawn.

[JsonPropertyName("spawn_yaw")]
public float SpawnYaw { get; set; }

Property Value

float

Type

Type or use case of the zone.

[JsonPropertyName("use_case")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public ZoneType Type { get; set; }

Property Value

ZoneType

UpstreamZones

List of zones 'upstream' from the current zone. Used for pathing.

[JsonPropertyName("upstream_zones")]
public List<UpstreamZone> UpstreamZones { get; set; }

Property Value

List<UpstreamZone>

Methods

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(Zone)

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

public bool Equals(Zone other)

Parameters

other Zone

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.

GetMaxHeight()

Gets the upper height bound, if it exists, otherwise NaN.

public float GetMaxHeight()

Returns

float

GetMinHeight()

Gets the lower height bound, if it exists, otherwise NaN.

public float GetMinHeight()

Returns

float

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.