Show / Hide Table of Contents

Class BaseActionComponent

Inheritance
System.Object
BaseActionComponent
BaseTargetActionComponent
InstantActionComponent
Namespace: Content.Shared.Actions
Assembly: Content.Shared.dll
Syntax
public abstract class BaseActionComponent : Component

Fields

| Improve this Doc View Source

AttachedEntity

What entity, if any, currently has this action in the actions component?

Declaration
public EntityUid? AttachedEntity
Field Value
Type Description
System.Nullable<EntityUid>
| Improve this Doc View Source

AutoPopulate

Whether or not to automatically add this action to the action bar when it becomes available.

Declaration
public bool AutoPopulate
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

Charges

Convenience tool for actions with limited number of charges. Automatically decremented on use, and the action is disabled when it reaches zero. Does NOT automatically remove the action from the action bar.

Declaration
public int? Charges
Field Value
Type Description
System.Nullable<System.Int32>
| Improve this Doc View Source

CheckCanInteract

Whether the action system should block this action if the user cannot currently interact. Some spells or abilities may want to disable this and implement their own checks.

Declaration
public bool CheckCanInteract
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

ClientExclusive

If true, this will cause the action to only execute locally without ever notifying the server.

Declaration
public bool ClientExclusive
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

Container

The entity that contains this action. If the action is innate, this may be the user themselves. This should almost always be non-null.

Declaration
public EntityUid? Container
Field Value
Type Description
System.Nullable<EntityUid>
| Improve this Doc View Source

Cooldown

The current cooldown on the action.

Declaration
public (TimeSpan Start, TimeSpan End)? Cooldown
Field Value
Type Description
System.Nullable<System.ValueTuple<TimeSpan, TimeSpan>>
| Improve this Doc View Source

Enabled

Whether this action is currently enabled. If not enabled, this action cannot be performed.

Declaration
public bool Enabled
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

EntIcon

Declaration
public EntityUid? EntIcon
Field Value
Type Description
System.Nullable<EntityUid>
| Improve this Doc View Source

Icon

Icon representing this action in the UI.

Declaration
public SpriteSpecifier Icon
Field Value
Type Description
Robust.Shared.Utility.SpriteSpecifier
| Improve this Doc View Source

IconColor

If not null, this color will modulate the action icon color.

Declaration
public Color IconColor
Field Value
Type Description
Color
Remarks

This currently only exists for decal-placement actions, so that the action icons correspond to the color of the decal. But this is probably useful for other actions, including maybe changing color on toggle.

| Improve this Doc View Source

IconOn

For toggle actions only, icon to show when toggled on. If omitted, the action will simply be highlighted when turned on.

Declaration
public SpriteSpecifier IconOn
Field Value
Type Description
Robust.Shared.Utility.SpriteSpecifier
| Improve this Doc View Source

ItemIconStyle

Determines the appearance of the entity-icon for actions that are enabled via some entity.

Declaration
public ItemActionIconStyle ItemIconStyle
Field Value
Type Description
ItemActionIconStyle
| Improve this Doc View Source

Keywords

Keywords that can be used to search for this action in the action menu.

Declaration
public HashSet<string> Keywords
Field Value
Type Description
HashSet<System.String>
| Improve this Doc View Source

Priority

Determines the order in which actions are automatically added the action bar.

Declaration
public int Priority
Field Value
Type Description
System.Int32
| Improve this Doc View Source

Sound

If not null, this sound will be played when performing this action.

Declaration
public SoundSpecifier Sound
Field Value
Type Description
Robust.Shared.Audio.SoundSpecifier
| Improve this Doc View Source

Temporary

Temporary actions are deleted when they get removed a ActionsComponent.

Declaration
public bool Temporary
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

Toggled

The toggle state of this action. Toggling switches the currently displayed icon, see Icon and IconOn.

Declaration
public bool Toggled
Field Value
Type Description
System.Boolean
Remarks

The toggle can set directly via SetToggled(Nullable<EntityUid>, Boolean), but it will also be automatically toggled for targeted-actions while selecting a target.

| Improve this Doc View Source

UseDelay

Time interval between action uses.

Declaration
public TimeSpan? UseDelay
Field Value
Type Description
System.Nullable<TimeSpan>

Properties

| Improve this Doc View Source

BaseEvent

Declaration
public abstract BaseActionEvent BaseEvent { get; }
Property Value
Type Description
BaseActionEvent
| Improve this Doc View Source

EntityIcon

Entity to use for the action icon. If no entity is provided and the Container differs from AttachedEntity, then it will default to using Container

Declaration
public EntityUid? EntityIcon { get; set; }
Property Value
Type Description
System.Nullable<EntityUid>
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾