Skip to content
7 changes: 7 additions & 0 deletions Content.Client/_DVA/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = false

[*.cs]
dotnet_analyzer_diagnostic.severity = error
dotnet_diagnostic.CA1707.severity = none # Ignore: Remove underscores from namespace name
dotnet_diagnostic.CA1051.severity = none # Ignore: Do not declare invisible instance fields
dotnet_diagnostic.IDE0011.severity = none # Ignore: Add braces
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed partial class DVCrewMonitoringShuttleControl : BaseShuttleControl
public EntityUid? Owner;
public NavMapControl? NavMap;

private List<Entity<MapGridComponent>> _grids = new();
private List<Entity<MapGridComponent>> _grids = [];

public DVCrewMonitoringShuttleControl() : base(64f, 256f, 256f)
{
Expand Down Expand Up @@ -57,7 +57,9 @@ protected override void Draw(DrawingHandleScreen handle)
var mapPos = _transform.ToMapCoordinates(coordinates);
var ourEntRot = Angle.Zero;
var ourEntMatrix = Matrix3Helpers.CreateTransform(_transform.GetWorldPosition(xform), ourEntRot);
Matrix3x2.Invert(ourEntMatrix, out var worldToShuttle);
if (!Matrix3x2.Invert(ourEntMatrix, out var worldToShuttle))
return;

var shuttleToView = Matrix3x2.CreateScale(new Vector2(MinimapScale, -MinimapScale)) * Matrix3x2.CreateTranslation(MidPointVector);
var worldToView = worldToShuttle * shuttleToView;

Expand All @@ -73,7 +75,8 @@ protected override void Draw(DrawingHandleScreen handle)
continue;

var body = bodyQuery.GetComponent(grid);
iffQuery.TryComp(grid, out var iff);
if (iffQuery.TryComp(grid, out var iff))
continue;

if (!_shuttles.CanDraw(grid, body, iff))
continue;
Expand Down Expand Up @@ -138,10 +141,13 @@ protected override void KeyBindUp(GUIBoundKeyEventArgs args)

var ourEntRot = Angle.Zero;
var ourEntMatrix = Matrix3Helpers.CreateTransform(_transform.GetWorldPosition(xform), ourEntRot);
Matrix3x2.Invert(ourEntMatrix, out var worldToShuttle);
if (!Matrix3x2.Invert(ourEntMatrix, out var worldToShuttle))
return;

var shuttleToView = Matrix3x2.CreateScale(new Vector2(MinimapScale, -MinimapScale)) * Matrix3x2.CreateTranslation(MidPointVector);
var worldToView = worldToShuttle * shuttleToView;
Matrix3x2.Invert(worldToView, out var viewToWorld);
if (!Matrix3x2.Invert(worldToView, out var viewToWorld))
return;

if (args.Function == EngineKeyFunctions.UIClick)
{
Expand Down
7 changes: 7 additions & 0 deletions Content.Server/_DVA/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = false

[*.cs]
dotnet_analyzer_diagnostic.severity = error
dotnet_diagnostic.CA1707.severity = none # Ignore: Remove underscores from namespace name
dotnet_diagnostic.CA1051.severity = none # Ignore: Do not declare invisible instance fields
dotnet_diagnostic.IDE0011.severity = none # Ignore: Add braces
2 changes: 1 addition & 1 deletion Content.Server/_DVA/Glimmer/DVGlimmerCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public EntityUid Get(IInvocationContext ctx)

public record struct GlimmerMissingError : IConError
{
public FormattedMessage DescribeInner()
public readonly FormattedMessage DescribeInner()
{
return FormattedMessage.FromMarkupOrThrow("This command doesn't function if there's no glimmer. Is the round started?");
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/_DVA/Glimmer/DVGlimmerSpawningSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public override void Initialize()
private void OnPostGameMapLoad(PostGameMapLoad ev)
{
var ent = Spawn();
AddComp<DVGlimmerComponent>(ent);
_ = AddComp<DVGlimmerComponent>(ent);
_pvsOverride.AddGlobalOverride(ent);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private void OnPacketReceived(Entity<DVCrewMonitorAlertsComponent> ent, ref Devi
.Intersect(ent.Comp.AlertedSensors); // Find "alerted" people that are healthy

if (staleAlerts.Any())
ent.Comp.AlertedSensors.RemoveWhere(alert => staleAlerts.Contains(alert));
_ = ent.Comp.AlertedSensors.RemoveWhere(alert => staleAlerts.Contains(alert));

// alert is still on cooldown, defer checking if we should alert
if (ent.Comp.LastAlert + ent.Comp.AlertCooldown > _timing.CurTime)
Expand All @@ -73,12 +73,12 @@ private void OnPacketReceived(Entity<DVCrewMonitorAlertsComponent> ent, ref Devi
private void Alert(Entity<DVCrewMonitorAlertsComponent> monitor)
{
var audioParams = AudioParams.Default.WithVolume(-2f).WithMaxDistance(4f);
_audio.PlayPvs(monitor.Comp.AlertSound, monitor.Owner, audioParams);
_ = _audio.PlayPvs(monitor.Comp.AlertSound, monitor.Owner, audioParams);
monitor.Comp.LastAlert = _timing.CurTime;
}

private bool IsCriticalOrDead(SuitSensorStatus status)
private static bool IsCriticalOrDead(SuitSensorStatus status)
{
return !status.IsAlive || status.DamagePercentage >= 1f;
}
}
}
8 changes: 8 additions & 0 deletions Content.Shared/_DVA/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = false

[*.cs]
dotnet_analyzer_diagnostic.severity = error
dotnet_diagnostic.CA1707.severity = none # Ignore: Remove underscores from namespace name
dotnet_diagnostic.CA1051.severity = none # Ignore: Do not declare invisible instance fields
dotnet_diagnostic.IDE0011.severity = none # Ignore: Add braces
dotnet_diagnostic.CA1716.severity = none # Ignore: Rename to no longer conflict with Shared (Reserved wording)
1 change: 0 additions & 1 deletion Content.Shared/_DVA/Glimmer/DVGlimmerComponent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Linq;
using Content.Shared._DVA.Utility;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
Expand Down
8 changes: 1 addition & 7 deletions Content.Shared/_DVA/Glimmer/DVGlimmerSystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Linq;
using JetBrains.Annotations;
using Robust.Shared.GameStates;
using Robust.Shared.Network;
using Robust.Shared.Serialization;

namespace Content.Shared._DVA.Glimmer;
Expand All @@ -11,8 +10,6 @@ namespace Content.Shared._DVA.Glimmer;
/// </summary>
public sealed partial class DVGlimmerSystem : EntitySystem
{
[Dependency] private INetManager _net = default!;

/// <summary>
/// The current glimmer of the round.
/// </summary>
Expand All @@ -33,10 +30,7 @@ public int Glimmer
/// The current glimmer tier of the round.
/// </summary>
[PublicAPI]
public GlimmerTier GlimmerTier
{
get => Entity?.Comp.Tier ?? GlimmerTier.Minimal;
}
public GlimmerTier GlimmerTier => Entity?.Comp.Tier ?? GlimmerTier.Minimal;

/// <summary>
/// Returns the current glimmer entity for the round, if any.
Expand Down
Loading