Class Usable
A wrapper class for InventorySystem.Items.Usables.UsableItem.
Implements
Inherited Members
Namespace: Exiled.API.Features.Items
Assembly: Exiled.API.dll
Syntax
public class Usable : Item, IWrapper<ItemBase>, IWrapper<UsableItem>
Constructors
| Improve this Doc View SourceUsable(UsableItem)
Initializes a new instance of the Usable class.
Declaration
public Usable(UsableItem itemBase)
Parameters
Type | Name | Description |
---|---|---|
InventorySystem.Items.Usables.UsableItem | itemBase | The base InventorySystem.Items.Usables.UsableItem class. |
Properties
| Improve this Doc View SourceBase
Gets the InventorySystem.Items.Usables.UsableItem that this class is encapsulating.
Declaration
public UsableItem Base { get; }
Property Value
Type | Description |
---|---|
InventorySystem.Items.Usables.UsableItem |
Equippable
Gets a value indicating whether this item is equippable.
Declaration
public bool Equippable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Holsterable
Gets a value indicating whether this item is holsterable.
Declaration
public bool Holsterable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsUsing
Gets a value indicating whether the item is currently being used.
Declaration
public bool IsUsing { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MaxCancellableTime
Gets or sets how long after using starts a player has to cancel using the item.
Declaration
public float MaxCancellableTime { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
PlayerGetCooldown
Gets all the cooldown between uses of this item.
Declaration
public float PlayerGetCooldown { get; }
Property Value
Type | Description |
---|---|
System.Single |
RemainingCooldown
Gets or sets the cooldown between repeated uses of this item.
Declaration
public float RemainingCooldown { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
UseTime
Gets or sets how long it takes to use the item.
Declaration
public float UseTime { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Weight
Gets or sets the weight of the item.
Declaration
public float Weight { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
| Improve this Doc View SourceCreatePickup(Vector3, Quaternion, Boolean)
Declaration
public override Pickup CreatePickup(Vector3 position, Quaternion rotation = default(Quaternion), bool spawn = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | The location to spawn the item. |
UnityEngine.Quaternion | rotation | The rotation of the item. |
System.Boolean | spawn | Whether the Pickup should be initially spawned. |
Returns
Type | Description |
---|---|
Pickup | The created Pickup. |
Overrides
| Improve this Doc View SourceUse()
Uses the item.
Declaration
public virtual void Use()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The Owner of the item cannot be null. |