Make sure braces for multi-line statements are on their own lines.

This commit is contained in:
Paul Chote
2019-06-08 15:04:36 +01:00
committed by reaperrr
parent c89f8dbb89
commit ebf2ce32c0
34 changed files with 180 additions and 91 deletions

View File

@@ -86,8 +86,13 @@ namespace OpenRA.Mods.Common.Traits
public Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued)
{
if (order.OrderID == OrderID)
return new Order(order.OrderID, self, target, false) { SuppressVisualFeedback = true,
ExtraData = ((RallyPointOrderTargeter)order).ForceSet ? ForceSet : 0 };
{
return new Order(order.OrderID, self, target, false)
{
SuppressVisualFeedback = true,
ExtraData = ((RallyPointOrderTargeter)order).ForceSet ? ForceSet : 0
};
}
return null;
}

View File

@@ -163,8 +163,11 @@ namespace OpenRA.Mods.Common.Traits
public IEnumerable<IOrderTargeter> Orders
{
get { yield return new DeployOrderTargeter("Unload", 10,
() => CanUnload() ? Info.UnloadCursor : Info.UnloadBlockedCursor); }
get
{
yield return new DeployOrderTargeter("Unload", 10,
() => CanUnload() ? Info.UnloadCursor : Info.UnloadBlockedCursor);
}
}
public Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued)

View File

@@ -192,11 +192,12 @@ namespace OpenRA.Mods.Common.Traits
// Find all refineries and their occupancy count:
var refs = self.World.ActorsWithTrait<IAcceptResources>()
.Where(r => r.Actor != ignore && r.Actor.Owner == self.Owner && IsAcceptableProcType(r.Actor))
.Select(r => new {
.Select(r => new
{
Location = r.Actor.Location + r.Trait.DeliveryOffset,
Actor = r.Actor,
Occupancy = self.World.ActorsHavingTrait<Harvester>(h => h.LinkedProc == r.Actor).Count() })
.ToDictionary(r => r.Location);
Occupancy = self.World.ActorsHavingTrait<Harvester>(h => h.LinkedProc == r.Actor).Count()
}).ToDictionary(r => r.Location);
// Start a search from each refinery's delivery location:
List<CPos> path;

View File

@@ -22,7 +22,8 @@ namespace OpenRA.Mods.Common.Traits
float t = 0;
string paletteName = "cloak";
Color[] colors = {
Color[] colors =
{
Color.FromArgb(55, 205, 205, 220),
Color.FromArgb(120, 205, 205, 230),
Color.FromArgb(192, 180, 180, 255),

View File

@@ -147,10 +147,13 @@ namespace OpenRA.Mods.Common.Traits.Render
initializePalettes = false;
}
return new IRenderable[] { new ModelRenderable(
components, self.CenterPosition, 0, camera, Info.Scale,
lightSource, Info.LightAmbientColor, Info.LightDiffuseColor,
colorPalette, normalsPalette, shadowPalette) };
return new IRenderable[]
{
new ModelRenderable(
components, self.CenterPosition, 0, camera, Info.Scale,
lightSource, Info.LightAmbientColor, Info.LightDiffuseColor,
colorPalette, normalsPalette, shadowPalette)
};
}
IEnumerable<Rectangle> IRender.ScreenBounds(Actor self, WorldRenderer wr)

View File

@@ -83,7 +83,8 @@ namespace OpenRA.Mods.Common.Traits
// Always spawn at least one actor, plus
// however many needed to reach the minimum.
SpawnActor(self, spawnPoint);
} while (actorsPresent < info.Minimum);
}
while (actorsPresent < info.Minimum);
}
WPos SpawnActor(Actor self, Actor spawnPoint)

View File

@@ -56,7 +56,8 @@ namespace OpenRA.Mods.Common.Traits
public readonly float[] SwingAmplitude = { 1.0f, 1.5f };
[Desc("The randomly selected rgb(a) hex colors for the particles. Use this order: rrggbb[aa], rrggbb[aa], ...")]
public readonly Color[] ParticleColors = {
public readonly Color[] ParticleColors =
{
Color.FromArgb(236, 236, 236),
Color.FromArgb(228, 228, 228),
Color.FromArgb(208, 208, 208),