mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 05:59:03 +03:00
# Description
Last changes to CyberEyes broke nightvision, so this reverts those
changes.
# Changelog
🆑
- fix: Fixed night vision not working correctly.
(cherry picked from commit 3d24fed5daddef4d8cca8a17aa2572f54127668b)
56 lines
1.5 KiB
C#
56 lines
1.5 KiB
C#
using System.Dynamic;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Overlays.Switchable;
|
|
|
|
public abstract partial class SwitchableOverlayComponent : BaseOverlayComponent
|
|
{
|
|
[DataField, AutoNetworkedField]
|
|
public bool IsActive;
|
|
|
|
[DataField]
|
|
public bool DrawOverlay = true;
|
|
|
|
/// <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 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 string? 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;
|
|
}
|