Class Scp330
A wrapper class for SCP-330 bags.
Implements
Inherited Members
Namespace: Exiled.API.Features.Items
Assembly: Exiled.API.dll
Syntax
public class Scp330 : Usable, IWrapper<ItemBase>, IWrapper<UsableItem>, IWrapper<Scp330Bag>
Constructors
| Improve this Doc View SourceScp330(Scp330Bag)
Initializes a new instance of the Scp330 class.
Declaration
public Scp330(Scp330Bag itemBase)
Parameters
Type | Name | Description |
---|---|---|
InventorySystem.Items.Usables.Scp330.Scp330Bag | itemBase | The base InventorySystem.Items.Usables.Scp330.Scp330Bag class. |
Properties
| Improve this Doc View SourceAvailableCandies
Gets the System.Collections.Generic.Dictionary<TKey, TValue> with all presented in game candies.
Declaration
public static Dictionary<CandyKindID, ICandy> AvailableCandies { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<InventorySystem.Items.Usables.Scp330.CandyKindID, InventorySystem.Items.Usables.Scp330.ICandy> |
Base
Gets the InventorySystem.Items.Usables.Scp330.Scp330Bag that this class is encapsulating.
Declaration
public Scp330Bag Base { get; }
Property Value
Type | Description |
---|---|
InventorySystem.Items.Usables.Scp330.Scp330Bag |
Candies
Gets the InventorySystem.Items.Usables.Scp330.CandyKindIDs held in this bag.
Declaration
public IReadOnlyCollection<CandyKindID> Candies { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<InventorySystem.Items.Usables.Scp330.CandyKindID> |
ExposedType
Gets or sets the exposed type. When set to a candy color, the bag will appear as that candy when dropped with the Exiled.API.Features.Spawn method. Setting it to InventorySystem.Items.Usables.Scp330.CandyKindID.None results in it looking like a bag.
Declaration
public CandyKindID ExposedType { get; set; }
Property Value
Type | Description |
---|---|
InventorySystem.Items.Usables.Scp330.CandyKindID |
Methods
| Improve this Doc View SourceAddCandy(CandyKindID)
Adds a specific candy to the bag.
Declaration
public bool AddCandy(CandyKindID type)
Parameters
Type | Name | Description |
---|---|---|
InventorySystem.Items.Usables.Scp330.CandyKindID | type | The InventorySystem.Items.Usables.Scp330.CandyKindID to add. |
Returns
Type | Description |
---|---|
System.Boolean | true if the candy was successfully added to the bag; otherwise, false. |
AddCandy(IEnumerable<CandyKindID>, out CandyAddStatus)
Adds a collection of candy's to a bag.
Declaration
public int AddCandy(IEnumerable<CandyKindID> candies, out CandyAddStatus status)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<InventorySystem.Items.Usables.Scp330.CandyKindID> | candies | The InventorySystem.Items.Usables.Scp330.CandyKindID's to add. |
CandyAddStatus | status | The CandyAddStatus's insertion status. |
Returns
Type | Description |
---|---|
System.Int32 | based on number of candy added. |
Clone()
Clones current Scp330 object.
Declaration
public override Item Clone()
Returns
Type | Description |
---|---|
Item | New Scp330 object. |
Overrides
| 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 UnityEngine.Vector3 location to spawn it. |
UnityEngine.Quaternion | rotation | The UnityEngine.Quaternion rotation to give the item. |
System.Boolean | spawn | Whether the Scp330Pickup should be initially spawned. |
Returns
Type | Description |
---|---|
Pickup | The created Pickup. |
Overrides
| Improve this Doc View SourceDropCandy(CandyKindID, Boolean, Boolean, CandyKindID)
Drops candies from the bag.
Declaration
public IEnumerable<Scp330Pickup> DropCandy(CandyKindID type, bool dropAll = false, bool dropIndividual = false, CandyKindID exposedType = CandyKindID.None)
Parameters
Type | Name | Description |
---|---|---|
InventorySystem.Items.Usables.Scp330.CandyKindID | type | The InventorySystem.Items.Usables.Scp330.CandyKindID of candies to drop. |
System.Boolean | dropAll | Whether or not to drop all candies matching the given type, or just one. |
System.Boolean | dropIndividual | Whether or not to drop all candies individually, or as a bag, when dropping more than one candy. |
InventorySystem.Items.Usables.Scp330.CandyKindID | exposedType | The ExposedType to use, if the override is set to true. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Scp330Pickup> | a System.Collections.Generic.IEnumerable<T> of Pickups generated by this method. Can be empty!. |
RemoveAllCandy()
Removes all candy from the bag.
Declaration
public int RemoveAllCandy()
Returns
Type | Description |
---|---|
System.Int32 | The total amount of candies that were removed from the bag. |
RemoveCandy(CandyKindID, Boolean)
Removes a specific candy from the bag.
Declaration
public int RemoveCandy(CandyKindID type, bool removeAll = false)
Parameters
Type | Name | Description |
---|---|---|
InventorySystem.Items.Usables.Scp330.CandyKindID | type | The InventorySystem.Items.Usables.Scp330.CandyKindID to be removed. |
System.Boolean | removeAll | Whether or not to only remove all matching candy. (If true, all candies of the given type are removed). |
Returns
Type | Description |
---|---|
System.Int32 | The total amount of candies that were removed from the bag. |
ToString()
Returns the SCP-330 in a human readable format.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string containing SCP-330 related data. |