mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-02-15 03:31:38 +01:00
59 lines
1.5 KiB
C#
59 lines
1.5 KiB
C#
using Robust.Shared.Audio;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared._White.Overlays;
|
|
|
|
public abstract partial class SwitchableVisionOverlayComponent : BaseVisionOverlayComponent
|
|
{
|
|
[DataField]
|
|
public bool IsActive;
|
|
|
|
[DataField]
|
|
public bool DrawOverlay = true;
|
|
|
|
[DataField]
|
|
public float OverlayOpacity = 0.5f;
|
|
|
|
/// <summary>
|
|
/// Whether it should grant equipment enhanced vision or is it mob vision
|
|
/// </summary>
|
|
[DataField]
|
|
public bool IsEquipment;
|
|
|
|
/// <summary>
|
|
/// If it is greater than 0, overlay isn't toggled but pulsed instead
|
|
/// </summary>
|
|
[DataField]
|
|
public float PulseTime;
|
|
|
|
[ViewVariables(VVAccess.ReadOnly)]
|
|
public float PulseAccumulator;
|
|
|
|
[DataField]
|
|
public SoundSpecifier? ActivateSound = new SoundPathSpecifier("/Audio/_White/Items/Goggles/activate.ogg");
|
|
|
|
[DataField]
|
|
public SoundSpecifier? DeactivateSound = new SoundPathSpecifier("/Audio/_White/Items/Goggles/deactivate.ogg");
|
|
|
|
[DataField]
|
|
public virtual EntProtoId? ToggleAction { get; set; }
|
|
|
|
[ViewVariables]
|
|
public EntityUid? ToggleActionEntity;
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class SwitchableVisionOverlayComponentState : IComponentState
|
|
{
|
|
public Color Color;
|
|
public bool IsEquipment;
|
|
public bool IsActive;
|
|
public SoundSpecifier? ActivateSound;
|
|
public SoundSpecifier? DeactivateSound;
|
|
public EntProtoId? ToggleAction;
|
|
public float LightRadius;
|
|
public bool DrawOverlay;
|
|
public float OverlayOpacity;
|
|
}
|