Термалки (#466)

* - add: Rewrite night vision.

* - add: Thermals.

* - remove: Remove stuff from maps.

* - fix: Descriptions.
This commit is contained in:
Aviu00
2024-07-19 16:27:01 +00:00
committed by GitHub
parent 42b4aa4cef
commit 781e266fc2
36 changed files with 514 additions and 138 deletions

View 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");
}

View File

@@ -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;

View File

@@ -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");
}

View File

@@ -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");
}

View 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
{
}