Fix some whitespace formatting issues: stray tabs or spaces.
Wrap some long lines on affected code.
This commit is contained in:
@@ -29,7 +29,10 @@ namespace OpenRA
|
|||||||
public readonly WVec[][] Polygons;
|
public readonly WVec[][] Polygons;
|
||||||
public readonly WRot Orientation;
|
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;
|
Orientation = orientation;
|
||||||
if (type == MapGridType.RectangularIsometric)
|
if (type == MapGridType.RectangularIsometric)
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
Facing = Facing == Left ? Right : Left;
|
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) }; }
|
public (CPos, SubCell)[] OccupiedCells() { return new[] { (TopLeft, SubCell.FullCell) }; }
|
||||||
|
|
||||||
|
|||||||
@@ -630,7 +630,8 @@ namespace OpenRA.Mods.Common.Projectiles
|
|||||||
if (targetPassedBy)
|
if (targetPassedBy)
|
||||||
desiredVFacing = desiredVFacing.Clamp(-info.VerticalRateOfTurn.Facing, info.VerticalRateOfTurn.Facing);
|
desiredVFacing = desiredVFacing.Clamp(-info.VerticalRateOfTurn.Facing, info.VerticalRateOfTurn.Facing);
|
||||||
else if (lastHt == 0)
|
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
|
// Target's height above loop's center
|
||||||
var tarHgt = (loopRadius * WAngle.FromFacing(vFacing).Cos() / 1024 - System.Math.Abs(relTarHgt)).Clamp(0, loopRadius);
|
var tarHgt = (loopRadius * WAngle.FromFacing(vFacing).Cos() / 1024 - System.Math.Abs(relTarHgt)).Clamp(0, loopRadius);
|
||||||
|
|
||||||
|
|||||||
@@ -174,7 +174,9 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw x axis
|
// 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
|
// TODO: make this stuff not draw outside of the RenderBounds
|
||||||
for (int n = pointStart, x = 0; n <= pointEnd; n++, x += xStep)
|
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 xAxisText = GetXAxisValueFormat().F(n / XAxisTicksPerLabel);
|
||||||
var xAxisTickTextWidth = labelFont.Measure(xAxisText).X;
|
var xAxisTickTextWidth = labelFont.Measure(xAxisText).X;
|
||||||
var xLocation = x - xAxisTickTextWidth / 2;
|
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
|
// 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)
|
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;
|
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
|
// Bottom line
|
||||||
|
|||||||
Reference in New Issue
Block a user