Mind Action Container (#21336)

This commit is contained in:
keronshb
2023-11-03 19:55:32 -04:00
committed by GitHub
parent d218fa3d2c
commit 3a788dd8d4
5 changed files with 42 additions and 4 deletions

View File

@@ -120,6 +120,12 @@ public abstract partial class BaseActionComponent : Component
/// </summary>
[ViewVariables] public EntityUid? AttachedEntity;
/// <summary>
/// If true, this will cause the the action event to always be raised directed at the action performer/user instead of the action's container/provider.
/// </summary>
[DataField]
public bool RaiseOnUser;
/// <summary>
/// Whether or not to automatically add this action to the action bar when it becomes available.
/// </summary>
@@ -159,6 +165,7 @@ public abstract class BaseActionComponentState : ComponentState
public bool ClientExclusive;
public int Priority;
public NetEntity? AttachedEntity;
public bool RaiseOnUser;
public bool AutoPopulate;
public bool Temporary;
public ItemActionIconStyle ItemIconStyle;
@@ -169,6 +176,7 @@ public abstract class BaseActionComponentState : ComponentState
Container = entManager.GetNetEntity(component.Container);
EntityIcon = entManager.GetNetEntity(component.EntIcon);
AttachedEntity = entManager.GetNetEntity(component.AttachedEntity);
RaiseOnUser = component.RaiseOnUser;
Icon = component.Icon;
IconOn = component.IconOn;
IconColor = component.IconColor;