Use 'new' expression in places where the type is evident for content (#2590)
* Content.Client * Content.Benchmarks * Content.IntegrationTests * Content.Server * Content.Server.Database * Content.Shared * Content.Tests * Merge fixes Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -47,7 +47,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
/// A list of tags attached to the content, used for sorting
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public HashSet<string> Tags { get; set; } = new HashSet<string>();
|
||||
public HashSet<string> Tags { get; set; } = new();
|
||||
|
||||
private bool CanInsert(IEntity entity)
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
[ViewVariables]
|
||||
private TimeSpan _lastExitAttempt;
|
||||
|
||||
public static readonly Regex TagRegex = new Regex("^[a-zA-Z0-9, ]*$", RegexOptions.Compiled);
|
||||
public static readonly Regex TagRegex = new("^[a-zA-Z0-9, ]*$", RegexOptions.Compiled);
|
||||
|
||||
/// <summary>
|
||||
/// The current pressure of this disposal unit.
|
||||
@@ -101,7 +101,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
[ViewVariables] public IReadOnlyList<IEntity> ContainedEntities => _container.ContainedEntities;
|
||||
|
||||
[ViewVariables]
|
||||
private readonly List<string> _targetList = new List<string>();
|
||||
private readonly List<string> _targetList = new();
|
||||
|
||||
[ViewVariables]
|
||||
private string _target = "";
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
public override string Name => "DisposalRouter";
|
||||
|
||||
[ViewVariables]
|
||||
private readonly HashSet<string> _tags = new HashSet<string>();
|
||||
private readonly HashSet<string> _tags = new();
|
||||
|
||||
[ViewVariables]
|
||||
public bool Anchored =>
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
/// <returns>Returns a <see cref="DisposalTaggerUserInterfaceState"/></returns>
|
||||
private DisposalTaggerUserInterfaceState GetUserInterfaceState()
|
||||
{
|
||||
return new DisposalTaggerUserInterfaceState(_tag);
|
||||
return new(_tag);
|
||||
}
|
||||
|
||||
private void UpdateUserInterface()
|
||||
|
||||
Reference in New Issue
Block a user