Table of Contents

Struct AttachmentIdentifier

Namespace
Exiled.API.Structs
Assembly
Exiled.API.dll

A tool to identify attachments.

public readonly struct AttachmentIdentifier
Inherited Members
Extension Methods

Properties

Code

Gets the attachment code.

public uint Code { get; }

Property Value

uint

Name

Gets the attachment name.

public AttachmentName Name { get; }

Property Value

AttachmentName

Slot

Gets the attachment slot.

public AttachmentSlot Slot { get; }

Property Value

AttachmentSlot

Methods

Equals(AttachmentIdentifier)

Indicates whether this instance and a AttachmentIdentifier are equal.

public bool Equals(AttachmentIdentifier attachmentIdentifier)

Parameters

attachmentIdentifier AttachmentIdentifier

The AttachmentIdentifier to compare with the current instance.

Returns

bool

true if AttachmentIdentifier and this instance represent the same value; otherwise, false.

Equals(Attachment)

Indicates whether this instance and a InventorySystem.Items.Firearms.Attachments.Components.Attachment are equal.

public bool Equals(Attachment firearmAttachment)

Parameters

firearmAttachment Attachment

The InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare with the current instance.

Returns

bool

true if InventorySystem.Items.Firearms.Attachments.Components.Attachment and this instance represent the same value; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Get(FirearmType, AttachmentName)

Gets a AttachmentIdentifier by name.

public static AttachmentIdentifier Get(FirearmType type, AttachmentName name)

Parameters

type FirearmType

Weapons FirearmType.

name AttachmentName

Attachment name.

Returns

AttachmentIdentifier

AttachmentIdentifier instance.

Get(FirearmType, AttachmentSlot)

Gets the all AttachmentIdentifier's for type, by slot.

public static IEnumerable<AttachmentIdentifier> Get(FirearmType type, AttachmentSlot slot)

Parameters

type FirearmType

Weapons FirearmType.

slot AttachmentSlot

Attachment slot.

Returns

IEnumerable<AttachmentIdentifier>

AttachmentIdentifier instance.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

TryParse(string, out AttachmentIdentifier)

Converts the string representation of a AttachmentIdentifier to its AttachmentIdentifier equivalent. A return value indicates whether the conversion is succeeded or failed.

public static bool TryParse(string s, out AttachmentIdentifier identifier)

Parameters

s string

The string to convert.

identifier AttachmentIdentifier

The converted string.

Returns

bool

true if string was converted successfully; otherwise, false.

TryParse(string, out AttachmentName)

Converts the string representation of a InventorySystem.Items.Firearms.Attachments.AttachmentName to its InventorySystem.Items.Firearms.Attachments.AttachmentName equivalent. A return value indicates whether the conversion is succeeded or failed.

public static bool TryParse(string s, out AttachmentName name)

Parameters

s string

The string to convert.

name AttachmentName

The converted string.

Returns

bool

true if string was converted successfully; otherwise, false.

Operators

operator +(AttachmentIdentifier, uint)

Computes the sum of its right-hand AttachmentIdentifier operand and its left-hand uint operand.

public static uint operator +(AttachmentIdentifier left, uint right)

Parameters

left AttachmentIdentifier

The AttachmentIdentifier to be added up.

right uint

The uint to be added up.

Returns

uint

A uint value that represents the sum of the two operands.

operator +(uint, AttachmentIdentifier)

Computes the sum of its right-hand uint operand and its left-hand AttachmentIdentifier operand.

public static uint operator +(uint left, AttachmentIdentifier right)

Parameters

left uint

The uint to be added up.

right AttachmentIdentifier

The AttachmentIdentifier to be added up.

Returns

uint

A uint value that represents the sum of the two operands.

operator ==(AttachmentIdentifier, AttachmentIdentifier)

Compares two operands: AttachmentIdentifier and AttachmentIdentifier.

public static bool operator ==(AttachmentIdentifier left, AttachmentIdentifier right)

Parameters

left AttachmentIdentifier

The left-hand AttachmentIdentifier operand to compare.

right AttachmentIdentifier

The right-hand AttachmentIdentifier operand to compare.

Returns

bool

true if the values are equal.

operator ==(AttachmentIdentifier, Attachment)

Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.

public static bool operator ==(AttachmentIdentifier left, Attachment right)

Parameters

left AttachmentIdentifier

The AttachmentIdentifier to compare.

right Attachment

The InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare.

Returns

bool

true if the values are equal.

operator ==(Attachment, AttachmentIdentifier)

Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.

public static bool operator ==(Attachment left, AttachmentIdentifier right)

Parameters

left Attachment

The InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare.

right AttachmentIdentifier

The AttachmentIdentifier to compare.

Returns

bool

true if the values are equal.

operator !=(AttachmentIdentifier, AttachmentIdentifier)

Compares two operands: AttachmentIdentifier and AttachmentIdentifier.

public static bool operator !=(AttachmentIdentifier left, AttachmentIdentifier right)

Parameters

left AttachmentIdentifier

The left-hand AttachmentIdentifier operand to compare.

right AttachmentIdentifier

The right-hand AttachmentIdentifier to compare.

Returns

bool

true if the values are equal.

operator !=(AttachmentIdentifier, Attachment)

Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.

public static bool operator !=(AttachmentIdentifier left, Attachment right)

Parameters

left AttachmentIdentifier

The AttachmentIdentifier to compare.

right Attachment

The InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare.

Returns

bool

true if the values are not equal.

operator !=(Attachment, AttachmentIdentifier)

Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.

public static bool operator !=(Attachment left, AttachmentIdentifier right)

Parameters

left Attachment

The InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare.

right AttachmentIdentifier

The AttachmentIdentifier to compare.

Returns

bool

true if the values are not equal.

operator -(AttachmentIdentifier, uint)

Subtracts its right-hand AttachmentIdentifier operand from its left-hand uint operand.

public static uint operator -(AttachmentIdentifier left, uint right)

Parameters

left AttachmentIdentifier

The AttachmentIdentifier to be subtracted.

right uint

The uint to be subtracted.

Returns

uint

A uint value representing the subtraction between the two operands.

operator -(uint, AttachmentIdentifier)

Subtracts its right-hand uint operand from its left-hand AttachmentIdentifier operand.

public static uint operator -(uint left, AttachmentIdentifier right)

Parameters

left uint

The uint to be subtracted.

right AttachmentIdentifier

The AttachmentIdentifier to be subtracted.

Returns

uint

A uint value representing the subtraction between the two operands.