Action container rejig (#20260)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Leon Friedrich
2023-09-23 04:49:39 -04:00
committed by GitHub
parent c80c90ed65
commit 684b334806
50 changed files with 889 additions and 740 deletions

View File

@@ -1,5 +1,6 @@
using Content.Shared.Decals;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -9,24 +10,25 @@ namespace Content.Shared.Light.Components;
/// This is simplified version of <see cref="HandheldLightComponent"/>.
/// It doesn't consume any power and can be toggle only by verb.
/// </summary>
[RegisterComponent]
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class UnpoweredFlashlightComponent : Component
{
[DataField("toggleFlashlightSound")]
public SoundSpecifier ToggleSound = new SoundPathSpecifier("/Audio/Items/flashlight_pda.ogg");
[ViewVariables] public bool LightOn = false;
[DataField, AutoNetworkedField]
public bool LightOn = false;
[DataField("toggleAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? ToggleAction = "ActionToggleLight";
[DataField]
public EntProtoId ToggleAction = "ActionToggleLight";
[DataField("toggleActionEntity")] public EntityUid? ToggleActionEntity;
[DataField, AutoNetworkedField]
public EntityUid? ToggleActionEntity;
/// <summary>
/// <see cref="ColorPalettePrototype"/> ID that determines the list
/// of colors to select from when we get emagged
/// </summary>
[DataField("emaggedColorsPrototype")]
[ViewVariables(VVAccess.ReadWrite)]
public string EmaggedColorsPrototype = "Emagged";
[DataField, ViewVariables(VVAccess.ReadWrite)]
public ProtoId<ColorPalettePrototype> EmaggedColorsPrototype = "Emagged";
}