Table of Contents

Class BuildableStructure

Namespace
Uncreated.Warfare.Buildables
Assembly
Uncreated.Warfare.dll
[CannotApplyEqualityOperator]
public class BuildableStructure : IBuildable, IEquatable<IBuildable>, IEquatable<BuildableBarricade>, IEquatable<BarricadeDrop>, IEquatable<BarricadeData>, IEquatable<BuildableStructure>, IEquatable<StructureDrop>, IEquatable<StructureData>, ITransformObject
Inheritance
BuildableStructure
Implements
IEquatable<BarricadeDrop>
IEquatable<BarricadeData>
IEquatable<StructureDrop>
IEquatable<StructureData>
Inherited Members
Extension Methods

Constructors

BuildableStructure(StructureDrop)

public BuildableStructure(StructureDrop drop)

Parameters

drop StructureDrop

Properties

Alive

If this object is still alive.

public bool Alive { get; }

Property Value

bool

Asset

The asset for the buildable.

public ItemPlaceableAsset Asset { get; }

Property Value

ItemPlaceableAsset

Data

public StructureData Data { get; }

Property Value

StructureData

Drop

public StructureDrop Drop { get; }

Property Value

StructureDrop

Group

The group of the player that placed the buildable.

public CSteamID Group { get; }

Property Value

CSteamID

Health

The health of this buildable.

public ushort Health { get; }

Property Value

ushort

InstanceId

The instance ID of this buildable specific to it's buildable type.

public uint InstanceId { get; }

Property Value

uint

IsDead

If the buildable has been destroyed by its health dropping to 0.

public bool IsDead { get; }

Property Value

bool

Remarks

This is not the same as not spawned.

IsStructure

If the buildable is a structure instead of a barricade.

public bool IsStructure { get; }

Property Value

bool

MaxHealth

The maximum amount of health this buildable could have.

public ushort MaxHealth { get; }

Property Value

ushort

Model

The transform of the buildable.

public Transform Model { get; }

Property Value

Transform

NetId

The ID used to refer to networked objects.

public NetId NetId { get; }

Property Value

NetId

Owner

The player that placed the buildable.

public CSteamID Owner { get; }

Property Value

CSteamID

Position

The world position of the object.

public Vector3 Position { get; set; }

Property Value

Vector3

Exceptions

GameThreadException

Not on main thread.

NotSupportedException

Not able to set position.

Rotation

The world rotation of the object.

public Quaternion Rotation { get; set; }

Property Value

Quaternion

Exceptions

GameThreadException

Not on main thread.

NotSupportedException

Not able to set rotation.

Structure

public Structure Structure { get; }

Property Value

Structure

Methods

Equals(StructureData?)

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

public bool Equals(StructureData? other)

Parameters

other StructureData

An object to compare with this object.

Returns

bool

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

Equals(StructureDrop?)

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

public bool Equals(StructureDrop? other)

Parameters

other StructureDrop

An object to compare with this object.

Returns

bool

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

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(BuildableStructure?)

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

public bool Equals(BuildableStructure? other)

Parameters

other BuildableStructure

An object to compare with this object.

Returns

bool

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

Equals(IBuildable?)

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

public bool Equals(IBuildable? other)

Parameters

other IBuildable

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.

SetPositionAndRotation(Vector3, Quaternion)

Set the position and rotation at the same time.

public void SetPositionAndRotation(Vector3 position, Quaternion rotation)

Parameters

position Vector3
rotation Quaternion

Exceptions

GameThreadException

Not on main thread.

NotSupportedException

Not able to set position or rotation.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.