Class Scp330
A wrapper class for SCP-330 bags.
public class Scp330 : Usable, IWrapper<ItemBase>, IWrapper<UsableItem>, IWrapper<Scp330Bag>
- Inheritance
-
Scp330
- Inherited Members
- Extension Methods
Constructors
Scp330(Scp330Bag)
Initializes a new instance of the Scp330 class.
public Scp330(Scp330Bag itemBase)
Parameters
itemBaseScp330BagThe base InventorySystem.Items.Usables.Scp330.Scp330Bag class.
Properties
AvailableCandies
Gets the Dictionary<TKey, TValue> with all presented in game candies.
public static Dictionary<CandyKindID, ICandy> AvailableCandies { get; }
Property Value
- Dictionary<CandyKindID, ICandy>
Base
Gets the InventorySystem.Items.Usables.Scp330.Scp330Bag that this class is encapsulating.
public Scp330Bag Base { get; }
Property Value
- Scp330Bag
Candies
Gets the InventorySystem.Items.Usables.Scp330.CandyKindIDs held in this bag.
public IReadOnlyCollection<CandyKindID> Candies { get; }
Property Value
- IReadOnlyCollection<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.
public CandyKindID ExposedType { get; set; }
Property Value
- CandyKindID
Methods
AddCandy(CandyKindID)
Adds a specific candy to the bag.
public bool AddCandy(CandyKindID type)
Parameters
typeCandyKindIDThe InventorySystem.Items.Usables.Scp330.CandyKindID to add.
Returns
AddCandy(IEnumerable<CandyKindID>, out CandyAddStatus)
Adds a collection of candy's to a bag.
public int AddCandy(IEnumerable<CandyKindID> candies, out CandyAddStatus status)
Parameters
candiesIEnumerable<CandyKindID>The InventorySystem.Items.Usables.Scp330.CandyKindID's to add.
statusCandyAddStatusThe CandyAddStatus's insertion status.
Returns
- int
based on number of candy added.
Clone()
Clones current Scp330 object.
public override Item Clone()
Returns
CreatePickup(Vector3, Quaternion?, bool)
public override Pickup CreatePickup(Vector3 position, Quaternion? rotation = null, bool spawn = true)
Parameters
positionVector3The UnityEngine.Vector3 location to spawn it.
rotationQuaternion?The UnityEngine.Quaternion rotation to give the item.
spawnboolWhether the Scp330Pickup should be initially spawned.
Returns
DropCandy(CandyKindID, bool, bool, CandyKindID)
Drops candies from the bag.
public IEnumerable<Scp330Pickup> DropCandy(CandyKindID type, bool dropAll = false, bool dropIndividual = false, CandyKindID exposedType = CandyKindID.None)
Parameters
typeCandyKindIDThe InventorySystem.Items.Usables.Scp330.CandyKindID of candies to drop.
dropAllboolWhether to drop all candies matching the given type, or just one.
dropIndividualboolWhether to drop all candies individually, or as a bag, when dropping more than one candy.
exposedTypeCandyKindIDThe ExposedType to use, if the override is set to true.
Returns
- IEnumerable<Scp330Pickup>
a IEnumerable<T> of Pickups generated by this method. Can be empty!.
RemoveAllCandy()
Removes all candy from the bag.
public int RemoveAllCandy()
Returns
- int
The total amount of candies that were removed from the bag.
RemoveCandy(CandyKindID, bool)
Removes a specific candy from the bag.
public int RemoveCandy(CandyKindID type, bool removeAll = false)
Parameters
typeCandyKindIDThe InventorySystem.Items.Usables.Scp330.CandyKindID to be removed.
removeAllboolWhether to only remove all matching candy. (If true, all candies of the given type are removed).
Returns
- int
The total amount of candies that were removed from the bag.
ToString()
Returns the SCP-330 in a human readable format.
public override string ToString()
Returns
- string
A string containing SCP-330 related data.