Fix IDE0028, IDE0300, IDE0301, IDE0302, IDE0303, IDE0304.
Silence IDE0305.
This commit is contained in:
committed by
Pavel Penev
parent
0740991c12
commit
79454d8fd2
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class BuildingInfo : TraitInfo, IOccupySpaceInfo, IPlaceBuildingDecorationInfo
|
||||
{
|
||||
[Desc("Where you are allowed to place the building (Water, Clear, ...)")]
|
||||
public readonly HashSet<string> TerrainTypes = new();
|
||||
public readonly HashSet<string> TerrainTypes = [];
|
||||
|
||||
[Desc("x means cell is blocked, capital X means blocked but not counting as targetable, ",
|
||||
"= means part of the footprint but passable, _ means completely empty.")]
|
||||
@@ -56,16 +56,16 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Clear smudges from underneath the building footprint on transform.")]
|
||||
public readonly bool RemoveSmudgesOnTransform = true;
|
||||
|
||||
public readonly string[] BuildSounds = Array.Empty<string>();
|
||||
public readonly string[] BuildSounds = [];
|
||||
|
||||
public readonly string[] UndeploySounds = Array.Empty<string>();
|
||||
public readonly string[] UndeploySounds = [];
|
||||
|
||||
public override object Create(ActorInitializer init) { return new Building(init, this); }
|
||||
|
||||
protected static object LoadFootprint(MiniYaml yaml)
|
||||
{
|
||||
var footprintYaml = yaml.NodeWithKeyOrDefault("Footprint");
|
||||
var footprintChars = footprintYaml?.Value.Value.Where(x => !char.IsWhiteSpace(x)).ToArray() ?? new[] { 'x' };
|
||||
var footprintChars = footprintYaml?.Value.Value.Where(x => !char.IsWhiteSpace(x)).ToArray() ?? ['x'];
|
||||
|
||||
var dimensionsYaml = yaml.NodeWithKeyOrDefault("Dimensions");
|
||||
var dim = dimensionsYaml != null ? FieldLoader.GetValue<CVec>("Dimensions", dimensionsYaml.Value.Value) : new CVec(1, 1);
|
||||
|
||||
Reference in New Issue
Block a user