Термалки (#466)
* - add: Rewrite night vision. * - add: Thermals. * - remove: Remove stuff from maps. * - fix: Descriptions.
This commit is contained in:
19
Content.Shared/_White/Overlays/BaseNvOverlayComponent.cs
Normal file
19
Content.Shared/_White/Overlays/BaseNvOverlayComponent.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared._White.Overlays;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public abstract partial class BaseNvOverlayComponent : Component
|
||||
{
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public virtual Vector3 Tint { get; set; } = new(0.3f, 0.3f, 0.3f);
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public virtual float Strength { get; set; } = 2f;
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public virtual float Noise { get; set; } = 0.5f;
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public virtual Color Color { get; set; } = Color.FromHex("#98FB98");
|
||||
}
|
||||
@@ -6,19 +6,10 @@ using Robust.Shared.Prototypes;
|
||||
namespace Content.Shared._White.Overlays;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class NightVisionComponent : Component
|
||||
public sealed partial class NightVisionComponent : BaseNvOverlayComponent
|
||||
{
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public Vector3 Tint = new(0.3f, 0.3f, 0.3f);
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public float Strength = 2f;
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public float Noise = 0.5f;
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public Color Color = Color.FromHex("#98FB98");
|
||||
public override Color Color { get; set; } = Color.FromHex("#98FB98");
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public bool IsActive = true;
|
||||
|
||||
@@ -3,17 +3,8 @@ using Robust.Shared.GameStates;
|
||||
namespace Content.Shared._White.Overlays;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class TemporaryNightVisionComponent : Component
|
||||
public sealed partial class TemporaryNightVisionComponent : BaseNvOverlayComponent
|
||||
{
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public Vector3 Tint = new(0.3f, 0.3f, 0.3f);
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public float Strength = 2f;
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public float Noise = 0.5f;
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public Color Color = Color.FromHex("#FB9898");
|
||||
public override Color Color { get; set; } = Color.FromHex("#FB9898");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared._White.Overlays;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class TemporaryThermalVisionComponent : BaseNvOverlayComponent
|
||||
{
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public override Color Color { get; set; } = Color.FromHex("#FB9898");
|
||||
}
|
||||
29
Content.Shared/_White/Overlays/ThermalVisionComponent.cs
Normal file
29
Content.Shared/_White/Overlays/ThermalVisionComponent.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Content.Shared.Actions;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared._White.Overlays;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class ThermalVisionComponent : BaseNvOverlayComponent
|
||||
{
|
||||
[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? ToggleSound = new SoundPathSpecifier("/Audio/Items/flashlight_pda.ogg");
|
||||
|
||||
[DataField]
|
||||
public EntProtoId? ToggleAction = "ToggleThermalVision";
|
||||
|
||||
[ViewVariables]
|
||||
public EntityUid? ToggleActionEntity;
|
||||
}
|
||||
|
||||
public sealed partial class ToggleThermalVisionEvent : InstantActionEvent
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user