- add: Enhanced vision refactor. (#471)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared._White.Overlays;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public abstract partial class BaseEnhancedVisionComponent : BaseNvOverlayComponent
|
||||
{
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public bool IsActive = true;
|
||||
|
||||
[DataField]
|
||||
public virtual SoundSpecifier? ActivateSound { get; set; }= new SoundPathSpecifier("/Audio/White/Items/Goggles/activate.ogg");
|
||||
|
||||
[DataField]
|
||||
public virtual SoundSpecifier? DeactivateSound { get; set; } = new SoundPathSpecifier("/Audio/White/Items/Goggles/deactivate.ogg");
|
||||
|
||||
[DataField]
|
||||
public virtual EntProtoId? ToggleAction { get; set; }
|
||||
|
||||
[ViewVariables]
|
||||
public EntityUid? ToggleActionEntity;
|
||||
}
|
||||
@@ -6,25 +6,13 @@ using Robust.Shared.Prototypes;
|
||||
namespace Content.Shared._White.Overlays;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class NightVisionComponent : BaseNvOverlayComponent
|
||||
public sealed partial class NightVisionComponent : BaseEnhancedVisionComponent
|
||||
{
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public override Color Color { get; set; } = Color.FromHex("#98FB98");
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public bool IsActive = true;
|
||||
|
||||
[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 EntProtoId? ToggleAction = "ToggleNightVision";
|
||||
|
||||
[ViewVariables]
|
||||
public EntityUid? ToggleActionEntity;
|
||||
public override EntProtoId? ToggleAction { get; set; } = "ToggleNightVision";
|
||||
}
|
||||
|
||||
public sealed partial class ToggleNightVisionEvent : InstantActionEvent
|
||||
|
||||
@@ -6,25 +6,13 @@ using Robust.Shared.Prototypes;
|
||||
namespace Content.Shared._White.Overlays;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class ThermalVisionComponent : BaseNvOverlayComponent
|
||||
public sealed partial class ThermalVisionComponent : BaseEnhancedVisionComponent
|
||||
{
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public override Color Color { get; set; } = Color.FromHex("#F84742");
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public bool IsActive = true;
|
||||
|
||||
[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 EntProtoId? ToggleAction = "ToggleThermalVision";
|
||||
|
||||
[ViewVariables]
|
||||
public EntityUid? ToggleActionEntity;
|
||||
public override EntProtoId? ToggleAction { get; set; } = "ToggleThermalVision";
|
||||
}
|
||||
|
||||
public sealed partial class ToggleThermalVisionEvent : InstantActionEvent
|
||||
|
||||
Reference in New Issue
Block a user