Refactor actions to be entities with components (#19900)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
@@ -35,8 +35,8 @@ public sealed partial class HandheldLightComponent : Component
|
||||
[DataField("addPrefix")]
|
||||
public bool AddPrefix = false;
|
||||
|
||||
[DataField("toggleActionId", customTypeSerializer: typeof(PrototypeIdSerializer<InstantActionPrototype>))]
|
||||
public string ToggleActionId = "ToggleLight";
|
||||
[DataField("toggleAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string ToggleAction = "ActionToggleLight";
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not the light can be toggled via standard interactions
|
||||
@@ -45,8 +45,8 @@ public sealed partial class HandheldLightComponent : Component
|
||||
[DataField("toggleOnInteract")]
|
||||
public bool ToggleOnInteract = true;
|
||||
|
||||
[DataField("toggleAction")]
|
||||
public InstantAction? ToggleAction;
|
||||
[DataField("toggleActionEntity")]
|
||||
public EntityUid? ToggleActionEntity;
|
||||
|
||||
public const int StatusLevels = 6;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user