Files
wwdpublic/Content.Shared/Overlays/Switchable/SwitchableOverlayComponent.cs
Remuchi 4c8c415eed [Fix] Парад фиксов (#1110)
* fix: thermals and night vision now work

* fix: it has to be this way

Signed-off-by: Remuchi <RemuchiOfficial@gmail.com>

* fix: I hate the way they are separated

* fix: now cult actions close examine menu (#1046)

Signed-off-by: Remuchi <RemuchiOfficial@gmail.com>

* fix: railins and some other things now dont snap to south upon being built (#1029)

* fix: who did this translation wtf

* fix: assball bat can now wideswing (#1030)

Signed-off-by: Remuchi <RemuchiOfficial@gmail.com>

* fix: spend flares are actually spent now (#959)

Signed-off-by: Remuchi <RemuchiOfficial@gmail.com>

* fix: made part exchange system a bit less shitty

I really have no time or interest in it to rewrite it completely rn

Signed-off-by: Remuchi <RemuchiOfficial@gmail.com>

* fix: fixed cult factories timers being broken

Also fixed them being openable by anyone.

Signed-off-by: Remuchi <RemuchiOfficial@gmail.com>

* Apply suggestions from code review

Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
Co-authored-by: RedFoxIV <38788538+RedFoxIV@users.noreply.github.com>

---------

Signed-off-by: Remuchi <RemuchiOfficial@gmail.com>
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
Co-authored-by: RedFoxIV <38788538+RedFoxIV@users.noreply.github.com>
2026-04-16 10:53:08 +03:00

58 lines
1.6 KiB
C#

using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared.Overlays.Switchable;
public abstract partial class SwitchableOverlayComponent : BaseOverlayComponent
{
[DataField]
public virtual bool IsActive { get; set; }
[DataField]
public virtual bool DrawOverlay { get; set; } = true;
/// <summary>
/// Whether it should grant equipment enhanced vision or is it mob vision
/// </summary>
[DataField]
public virtual bool IsEquipment { get; set; }
/// <summary>
/// If it is greater than 0, overlay isn't toggled but pulsed instead
/// </summary>
[DataField]
public virtual float PulseTime { get; set; }
[ViewVariables(VVAccess.ReadOnly)]
public float PulseAccumulator;
[DataField]
public virtual float FlashDurationMultiplier { get; set; } = 1f; // ! goober
[DataField]
public virtual SoundSpecifier? ActivateSound { get; set; } =
new SoundPathSpecifier("/Audio/Items/Goggles/activate.ogg");
[DataField]
public virtual SoundSpecifier? DeactivateSound { get; set; } =
new SoundPathSpecifier("/Audio/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 IsActive;
public SoundSpecifier? ActivateSound;
public SoundSpecifier? DeactivateSound;
public EntProtoId? ToggleAction;
public float LightRadius;
}