UnpoweredFlashlightComponent.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. using Content.Shared.Decals;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.GameStates;
  4. using Robust.Shared.Prototypes;
  5. namespace Content.Shared.Light.Components;
  6. /// <summary>
  7. /// This is simplified version of <see cref="HandheldLightComponent"/>.
  8. /// It doesn't consume any power and can be toggle only by verb.
  9. /// </summary>
  10. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  11. public sealed partial class UnpoweredFlashlightComponent : Component
  12. {
  13. [DataField("toggleFlashlightSound")]
  14. public SoundSpecifier ToggleSound = new SoundPathSpecifier("/Audio/Items/flashlight_pda.ogg");
  15. [DataField, AutoNetworkedField]
  16. public bool LightOn;
  17. [DataField]
  18. public EntProtoId ToggleAction = "ActionToggleLight";
  19. [DataField, AutoNetworkedField]
  20. public EntityUid? ToggleActionEntity;
  21. /// <summary>
  22. /// <see cref="ColorPalettePrototype"/> ID that determines the list
  23. /// of colors to select from when we get emagged
  24. /// </summary>
  25. [DataField, ViewVariables(VVAccess.ReadWrite)]
  26. public ProtoId<ColorPalettePrototype> EmaggedColorsPrototype = "Emagged";
  27. }