Run spell check over solution
This commit is contained in:
@@ -107,7 +107,7 @@ namespace OpenRA
|
||||
// - the triangles ACD and BCD must have opposite sense (clockwise or anticlockwise)
|
||||
// - the triangles CAB and DAB must have opposite sense
|
||||
// Segments intersect if the orientation (clockwise or anticlockwise) of the two points in each line segment are opposite with respect to the other
|
||||
// Assumes that lines are not colinear
|
||||
// Assumes that lines are not collinear
|
||||
return WindingDirectionTest(c, d, a) != WindingDirectionTest(c, d, b) && WindingDirectionTest(a, b, c) != WindingDirectionTest(a, b, d);
|
||||
}
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ namespace OpenRA.Graphics
|
||||
|
||||
if (unlockMinZoom)
|
||||
{
|
||||
// Specators and the map editor support zooming out by an extra factor of two.
|
||||
// Spectators and the map editor support zooming out by an extra factor of two.
|
||||
// TODO: Allow zooming out until the full map is visible
|
||||
// We need to improve our viewport scroll handling to center the map as we zoom out
|
||||
// before this will work well enough to enable
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace OpenRA
|
||||
|
||||
try
|
||||
{
|
||||
// HACK: If the path is inside the the support directory then we may need to create it
|
||||
// HACK: If the path is inside the support directory then we may need to create it
|
||||
// Assume that the path is a directory if there is not an existing file with the same name
|
||||
var resolved = Platform.ResolvePath(name);
|
||||
if (resolved.StartsWith(Platform.SupportDir) && !File.Exists(resolved))
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace OpenRA
|
||||
else
|
||||
Polygons = new[] { Corners };
|
||||
|
||||
// Initial value must be asigned before HeightOffset can be called
|
||||
// Initial value must be assigned before HeightOffset can be called
|
||||
CenterHeightOffset = 0;
|
||||
CenterHeightOffset = HeightOffset(0, 0);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace OpenRA.Primitives
|
||||
public static long Mask => allBits;
|
||||
}
|
||||
|
||||
// Opitmized BitSet to be used only when guaranteed to be no more than 64 values.
|
||||
// Optimized BitSet to be used only when guaranteed to be no more than 64 values.
|
||||
public readonly struct LongBitSet<T> : IEnumerable<string>, IEquatable<LongBitSet<T>> where T : class
|
||||
{
|
||||
readonly long bits;
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace OpenRA
|
||||
[Desc("Display a graph with various profiling traces")]
|
||||
public bool PerfGraph = false;
|
||||
|
||||
[Desc("Numer of samples to average over when calculating tick and render times.")]
|
||||
[Desc("Number of samples to average over when calculating tick and render times.")]
|
||||
public int Samples = 25;
|
||||
|
||||
[Desc("Check whether a newer version is available online.")]
|
||||
|
||||
@@ -625,7 +625,7 @@ namespace OpenRA.Support
|
||||
if (lastToken.Opens != Grouping.None && token.Closes != Grouping.None)
|
||||
throw new InvalidDataException($"Empty parenthesis at index {lastToken.Index}");
|
||||
|
||||
// Exactly one of two consective tokens must take the other's sub-expression evaluation as an operand
|
||||
// Exactly one of two consecutive tokens must take the other's sub-expression evaluation as an operand
|
||||
if (lastToken.RightOperand == token.LeftOperand)
|
||||
{
|
||||
if (lastToken.RightOperand)
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace OpenRA
|
||||
{
|
||||
if (args.Length % 2 != 0)
|
||||
throw new ArgumentException("Expected a comma separated list of name, value arguments"
|
||||
+ "but the number of arguments is not a multiple of two", nameof(args));
|
||||
+ " but the number of arguments is not a multiple of two", nameof(args));
|
||||
|
||||
var argumentDictionary = new Dictionary<string, object> { { name, value } };
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
public readonly BitSet<DamageType> DamageTypes = default(BitSet<DamageType>);
|
||||
|
||||
[CursorReference]
|
||||
[Desc("Cursor to display when targetting.")]
|
||||
[Desc("Cursor to display when targeting.")]
|
||||
public readonly string AttackCursor = "attack";
|
||||
|
||||
[CursorReference]
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
var isLanded = dat <= aircraft.LandAltitude;
|
||||
|
||||
// HACK: Prevent paused (for example, EMP'd) aircraft from taking off.
|
||||
// This is necessary until the TODOs in the IsCanceling block below are adressed.
|
||||
// This is necessary until the TODOs in the IsCanceling block below are addressed.
|
||||
if (isLanded && aircraft.IsTraitPaused)
|
||||
return false;
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (!isSlider)
|
||||
{
|
||||
// Using the turn rate, compute a hypothetical circle traced by a continuous turn.
|
||||
// If it contains the destination point, it's unreachable without more complex manuvering.
|
||||
// If it contains the destination point, it's unreachable without more complex maneuvering.
|
||||
var turnRadius = CalculateTurnRadius(aircraft.MovementSpeed, aircraft.TurnSpeed);
|
||||
|
||||
// The current facing is a tangent of the minimal turn circle.
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
/// <summary>
|
||||
/// Called when the actor has entered the target actor.
|
||||
/// Actor will be be Killed/Disposed or they will enter/exit unharmed.
|
||||
/// Actor will be Killed/Disposed or they will enter/exit unharmed.
|
||||
/// Depends on either the EnterBehaviour of the actor or the requirements of an overriding function.
|
||||
/// </summary>
|
||||
protected virtual void OnEnterComplete(Actor self, Actor targetActor) { }
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
return PathGraph.PathCostForInvalidPath;
|
||||
|
||||
// Add a cost modifier to harvestable cells to prefer resources that are closer to the refinery.
|
||||
// This reduces the tendancy for harvesters to move in straight lines
|
||||
// This reduces the tendency for harvesters to move in straight lines
|
||||
if (procPos.HasValue && harvInfo.ResourceRefineryDirectionPenalty > 0 && harv.CanHarvestCell(self, loc))
|
||||
{
|
||||
var pos = map.CenterOfCell(loc);
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
// HACK: If the activity is cancelled while we're on the host resupplying (or about to start resupplying),
|
||||
// move actor outside the resupplier footprint to prevent it from blocking other actors.
|
||||
// Additionally, if the host is no longer valid, make aircaft take off.
|
||||
// Additionally, if the host is no longer valid, make aircraft take off.
|
||||
if (isCloseEnough || isHostInvalid)
|
||||
OnResupplyEnding(self, isHostInvalid);
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
[Desc("Controls the way inaccuracy is calculated. Possible values are 'Maximum' - scale from 0 to max with range, 'PerCellIncrement' - scale from 0 with range and 'Absolute' - use set value regardless of range.")]
|
||||
public readonly InaccuracyType InaccuracyType = InaccuracyType.Absolute;
|
||||
|
||||
[Desc("Inaccuracy override when sucessfully locked onto target. Defaults to Inaccuracy if negative.")]
|
||||
[Desc("Inaccuracy override when successfully locked onto target. Defaults to Inaccuracy if negative.")]
|
||||
public readonly WDist LockOnInaccuracy = new WDist(-1);
|
||||
|
||||
[Desc("Probability of locking onto and following target.")]
|
||||
@@ -546,7 +546,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
// Attained height after ascent as predicted from upper part of incline surmounting manoeuvre
|
||||
var predAttHght = loopRadius * (1024 - WAngle.FromFacing(vFacing).Cos()) / 1024 - diffClfMslHgt;
|
||||
|
||||
// Should the missile be slowed down in order to make it more manoeuverable
|
||||
// Should the missile be slowed down in order to make it more maneuverable
|
||||
var slowDown = info.Acceleration.Length != 0 // Possible to decelerate
|
||||
&& ((desiredVFacing != 0 // Lower part of incline surmounting manoeuvre
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
|
||||
[ScriptActorPropertyActivity]
|
||||
[Desc("Queues a landing activity on the specififed actor.")]
|
||||
[Desc("Queues a landing activity on the specified actor.")]
|
||||
public void Land(Actor landOn)
|
||||
{
|
||||
Self.QueueActivity(new Land(Self, Target.FromActor(landOn)));
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace OpenRA.Mods.Common.SpriteLoaders
|
||||
}
|
||||
else if (png.EmbeddedData.ContainsKey("FrameAmount"))
|
||||
{
|
||||
// Otherwise, calculate the number of frames by splitting the image horizontaly by FrameAmount.
|
||||
// Otherwise, calculate the number of frames by splitting the image horizontally by FrameAmount.
|
||||
frameAmount = FieldLoader.GetValue<int>("FrameAmount", png.EmbeddedData["FrameAmount"]);
|
||||
frameSize = new Size(png.Width / frameAmount, png.Height);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
void INotifyMoving.MovementTypeChanged(Actor self, MovementType type)
|
||||
{
|
||||
// Recalculate the visiblity at our final stop position
|
||||
// Recalculate the visibility at our final stop position
|
||||
if (type == MovementType.None && self.IsInWorld)
|
||||
{
|
||||
var centerPosition = self.CenterPosition;
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
var br = world.Map.CellContaining(pos + delta);
|
||||
var checkFrozen = firedBy.FrozenActorLayer.FrozenActorsInRegion(new CellRegion(world.Map.Grid.Type, tl, br));
|
||||
|
||||
// IsValid check filters out Frozen Actors that have not initizialized their Owner
|
||||
// IsValid check filters out Frozen Actors that have not initialized their Owner
|
||||
foreach (var scrutinized in checkFrozen)
|
||||
answer += consideration.GetAttractiveness(scrutinized, firedBy.RelationshipWith(scrutinized.Owner), firedBy);
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
// If the MCV has to move first, we can't be sure it reaches the destination alive, so we only
|
||||
// update base and defense center if the MCV is deployed immediately (i.e. at game start).
|
||||
// TODO: This could be adressed via INotifyTransform.
|
||||
// TODO: This could be addressed via INotifyTransform.
|
||||
foreach (var n in notifyPositionsUpdated)
|
||||
{
|
||||
n.UpdatedBaseCenter(mcv.Location);
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
"Non-positive values will make it use Health.HP.")]
|
||||
public readonly int MaxHP = 0;
|
||||
|
||||
[Desc("Is the condition irrevokable once it has been granted?")]
|
||||
[Desc("Is the condition irrevocable once it has been granted?")]
|
||||
public readonly bool GrantPermanently = false;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new GrantConditionOnHealth(init.Self, this); }
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[NotificationReference("Sounds")]
|
||||
public readonly string CashTickDownNotification = null;
|
||||
|
||||
[Desc("Monetery value of each resource type.", "Dictionary of [resource type]: [value per unit].")]
|
||||
[Desc("Monetary value of each resource type.", "Dictionary of [resource type]: [value per unit].")]
|
||||
public readonly Dictionary<string, int> ResourceValues = new Dictionary<string, int>();
|
||||
|
||||
IEnumerable<LobbyOption> ILobbyOptions.LobbyOptions(MapPreview map)
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
[Desc("Number of pips to display how filled unit is.")]
|
||||
public readonly int PipCount = 0;
|
||||
|
||||
[Desc("If non-zero, override the spacing between adjacing pips.")]
|
||||
[Desc("If non-zero, override the spacing between adjacent pips.")]
|
||||
public readonly int2 PipStride = int2.Zero;
|
||||
|
||||
[Desc("Image that defines the pip sequences.")]
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly float[] PresetSaturations = { };
|
||||
|
||||
[ActorReference]
|
||||
[Desc("Actor type to show in the color picker. This can be overriden for specific factions with FactionPreviewActors.")]
|
||||
[Desc("Actor type to show in the color picker. This can be overridden for specific factions with FactionPreviewActors.")]
|
||||
public readonly string PreviewActor = null;
|
||||
|
||||
[SequenceReference(dictionaryReference: LintDictionaryReference.Values)]
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules
|
||||
{
|
||||
if (locations.Any())
|
||||
yield return "[D2k]ResourceRenderer has been added.\n" +
|
||||
"You need to adjust the the field RenderTypes on trait [D2k]ResourceRenderer\n" +
|
||||
"You need to adjust the field RenderTypes on trait [D2k]ResourceRenderer\n" +
|
||||
"on the following actors:\n" +
|
||||
UpdateUtils.FormatMessageList(locations);
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules
|
||||
var message = "TurnToDock is now deprecated. The following actors had TurnToDock enabled:\n"
|
||||
+ UpdateUtils.FormatMessageList(turningAircraft.Select(n => n.Item1 + " (" + n.Item2 + ")"))
|
||||
+ "\n If you wish these units to keep their turning behaviour when docking with a host building" +
|
||||
"you will need to define a 'Facing' parameter on the 'Exit' trait of the host building. This change" +
|
||||
"does not affect the behaviour for landing on terrain which is governed by TurnToLand.";
|
||||
" you will need to define a 'Facing' parameter on the 'Exit' trait of the host building. This change" +
|
||||
" does not affect the behaviour for landing on terrain which is governed by TurnToLand.";
|
||||
|
||||
if (turningAircraft.Any())
|
||||
yield return message;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
[Desc("Types of damage that this warhead causes. Leave empty for no damage types.")]
|
||||
public readonly BitSet<DamageType> DamageTypes = default(BitSet<DamageType>);
|
||||
|
||||
[Desc("Damage percentage versus each armortype.")]
|
||||
[Desc("Damage percentage versus each armor type.")]
|
||||
public readonly Dictionary<string, int> Versus = new Dictionary<string, int>();
|
||||
|
||||
public override bool IsValidAgainst(Actor victim, Actor firedBy)
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
[Desc("Type of smudge to apply to terrain.")]
|
||||
public readonly HashSet<string> SmudgeType = new HashSet<string>();
|
||||
|
||||
[Desc("Percentual chance the smudge is created.")]
|
||||
[Desc("Percentage chance the smudge is created.")]
|
||||
public readonly int Chance = 100;
|
||||
|
||||
public override void DoImpact(in Target target, WarheadArgs args)
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
title: "Failed to save map",
|
||||
text: "See debug.log for details.",
|
||||
onConfirm: () => { },
|
||||
confirmText: "Ok");
|
||||
confirmText: "OK");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace OpenRA.Mods.Common
|
||||
// It falls where t = [(point - target) . (source - target)] / |source - target|^2
|
||||
// The normal DotProduct math would be (xDiff + yDiff) / dist, where dist = (target - source).LengthSquared;
|
||||
// But in order to avoid floating points, we do not divide here, but rather work with the large numbers as far as possible.
|
||||
// We then later divide by dist, only AFTER we have multiplied by the dotproduct.
|
||||
// We then later divide by dist, only AFTER we have multiplied by the dot product.
|
||||
var xDiff = ((long)point.X - lineEnd.X) * (lineStart.X - lineEnd.X);
|
||||
var yDiff = ((long)point.Y - lineEnd.Y) * (lineStart.Y - lineEnd.Y);
|
||||
var t = xDiff + yDiff;
|
||||
|
||||
@@ -272,7 +272,7 @@ Parent: # comment without value
|
||||
Assert.AreEqual(yaml, result);
|
||||
}
|
||||
|
||||
[TestCase(TestName = "Comments should be be removed when discardCommentsAndWhitespace is false")]
|
||||
[TestCase(TestName = "Comments should be removed when discardCommentsAndWhitespace is false")]
|
||||
public void CommentsShouldntSurviveRoundTrip()
|
||||
{
|
||||
var yaml = @"
|
||||
|
||||
@@ -354,7 +354,7 @@ namespace OpenRA.Test
|
||||
AssertParseFailure("t -1", "Missing binary operation before `-1` at index 2");
|
||||
}
|
||||
|
||||
[TestCase(TestName = "Test mixed charaters at end of identifier parser errors")]
|
||||
[TestCase(TestName = "Test mixed characters at end of identifier parser errors")]
|
||||
public void TestParseMixedEndErrors()
|
||||
{
|
||||
AssertParseFailure("t- 1", "Invalid identifier end character at index 1 for `t-`");
|
||||
|
||||
Reference in New Issue
Block a user