Class ItemSlot
This is effectively a wrapper for a ContainerSlot that adds content functionality like entity whitelists and
insert/eject sounds.
Inheritance
System.Object
ItemSlot
Assembly: Content.Shared.dll
Syntax
public sealed class ItemSlot : object
Constructors
|
Improve this Doc
View Source
ItemSlot()
Declaration
|
Improve this Doc
View Source
ItemSlot(ItemSlot)
Declaration
public ItemSlot(ItemSlot other)
Parameters
Fields
|
Improve this Doc
View Source
ContainerSlot
Declaration
public ContainerSlot ContainerSlot
Field Value
Type |
Description |
Robust.Shared.Containers.ContainerSlot |
|
|
Improve this Doc
View Source
DisableEject
Prevents adding the eject alt-verb, but still lets you swap items.
Declaration
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
EjectOnBreak
If this slot belongs to some breakable or destructible entity, should the item inside the slot be
ejected when it is broken or destroyed?
Declaration
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
EjectOnDeconstruct
If this slot belongs to some de-constructible component, should the item inside the slot be ejected upon
deconstruction?
Declaration
public bool EjectOnDeconstruct
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
EjectOnInteract
Whether the item slots system will attempt to eject this item to the user's hands when interacted with.
Declaration
public bool EjectOnInteract
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
EjectOnUse
If true, and if this slot is attached to an item, then it will attempt to eject slot when to the slot is
used in the user's hands.
Declaration
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
EjectSound
Declaration
public SoundSpecifier EjectSound
Field Value
Type |
Description |
Robust.Shared.Audio.SoundSpecifier |
|
|
Improve this Doc
View Source
EjectVerbText
Override the eject verb text. Defaults to using the slot's name (if specified) or the name of the
targeted item. If specified, the verb will not be added to the default eject verb category
Declaration
public string? EjectVerbText
Field Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
InsertOnInteract
Whether the item slots system will attempt to insert item from the user's hands into this slot when interacted with.
It doesn't block other insertion methods, like verbs.
Declaration
public bool InsertOnInteract
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
InsertSound
Declaration
public SoundSpecifier InsertSound
Field Value
Type |
Description |
Robust.Shared.Audio.SoundSpecifier |
|
|
Improve this Doc
View Source
InsertVerbText
Override the insert verb text. Defaults to using the slot's name (if specified) or the name of the
targeted item. If specified, the verb will not be added to the default insert verb category.
Declaration
public string? InsertVerbText
Field Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
Local
If false, errors when adding an item slot with a duplicate key are suppressed. Local==true implies that
the slot was added via client component state handling.
Declaration
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Locked
Whether or not an item can currently be ejected or inserted from this slot.
Declaration
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Name
The name of this item slot. This will be shown to the user in the verb menu.
Declaration
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Priority
Declaration
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
StartingItem
The entity prototype that is spawned into this slot on map init.
Declaration
public string? StartingItem
Field Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
Swap
If the user interacts with an entity with an already-filled item slot, should they attempt to swap out the item?
Declaration
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Whitelist
Declaration
public EntityWhitelist Whitelist
Field Value
|
Improve this Doc
View Source
If this is not an empty string, this will generate a popup when someone attempts to insert a bad item
into this slot. This string will be passed through localization.
Declaration
public string WhitelistFailPopup
Field Value
Type |
Description |
System.String |
|
Properties
|
Improve this Doc
View Source
HasItem
Declaration
public bool HasItem { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ID
Declaration
public string? ID { get; }
Property Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
Item
Declaration
public EntityUid? Item { get; }
Property Value
Type |
Description |
System.Nullable<EntityUid> |
|
Methods
|
Improve this Doc
View Source
CopyFrom(ItemSlot)
Declaration
public void CopyFrom(ItemSlot other)
Parameters