Fix IDE0090

This commit is contained in:
RoosterDragon
2023-11-14 19:49:11 +00:00
committed by Gustas
parent cfde0d7867
commit b97d1a4c6c
35 changed files with 125 additions and 125 deletions

View File

@@ -320,8 +320,8 @@ namespace OpenRA.Mods.Common.Traits
return new List<MiniYamlNode>()
{
new MiniYamlNode("InitialBaseCenter", FieldSaver.FormatValue(initialBaseCenter)),
new MiniYamlNode("DefenseCenter", FieldSaver.FormatValue(DefenseCenter))
new("InitialBaseCenter", FieldSaver.FormatValue(initialBaseCenter)),
new("DefenseCenter", FieldSaver.FormatValue(DefenseCenter))
};
}

View File

@@ -208,7 +208,7 @@ namespace OpenRA.Mods.Common.Traits
return new List<MiniYamlNode>()
{
new MiniYamlNode("InitialBaseCenter", FieldSaver.FormatValue(initialBaseCenter))
new("InitialBaseCenter", FieldSaver.FormatValue(initialBaseCenter))
};
}

View File

@@ -508,20 +508,20 @@ namespace OpenRA.Mods.Common.Traits
return new List<MiniYamlNode>()
{
new MiniYamlNode("Squads", "", Squads.Select(s => new MiniYamlNode("Squad", s.Serialize())).ToList()),
new MiniYamlNode("InitialBaseCenter", FieldSaver.FormatValue(initialBaseCenter)),
new MiniYamlNode("UnitsHangingAroundTheBase", FieldSaver.FormatValue(unitsHangingAroundTheBase
new("Squads", "", Squads.Select(s => new MiniYamlNode("Squad", s.Serialize())).ToList()),
new("InitialBaseCenter", FieldSaver.FormatValue(initialBaseCenter)),
new("UnitsHangingAroundTheBase", FieldSaver.FormatValue(unitsHangingAroundTheBase
.Where(a => !unitCannotBeOrdered(a))
.Select(a => a.ActorID)
.ToArray())),
new MiniYamlNode("ActiveUnits", FieldSaver.FormatValue(activeUnits
new("ActiveUnits", FieldSaver.FormatValue(activeUnits
.Where(a => !unitCannotBeOrdered(a))
.Select(a => a.ActorID)
.ToArray())),
new MiniYamlNode("RushTicks", FieldSaver.FormatValue(rushTicks)),
new MiniYamlNode("AssignRolesTicks", FieldSaver.FormatValue(assignRolesTicks)),
new MiniYamlNode("AttackForceTicks", FieldSaver.FormatValue(attackForceTicks)),
new MiniYamlNode("MinAttackForceDelayTicks", FieldSaver.FormatValue(minAttackForceDelayTicks)),
new("RushTicks", FieldSaver.FormatValue(rushTicks)),
new("AssignRolesTicks", FieldSaver.FormatValue(assignRolesTicks)),
new("AttackForceTicks", FieldSaver.FormatValue(attackForceTicks)),
new("MinAttackForceDelayTicks", FieldSaver.FormatValue(minAttackForceDelayTicks)),
};
}

View File

@@ -137,8 +137,8 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
{
var nodes = new List<MiniYamlNode>()
{
new MiniYamlNode("Type", FieldSaver.FormatValue(Type)),
new MiniYamlNode("Units", FieldSaver.FormatValue(Units.Select(a => a.ActorID).ToArray()))
new("Type", FieldSaver.FormatValue(Type)),
new("Units", FieldSaver.FormatValue(Units.Select(a => a.ActorID).ToArray()))
};
if (Target != Target.Invalid)

View File

@@ -219,7 +219,7 @@ namespace OpenRA.Mods.Common.Traits
return new List<MiniYamlNode>()
{
new MiniYamlNode("WaitingPowers", "", waitingPowersNodes)
new("WaitingPowers", "", waitingPowersNodes)
};
}

View File

@@ -228,8 +228,8 @@ namespace OpenRA.Mods.Common.Traits
return new List<MiniYamlNode>()
{
new MiniYamlNode("QueuedBuildRequests", FieldSaver.FormatValue(queuedBuildRequests.ToArray())),
new MiniYamlNode("IdleUnitCount", FieldSaver.FormatValue(idleUnitCount))
new("QueuedBuildRequests", FieldSaver.FormatValue(queuedBuildRequests.ToArray())),
new("IdleUnitCount", FieldSaver.FormatValue(idleUnitCount))
};
}