light refactoring/rework (#19314)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-09-04 06:31:10 +01:00
committed by GitHub
parent 4e51fd4fff
commit 91cfabd6f6
44 changed files with 581 additions and 584 deletions

View File

@@ -0,0 +1,29 @@
using Content.Shared.Actions.ActionTypes;
using Content.Shared.Decals;
using Robust.Shared.Audio;
namespace Content.Shared.Light.Components;
/// <summary>
/// This is simplified version of <see cref="HandheldLightComponent"/>.
/// It doesn't consume any power and can be toggle only by verb.
/// </summary>
[RegisterComponent]
public sealed partial class UnpoweredFlashlightComponent : Component
{
[DataField("toggleFlashlightSound")]
public SoundSpecifier ToggleSound = new SoundPathSpecifier("/Audio/Items/flashlight_pda.ogg");
[ViewVariables] public bool LightOn = false;
[DataField("toggleAction", required: true)]
public InstantAction ToggleAction = new();
/// <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";
}