Class GetVerbsEvent<TVerb>
Directed event that requests verbs from any systems/components on a target entity.
Inheritance
Namespace: Content.Shared.Verbs
Assembly: Content.Shared.dll
Syntax
public sealed class GetVerbsEvent<TVerb> : EntityEventArgs where TVerb : Verb
Type Parameters
Name | Description |
---|---|
TVerb |
Constructors
| Improve this Doc View SourceGetVerbsEvent(EntityUid, EntityUid, Nullable<EntityUid>, HandsComponent, Boolean, Boolean)
Declaration
public GetVerbsEvent(EntityUid user, EntityUid target, EntityUid? using, HandsComponent hands, bool canInteract, bool canAccess)
Parameters
Type | Name | Description |
---|---|---|
EntityUid | user | |
EntityUid | target | |
System.Nullable<EntityUid> | using | |
HandsComponent | hands | |
System.Boolean | canInteract | |
System.Boolean | canAccess |
Fields
| Improve this Doc View SourceCanAccess
Can the user physically access the target?
Declaration
public readonly bool CanAccess
Field Value
Type | Description |
---|---|
System.Boolean |
Remarks
This is a combination of
CanInteract
Can the user physically interact?
Declaration
public readonly bool CanInteract
Field Value
Type | Description |
---|---|
System.Boolean |
Remarks
This is a just a cached CanInteract(EntityUid, Nullable<EntityUid>) result. Given that many verbs need to check this, it prevents it from having to be repeatedly called by each individual system that might contribute a verb.
Hands
The User's hand component.
Declaration
public readonly HandsComponent Hands
Field Value
Type | Description |
---|---|
HandsComponent |
Remarks
This may be null if the user has no hands.
Target
The entity being targeted for the verb.
Declaration
public readonly EntityUid Target
Field Value
Type | Description |
---|---|
EntityUid |
User
The entity that will be "performing" the verb.
Declaration
public readonly EntityUid User
Field Value
Type | Description |
---|---|
EntityUid |
Using
The entity currently being held by the active hand.
Declaration
public readonly EntityUid? Using
Field Value
Type | Description |
---|---|
System.Nullable<EntityUid> |
Remarks
This is only ever not null when CanUseHeldEntity(EntityUid) is true and the user has hands.
Verbs
Event output. Set of verbs that can be executed.
Declaration
public readonly SortedSet<TVerb> Verbs
Field Value
Type | Description |
---|---|
SortedSet<TVerb> |