Class ActionOnInteractComponent
This component enables an entity to perform actions when used to interact with the world, without actually granting that action to the entity that is using the item.
Inheritance
Namespace: Content.Server.Actions
Assembly: Content.Server.dll
Syntax
public sealed class ActionOnInteractComponent : Component
Remarks
If the entity is used in hand (ActivateInWorldEvent), it will perform a random available instant action. If the entity is used to interact with another entity (InteractUsingEvent), it will attempt to perform a random entity target action. Finally, if the entity is used to click somewhere in the world and no other interaction takes place (AfterInteractEvent), then it will try to perform a random available entity or world target action. This component does not bypass standard interaction checks.
This component mainly exists as a lazy way to add utility entities that can do things like cast "spells".
Fields
| Improve this Doc View SourceActionEntities
Declaration
public List<EntityUid>? ActionEntities
Field Value
Type | Description |
---|---|
System.Nullable<List<EntityUid>> |
Actions
Declaration
public List<EntProtoId>? Actions
Field Value
Type | Description |
---|---|
System.Nullable<List<Robust.Shared.Prototypes.EntProtoId>> |