Refactor actions to be entities with components (#19900)

This commit is contained in:
DrSmugleaf
2023-09-08 18:16:05 -07:00
committed by GitHub
parent e18f731b91
commit c71f97e3a2
210 changed files with 10693 additions and 11714 deletions

View File

@@ -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;