Table of Contents

Class Scp330

Namespace
Exiled.API.Features.Items
Assembly
Exiled.API.dll

A wrapper class for SCP-330 bags.

public class Scp330 : Usable, IWrapper<ItemBase>, IWrapper<UsableItem>, IWrapper<Scp330Bag>
Inheritance
Scp330
Implements
IWrapper<ItemBase>
IWrapper<UsableItem>
IWrapper<Scp330Bag>
Inherited Members
Extension Methods

Constructors

Scp330(Scp330Bag)

Initializes a new instance of the Scp330 class.

public Scp330(Scp330Bag itemBase)

Parameters

itemBase Scp330Bag

The 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

type CandyKindID

The InventorySystem.Items.Usables.Scp330.CandyKindID to add.

Returns

bool

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.

public int AddCandy(IEnumerable<CandyKindID> candies, out CandyAddStatus status)

Parameters

candies IEnumerable<CandyKindID>

The InventorySystem.Items.Usables.Scp330.CandyKindID's to add.

status CandyAddStatus

The CandyAddStatus's insertion status.

Returns

int

based on number of candy added.

Clone()

Clones current Scp330 object.

public override Item Clone()

Returns

Item

New Scp330 object.

CreatePickup(Vector3, Quaternion?, bool)

Creates the Pickup that based on this Item.

public override Pickup CreatePickup(Vector3 position, Quaternion? rotation = null, bool spawn = true)

Parameters

position Vector3

The UnityEngine.Vector3 location to spawn it.

rotation Quaternion?

The UnityEngine.Quaternion rotation to give the item.

spawn bool

Whether the Scp330Pickup should be initially spawned.

Returns

Pickup

The created Pickup.

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

type CandyKindID

The InventorySystem.Items.Usables.Scp330.CandyKindID of candies to drop.

dropAll bool

Whether to drop all candies matching the given type, or just one.

dropIndividual bool

Whether to drop all candies individually, or as a bag, when dropping more than one candy.

exposedType CandyKindID

The 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

type CandyKindID

The InventorySystem.Items.Usables.Scp330.CandyKindID to be removed.

removeAll bool

Whether 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.