Refactor actions to be entities with components (#19900)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.Clothing.Components
|
||||
{
|
||||
@@ -7,14 +7,15 @@ namespace Content.Server.Clothing.Components
|
||||
[RegisterComponent]
|
||||
public sealed partial class MaskComponent : Component
|
||||
{
|
||||
[DataField("toggleAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string ToggleAction = "ActionToggleMask";
|
||||
|
||||
/// <summary>
|
||||
/// This mask can be toggled (pulled up/down)
|
||||
/// </summary>
|
||||
[DataField("toggleAction")]
|
||||
public InstantAction? ToggleAction = null;
|
||||
[DataField("toggleActionEntity")]
|
||||
public EntityUid? ToggleActionEntity;
|
||||
|
||||
public bool IsToggled = false;
|
||||
}
|
||||
|
||||
public sealed partial class ToggleMaskEvent : InstantActionEvent { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user