Show / Hide Table of Contents

Class ActionContainerSystem

Inheritance
System.Object
ActionContainerSystem
Namespace: Content.Shared.Actions
Assembly: Content.Shared.dll
Syntax
public sealed class ActionContainerSystem : EntitySystem

Methods

| Improve this Doc View Source

AddAction(EntityUid, EntityUid, BaseActionComponent, ActionsContainerComponent)

Adds a pre-existing action to an action container.

Declaration
public bool AddAction(EntityUid uid, EntityUid actionId, BaseActionComponent action = null, ActionsContainerComponent comp = null)
Parameters
Type Name Description
EntityUid uid
EntityUid actionId
BaseActionComponent action
ActionsContainerComponent comp
Returns
Type Description
System.Boolean
| Improve this Doc View Source

AddAction(EntityUid, String, ActionsContainerComponent)

Spawns a new action entity and adds it to the given container.

Declaration
public EntityUid? AddAction(EntityUid uid, string actionPrototypeId, ActionsContainerComponent comp = null)
Parameters
Type Name Description
EntityUid uid
System.String actionPrototypeId
ActionsContainerComponent comp
Returns
Type Description
System.Nullable<EntityUid>
| Improve this Doc View Source

EnsureAction(EntityUid, ref Nullable<EntityUid>, out BaseActionComponent, Nullable<String>, ActionsContainerComponent)

Declaration
public bool EnsureAction(EntityUid uid, ref EntityUid? actionId, out BaseActionComponent action, string? actionPrototypeId, ActionsContainerComponent comp = null)
Parameters
Type Name Description
EntityUid uid
System.Nullable<EntityUid> actionId
BaseActionComponent action
System.Nullable<System.String> actionPrototypeId
ActionsContainerComponent comp
Returns
Type Description
System.Boolean
| Improve this Doc View Source

EnsureAction(EntityUid, ref Nullable<EntityUid>, String, ActionsContainerComponent)

Ensures that a given entityUid refers to a valid entity action contained by the given container. If the entity does not exist, it will attempt to spawn a new action. Returns false if the given entity exists, but is not in a valid state.

Declaration
public bool EnsureAction(EntityUid uid, ref EntityUid? actionId, string actionPrototypeId, ActionsContainerComponent comp = null)
Parameters
Type Name Description
EntityUid uid
System.Nullable<EntityUid> actionId
System.String actionPrototypeId
ActionsContainerComponent comp
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Initialize()

Declaration
public override void Initialize()
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾