Class GetItemActionsEvent
Event raised directed at items or clothing when they are equipped or held. In order for an item to grant actions some
system can subscribe to this event and add actions to the Actions list.
Inheritance
System.Object
GetItemActionsEvent
Assembly: Content.Shared.dll
Syntax
public sealed class GetItemActionsEvent : EntityEventArgs
Constructors
|
Improve this Doc
View Source
GetItemActionsEvent(ActionContainerSystem, EntityUid, EntityUid, Nullable<SlotFlags>)
Declaration
public GetItemActionsEvent(ActionContainerSystem system, EntityUid user, EntityUid provider, SlotFlags? slotFlags = null)
Parameters
Fields
|
Improve this Doc
View Source
Actions
Declaration
public readonly SortedSet<EntityUid> Actions
Field Value
Type |
Description |
SortedSet<EntityUid> |
|
|
Improve this Doc
View Source
Provider
The entity that is being asked to provide the actions. This is used as a default argument to .
I.e., if a new action needs to be spawned, then it will be inserted into this entity unless otherwise specified.
Declaration
public EntityUid Provider
Field Value
Type |
Description |
EntityUid |
|
|
Improve this Doc
View Source
SlotFlags
Slot flags for the inventory slot that this item got equipped to. Null if not in a slot (i.e., if equipped to hands).
Declaration
public SlotFlags? SlotFlags
Field Value
|
Improve this Doc
View Source
User
Declaration
Field Value
Type |
Description |
EntityUid |
|
Properties
|
Improve this Doc
View Source
InHands
If true, the item was equipped to a users hands.
Declaration
public bool InHands { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
AddAction(EntityUid)
Declaration
public void AddAction(EntityUid actionId)
Parameters
Type |
Name |
Description |
EntityUid |
actionId |
|
|
Improve this Doc
View Source
AddAction(ref Nullable<EntityUid>, String)
Grant the given action. If the EntityUid does not refer to a valid action entity, it will create a new action and
store it in Provider.
Declaration
public void AddAction(ref EntityUid? actionId, string prototypeId)
Parameters
Type |
Name |
Description |
System.Nullable<EntityUid> |
actionId |
|
System.String |
prototypeId |
|
|
Improve this Doc
View Source
AddAction(ref Nullable<EntityUid>, String, EntityUid)
Grant the given action. If the EntityUid does not refer to a valid action entity, it will create a new action and
store it in .
Declaration
public void AddAction(ref EntityUid? actionId, string prototypeId, EntityUid container)
Parameters
Type |
Name |
Description |
System.Nullable<EntityUid> |
actionId |
|
System.String |
prototypeId |
|
EntityUid |
container |
|