2021-12-27 18:15:16 +11:00
|
|
|
using Content.Server.Light.EntitySystems;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Light.Component;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2018-08-28 08:39:20 -07:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Light.Components
|
2018-08-28 08:39:20 -07:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2020-10-29 20:17:03 +02:00
|
|
|
/// Component that represents a powered handheld light source which can be toggled on and off.
|
2018-08-28 08:39:20 -07:00
|
|
|
/// </summary>
|
2019-07-31 15:02:36 +02:00
|
|
|
[RegisterComponent]
|
2022-06-07 15:26:28 +02:00
|
|
|
[Access(typeof(HandheldLightSystem))]
|
2021-12-27 18:15:16 +11:00
|
|
|
public sealed class HandheldLightComponent : SharedHandheldLightComponent
|
2018-08-28 08:39:20 -07:00
|
|
|
{
|
2022-03-27 01:28:59 -05:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("wattage")] public float Wattage { get; set; } = .8f;
|
2018-08-28 08:39:20 -07:00
|
|
|
|
|
|
|
|
/// <summary>
|
2018-11-21 20:58:11 +01:00
|
|
|
/// Status of light, whether or not it is emitting light.
|
2018-08-28 08:39:20 -07:00
|
|
|
/// </summary>
|
2018-09-09 15:34:43 +02:00
|
|
|
[ViewVariables]
|
2021-12-27 18:15:16 +11:00
|
|
|
public bool Activated { get; set; }
|
2018-08-28 08:39:20 -07:00
|
|
|
|
2021-09-09 18:31:54 -07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("turnOnSound")] public SoundSpecifier TurnOnSound = new SoundPathSpecifier("/Audio/Items/flashlight_on.ogg");
|
2021-07-10 17:35:33 +02:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("turnOnFailSound")] public SoundSpecifier TurnOnFailSound = new SoundPathSpecifier("/Audio/Machines/button.ogg");
|
2021-09-20 11:53:34 -07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("turnOffSound")] public SoundSpecifier TurnOffSound = new SoundPathSpecifier("/Audio/Items/flashlight_off.ogg");
|
2018-11-21 20:58:11 +01:00
|
|
|
|
2020-11-01 07:56:46 +11:00
|
|
|
/// <summary>
|
|
|
|
|
/// Client-side ItemStatus level
|
|
|
|
|
/// </summary>
|
2021-12-27 18:15:16 +11:00
|
|
|
public byte? LastLevel;
|
2018-08-28 08:39:20 -07:00
|
|
|
}
|
|
|
|
|
}
|