Struct AttachmentIdentifier
A tool to identify attachments.
Inherited Members
Namespace: Exiled.API.Structs
Assembly: Exiled.API.dll
Syntax
public readonly struct AttachmentIdentifier
Properties
| Improve this Doc View SourceCode
Gets the attachment code.
Declaration
public readonly uint Code { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Name
Gets the attachment name.
Declaration
public readonly AttachmentName Name { get; }
Property Value
Type | Description |
---|---|
InventorySystem.Items.Firearms.Attachments.AttachmentName |
Slot
Gets the attachment slot.
Declaration
public readonly AttachmentSlot Slot { get; }
Property Value
Type | Description |
---|---|
InventorySystem.Items.Firearms.Attachments.AttachmentSlot |
Methods
| Improve this Doc View SourceEquals(AttachmentIdentifier)
Indicates whether this instance and a AttachmentIdentifier are equal.
Declaration
public readonly bool Equals(AttachmentIdentifier attachmentIdentifier)
Parameters
Type | Name | Description |
---|---|---|
AttachmentIdentifier | attachmentIdentifier | The AttachmentIdentifier to compare with the current instance. |
Returns
Type | Description |
---|---|
System.Boolean | 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.
Declaration
public readonly bool Equals(Attachment firearmAttachment)
Parameters
Type | Name | Description |
---|---|---|
InventorySystem.Items.Firearms.Attachments.Components.Attachment | firearmAttachment | The InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare with the current instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if InventorySystem.Items.Firearms.Attachments.Components.Attachment and this instance represent the same value; otherwise, false. |
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Get(FirearmType, AttachmentName)
Gets a AttachmentIdentifier by name.
Declaration
public static AttachmentIdentifier Get(FirearmType type, AttachmentName name)
Parameters
Type | Name | Description |
---|---|---|
FirearmType | type | Weapons FirearmType. |
InventorySystem.Items.Firearms.Attachments.AttachmentName | name | Attachment name. |
Returns
Type | Description |
---|---|
AttachmentIdentifier | AttachmentIdentifier instance. |
Get(FirearmType, AttachmentSlot)
Gets the all AttachmentIdentifier's for type, by slot.
Declaration
public static IEnumerable<AttachmentIdentifier> Get(FirearmType type, AttachmentSlot slot)
Parameters
Type | Name | Description |
---|---|---|
FirearmType | type | Weapons FirearmType. |
InventorySystem.Items.Firearms.Attachments.AttachmentSlot | slot | Attachment slot. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<AttachmentIdentifier> | AttachmentIdentifier instance. |
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
ToString()
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
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.
Declaration
public static bool TryParse(string s, out AttachmentIdentifier identifier)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | The System.String to convert. |
AttachmentIdentifier | identifier | The converted System.String. |
Returns
Type | Description |
---|---|
System.Boolean | true if System.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.
Declaration
public static bool TryParse(string s, out AttachmentName name)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | The System.String to convert. |
InventorySystem.Items.Firearms.Attachments.AttachmentName | name | The converted System.String. |
Returns
Type | Description |
---|---|
System.Boolean | true if System.String was converted successfully; otherwise, false. |
Operators
| Improve this Doc View SourceAddition(AttachmentIdentifier, UInt32)
Computes the sum of its right-hand AttachmentIdentifier operand and its left-hand System.UInt32 operand.
Declaration
public static uint operator +(AttachmentIdentifier left, uint right)
Parameters
Type | Name | Description |
---|---|---|
AttachmentIdentifier | left | The AttachmentIdentifier to be added up. |
System.UInt32 | right | The System.UInt32 to be added up. |
Returns
Type | Description |
---|---|
System.UInt32 | A System.UInt32 value that represents the sum of the two operands. |
Addition(UInt32, AttachmentIdentifier)
Computes the sum of its right-hand System.UInt32 operand and its left-hand AttachmentIdentifier operand.
Declaration
public static uint operator +(uint left, AttachmentIdentifier right)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | left | The System.UInt32 to be added up. |
AttachmentIdentifier | right | The AttachmentIdentifier to be added up. |
Returns
Type | Description |
---|---|
System.UInt32 | A System.UInt32 value that represents the sum of the two operands. |
Equality(AttachmentIdentifier, AttachmentIdentifier)
Compares two operands: AttachmentIdentifier and AttachmentIdentifier.
Declaration
public static bool operator ==(AttachmentIdentifier left, AttachmentIdentifier right)
Parameters
Type | Name | Description |
---|---|---|
AttachmentIdentifier | left | The left-hand AttachmentIdentifier operand to compare. |
AttachmentIdentifier | right | The right-hand AttachmentIdentifier operand to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the values are equal. |
Equality(AttachmentIdentifier, Attachment)
Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.
Declaration
public static bool operator ==(AttachmentIdentifier left, Attachment right)
Parameters
Type | Name | Description |
---|---|---|
AttachmentIdentifier | left | The AttachmentIdentifier to compare. |
InventorySystem.Items.Firearms.Attachments.Components.Attachment | right | The InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the values are equal. |
Equality(Attachment, AttachmentIdentifier)
Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.
Declaration
public static bool operator ==(Attachment left, AttachmentIdentifier right)
Parameters
Type | Name | Description |
---|---|---|
InventorySystem.Items.Firearms.Attachments.Components.Attachment | left | The InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare. |
AttachmentIdentifier | right | The AttachmentIdentifier to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the values are equal. |
Inequality(AttachmentIdentifier, AttachmentIdentifier)
Compares two operands: AttachmentIdentifier and AttachmentIdentifier.
Declaration
public static bool operator !=(AttachmentIdentifier left, AttachmentIdentifier right)
Parameters
Type | Name | Description |
---|---|---|
AttachmentIdentifier | left | The left-hand AttachmentIdentifier operand to compare. |
AttachmentIdentifier | right | The right-hand AttachmentIdentifier to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the values are equal. |
Inequality(AttachmentIdentifier, Attachment)
Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.
Declaration
public static bool operator !=(AttachmentIdentifier left, Attachment right)
Parameters
Type | Name | Description |
---|---|---|
AttachmentIdentifier | left | The AttachmentIdentifier to compare. |
InventorySystem.Items.Firearms.Attachments.Components.Attachment | right | The InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the values are not equal. |
Inequality(Attachment, AttachmentIdentifier)
Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.
Declaration
public static bool operator !=(Attachment left, AttachmentIdentifier right)
Parameters
Type | Name | Description |
---|---|---|
InventorySystem.Items.Firearms.Attachments.Components.Attachment | left | The InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare. |
AttachmentIdentifier | right | The AttachmentIdentifier to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the values are not equal. |
Subtraction(AttachmentIdentifier, UInt32)
Subtracts its right-hand AttachmentIdentifier operand from its left-hand System.UInt32 operand.
Declaration
public static uint operator -(AttachmentIdentifier left, uint right)
Parameters
Type | Name | Description |
---|---|---|
AttachmentIdentifier | left | The AttachmentIdentifier to be subtracted. |
System.UInt32 | right | The System.UInt32 to be subtracted. |
Returns
Type | Description |
---|---|
System.UInt32 | A System.UInt32 value representing the subtraction between the two operands. |
Subtraction(UInt32, AttachmentIdentifier)
Subtracts its right-hand System.UInt32 operand from its left-hand AttachmentIdentifier operand.
Declaration
public static uint operator -(uint left, AttachmentIdentifier right)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | left | The System.UInt32 to be subtracted. |
AttachmentIdentifier | right | The AttachmentIdentifier to be subtracted. |
Returns
Type | Description |
---|---|
System.UInt32 | A System.UInt32 value representing the subtraction between the two operands. |