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:
@@ -15,7 +15,7 @@ namespace Content.Shared.Construction
|
||||
[Serializable]
|
||||
public class ConstructionGraphEdge : IExposeData
|
||||
{
|
||||
private List<ConstructionGraphStep> _steps = new List<ConstructionGraphStep>();
|
||||
private List<ConstructionGraphStep> _steps = new();
|
||||
private List<IEdgeCondition> _conditions;
|
||||
private List<IGraphAction> _completed;
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Content.Shared.Construction
|
||||
[Serializable]
|
||||
public class ConstructionGraphNode
|
||||
{
|
||||
private List<IGraphAction> _actions = new List<IGraphAction>();
|
||||
private List<ConstructionGraphEdge> _edges = new List<ConstructionGraphEdge>();
|
||||
private List<IGraphAction> _actions = new();
|
||||
private List<ConstructionGraphEdge> _edges = new();
|
||||
|
||||
[ViewVariables]
|
||||
public string Name { get; private set; }
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace Content.Shared.Construction
|
||||
[Prototype("constructionGraph")]
|
||||
public class ConstructionGraphPrototype : IPrototype, IIndexedPrototype
|
||||
{
|
||||
private readonly Dictionary<string, ConstructionGraphNode> _nodes = new Dictionary<string, ConstructionGraphNode>();
|
||||
private readonly Dictionary<ValueTuple<string, string>, ConstructionGraphNode[]> _paths = new Dictionary<ValueTuple<string, string>, ConstructionGraphNode[]>();
|
||||
private Dictionary<ConstructionGraphNode, ConstructionGraphNode> _pathfinding = new Dictionary<ConstructionGraphNode, ConstructionGraphNode>();
|
||||
private readonly Dictionary<string, ConstructionGraphNode> _nodes = new();
|
||||
private readonly Dictionary<ValueTuple<string, string>, ConstructionGraphNode[]> _paths = new();
|
||||
private Dictionary<ConstructionGraphNode, ConstructionGraphNode> _pathfinding = new();
|
||||
|
||||
[ViewVariables]
|
||||
public string ID { get; private set; }
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Content.Shared.Construction
|
||||
{
|
||||
public class NestedConstructionGraphStep : ConstructionGraphStep
|
||||
{
|
||||
public List<List<ConstructionGraphStep>> Steps { get; private set; } = new List<List<ConstructionGraphStep>>();
|
||||
public List<List<ConstructionGraphStep>> Steps { get; private set; } = new();
|
||||
|
||||
public void LoadFrom(YamlMappingNode mapping)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user