Refactor actions to be entities with components (#19900)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Content.Shared.Clothing.EntitySystems;
|
||||
using Content.Shared.Inventory;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -20,9 +19,11 @@ public sealed partial class ToggleableClothingComponent : Component
|
||||
/// <summary>
|
||||
/// Action used to toggle the clothing on or off.
|
||||
/// </summary>
|
||||
[DataField("actionId", customTypeSerializer: typeof(PrototypeIdSerializer<InstantActionPrototype>))]
|
||||
public string ActionId = "ToggleSuitPiece";
|
||||
public InstantAction? ToggleAction = null;
|
||||
[DataField("action", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string Action = "ActionToggleSuitPiece";
|
||||
|
||||
[DataField("actionEntity")]
|
||||
public EntityUid? ActionEntity;
|
||||
|
||||
/// <summary>
|
||||
/// Default clothing entity prototype to spawn into the clothing container.
|
||||
@@ -66,7 +67,7 @@ public sealed partial class ToggleableClothingComponent : Component
|
||||
public TimeSpan? StripDelay = TimeSpan.FromSeconds(3);
|
||||
|
||||
/// <summary>
|
||||
/// Text shown in the toggle-clothing verb. Defaults to using the name of the <see cref="ToggleAction"/> action.
|
||||
/// Text shown in the toggle-clothing verb. Defaults to using the name of the <see cref="ActionEntity"/> action.
|
||||
/// </summary>
|
||||
[DataField("verbText")]
|
||||
public string? VerbText;
|
||||
|
||||
Reference in New Issue
Block a user