Fix some whitespace formatting issues: stray tabs or spaces.

Wrap some long lines on affected code.
This commit is contained in:
RoosterDragon
2023-03-02 16:41:55 +00:00
committed by Gustas
parent edaf11cb89
commit 52fd564eac
22 changed files with 50 additions and 38 deletions

View File

@@ -29,7 +29,10 @@ namespace OpenRA
public readonly WVec[][] Polygons;
public readonly WRot Orientation;
public CellRamp(MapGridType type, WRot orientation, RampCornerHeight tl = RampCornerHeight.Low, RampCornerHeight tr = RampCornerHeight.Low, RampCornerHeight br = RampCornerHeight.Low, RampCornerHeight bl = RampCornerHeight.Low, RampSplit split = RampSplit.Flat)
public CellRamp(MapGridType type, WRot orientation,
RampCornerHeight tl = RampCornerHeight.Low, RampCornerHeight tr = RampCornerHeight.Low,
RampCornerHeight br = RampCornerHeight.Low, RampCornerHeight bl = RampCornerHeight.Low,
RampSplit split = RampSplit.Flat)
{
Orientation = orientation;
if (type == MapGridType.RectangularIsometric)

View File

@@ -141,7 +141,7 @@ namespace OpenRA.Mods.Cnc.Traits
Facing = Facing == Left ? Right : Left;
}
int MovementSpeed => OpenRA.Mods.Common.Util.ApplyPercentageModifiers(Info.Speed, speedModifiers);
int MovementSpeed => Common.Util.ApplyPercentageModifiers(Info.Speed, speedModifiers);
public (CPos, SubCell)[] OccupiedCells() { return new[] { (TopLeft, SubCell.FullCell) }; }

View File

@@ -630,7 +630,8 @@ namespace OpenRA.Mods.Common.Projectiles
if (targetPassedBy)
desiredVFacing = desiredVFacing.Clamp(-info.VerticalRateOfTurn.Facing, info.VerticalRateOfTurn.Facing);
else if (lastHt == 0)
{ // Before the target is passed by, missile speed should be changed
{
// Before the target is passed by, missile speed should be changed
// Target's height above loop's center
var tarHgt = (loopRadius * WAngle.FromFacing(vFacing).Cos() / 1024 - System.Math.Abs(relTarHgt)).Clamp(0, loopRadius);

View File

@@ -174,7 +174,9 @@ namespace OpenRA.Mods.Common.Widgets
}
// Draw x axis
axisFont.DrawTextWithShadow(xAxisLabel, new float2(graphOrigin.X, origin.Y) + new float2(width / 2 - xAxisLabelSize.X / 2, -(xAxisLabelSize.Y + Padding)), Color.White, BackgroundColorDark, BackgroundColorLight, 1);
axisFont.DrawTextWithShadow(xAxisLabel,
new float2(graphOrigin.X, origin.Y) + new float2(width / 2 - xAxisLabelSize.X / 2, -(xAxisLabelSize.Y + Padding)),
Color.White, BackgroundColorDark, BackgroundColorLight, 1);
// TODO: make this stuff not draw outside of the RenderBounds
for (int n = pointStart, x = 0; n <= pointEnd; n++, x += xStep)
@@ -186,11 +188,15 @@ namespace OpenRA.Mods.Common.Widgets
var xAxisText = GetXAxisValueFormat().F(n / XAxisTicksPerLabel);
var xAxisTickTextWidth = labelFont.Measure(xAxisText).X;
var xLocation = x - xAxisTickTextWidth / 2;
labelFont.DrawTextWithShadow(xAxisText, graphOrigin + new float2(xLocation, 2), Color.White, BackgroundColorDark, BackgroundColorLight, 1);
labelFont.DrawTextWithShadow(xAxisText,
graphOrigin + new float2(xLocation, 2),
Color.White, BackgroundColorDark, BackgroundColorLight, 1);
}
// Draw y axis
axisFont.DrawTextWithShadow(yAxisLabel, new float2(origin.X, graphOrigin.Y) + new float2(5 - axisFont.TopOffset, -(height / 2 - yAxisLabelSize.X / 2)), Color.White, BackgroundColorDark, BackgroundColorLight, 1, (float)Math.PI / 2);
axisFont.DrawTextWithShadow(yAxisLabel,
new float2(origin.X, graphOrigin.Y) + new float2(5 - axisFont.TopOffset, -(height / 2 - yAxisLabelSize.X / 2)),
Color.White, BackgroundColorDark, BackgroundColorLight, 1, (float)Math.PI / 2);
for (var y = GetDisplayFirstYAxisValue() ? 0 : yStep; y <= height; y += yStep)
{
@@ -202,7 +208,9 @@ namespace OpenRA.Mods.Common.Widgets
var yLocation = y + (textWidth.Y + labelFont.TopOffset) / 2;
labelFont.DrawTextWithShadow(text, graphOrigin + new float2(-(textWidth.X + 3), -yLocation), Color.White, BackgroundColorDark, BackgroundColorLight, 1);
labelFont.DrawTextWithShadow(text,
graphOrigin + new float2(-(textWidth.X + 3), -yLocation),
Color.White, BackgroundColorDark, BackgroundColorLight, 1);
}
// Bottom line