Table of Contents

Class BuildableBarricade

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

Constructors

BuildableBarricade(BarricadeDrop)

public BuildableBarricade(BarricadeDrop drop)

Parameters

drop BarricadeDrop

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 BarricadeData Data { get; }

Property Value

BarricadeData

Drop

public BarricadeDrop Drop { get; }

Property Value

BarricadeDrop

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.

IsOnVehicle

If the buildable is planted on a vehicle.

public bool IsOnVehicle { get; }

Property Value

bool

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.

VehicleParent

The vehicle this barricade is attached to, if any.

public InteractableVehicle? VehicleParent { get; }

Property Value

InteractableVehicle

Methods

Equals(BarricadeData?)

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

public bool Equals(BarricadeData? other)

Parameters

other BarricadeData

An object to compare with this object.

Returns

bool

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

Equals(BarricadeDrop?)

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

public bool Equals(BarricadeDrop? other)

Parameters

other BarricadeDrop

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

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

public bool Equals(BuildableBarricade? other)

Parameters

other BuildableBarricade

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.