Refactor actions to be entities with components (#19900)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Content.Shared.Decals;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Shared.Light.Components;
|
||||
|
||||
@@ -16,8 +17,10 @@ public sealed partial class UnpoweredFlashlightComponent : Component
|
||||
|
||||
[ViewVariables] public bool LightOn = false;
|
||||
|
||||
[DataField("toggleAction", required: true)]
|
||||
public InstantAction ToggleAction = new();
|
||||
[DataField("toggleAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? ToggleAction = "ActionToggleLight";
|
||||
|
||||
[DataField("toggleActionEntity")] public EntityUid? ToggleActionEntity;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="ColorPalettePrototype"/> ID that determines the list
|
||||
|
||||
Reference in New Issue
Block a user