Skip to content

Commit

Permalink
Run spell check over solution
Browse files Browse the repository at this point in the history
  • Loading branch information
RoosterDragon authored and reaperrr committed Dec 5, 2021
1 parent b3d290e commit 727084c
Show file tree
Hide file tree
Showing 31 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion OpenRA.Game/Exts.cs
Expand Up @@ -107,7 +107,7 @@ public static bool LinesIntersect(int2 a, int2 b, int2 c, int2 d)
// - 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);
}

Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Game/Graphics/Viewport.cs
Expand Up @@ -238,7 +238,7 @@ void UpdateViewportZooms(bool resetCurrentZoom = true)

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
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Game/Map/MapCache.cs
Expand Up @@ -68,7 +68,7 @@ public void LoadMaps()

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))
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Game/Map/MapGrid.cs
Expand Up @@ -72,7 +72,7 @@ public CellRamp(MapGridType type, WRot orientation, RampCornerHeight tl = RampCo
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);
}
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Game/Primitives/LongBitSet.cs
Expand Up @@ -91,7 +91,7 @@ public static void Reset()
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;
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Game/Settings.cs
Expand Up @@ -118,7 +118,7 @@ public class DebugSettings
[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.")]
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Game/Support/VariableExpression.cs
Expand Up @@ -625,7 +625,7 @@ Expression Build(ExpressionType resultType)
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)
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Game/Translation.cs
Expand Up @@ -95,7 +95,7 @@ public string GetAttribute(string key, string attribute)
{
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 } };

Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Cnc/Traits/MadTank.cs
Expand Up @@ -62,7 +62,7 @@ class MadTankInfo : TraitInfo, IRulesetLoaded, Requires<ExplodesInfo>, Requires<
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]
Expand Down
4 changes: 2 additions & 2 deletions OpenRA.Mods.Common/Activities/Air/Fly.cs
Expand Up @@ -133,7 +133,7 @@ public override bool Tick(Actor self)
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;

Expand Down Expand Up @@ -236,7 +236,7 @@ public override bool Tick(Actor self)
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.
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Activities/Enter.cs
Expand Up @@ -54,7 +54,7 @@ protected Enter(Actor self, in Target target, Color? targetLineColor = null)

/// <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) { }
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Activities/FindAndDeliverResources.cs
Expand Up @@ -193,7 +193,7 @@ public override bool Tick(Actor self)
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);
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Activities/Resupply.cs
Expand Up @@ -121,7 +121,7 @@ public override bool Tick(Actor self)

// 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);

Expand Down
4 changes: 2 additions & 2 deletions OpenRA.Mods.Common/Projectiles/Missile.cs
Expand Up @@ -79,7 +79,7 @@ public class MissileInfo : IProjectileInfo
[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.")]
Expand Down Expand Up @@ -546,7 +546,7 @@ int IncreaseAltitude(int predClfDist, int diffClfMslHgt, int relTarHorDist, int
// 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

Expand Down
Expand Up @@ -42,7 +42,7 @@ public void ReturnToBase(Actor destination = null)
}

[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)));
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/SpriteLoaders/PngSheetLoader.cs
Expand Up @@ -129,7 +129,7 @@ void RegionsFromSlices(Png png, out List<Rectangle> regions, out List<float2> of
}
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);
}
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Traits/AffectsShroud.cs
Expand Up @@ -156,7 +156,7 @@ void INotifyRemovedFromWorld.RemovedFromWorld(Actor self)

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;
Expand Down
Expand Up @@ -78,7 +78,7 @@ public int GetAttractiveness(WPos pos, Player firedBy)
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);
}
Expand Down
Expand Up @@ -163,7 +163,7 @@ void DeployMcv(IBot bot, Actor mcv, bool move)

// 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);
Expand Down
Expand Up @@ -34,7 +34,7 @@ public class GrantConditionOnHealthInfo : TraitInfo, IRulesetLoaded, Requires<IH
"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); }
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Traits/Player/PlayerResources.cs
Expand Up @@ -53,7 +53,7 @@ public class PlayerResourcesInfo : TraitInfo, ILobbyOptions
[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)
Expand Down
Expand Up @@ -21,7 +21,7 @@ public class WithResourceStoragePipsDecorationInfo : WithDecorationBaseInfo
[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.")]
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Traits/World/ColorPickerManager.cs
Expand Up @@ -38,7 +38,7 @@ public class ColorPickerManagerInfo : TraitInfo<ColorPickerManager>, IRulesetLoa
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)]
Expand Down
Expand Up @@ -26,7 +26,7 @@ public override IEnumerable<string> AfterUpdate(ModData modData)
{
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);

Expand Down
4 changes: 2 additions & 2 deletions OpenRA.Mods.Common/UpdateRules/Rules/RemoveTurnToDock.cs
Expand Up @@ -30,8 +30,8 @@ public override IEnumerable<string> AfterUpdate(ModData modData)
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;
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Warheads/DamageWarhead.cs
Expand Up @@ -26,7 +26,7 @@ public abstract class DamageWarhead : Warhead
[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)
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Warheads/LeaveSmudgeWarhead.cs
Expand Up @@ -26,7 +26,7 @@ public class LeaveSmudgeWarhead : Warhead
[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)
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Widgets/Logic/Editor/SaveMapLogic.cs
Expand Up @@ -208,7 +208,7 @@ public SaveDirectory(Folder folder, string displayName, MapClassification classi
title: "Failed to save map",
text: "See debug.log for details.",
onConfirm: () => { },
confirmText: "Ok");
confirmText: "OK");
}
};
}
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/WorldExtensions.cs
Expand Up @@ -97,7 +97,7 @@ public static WPos MinimumPointLineProjection(WPos lineStart, WPos lineEnd, WPos
// 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;
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Test/OpenRA.Game/MiniYamlTest.cs
Expand Up @@ -272,7 +272,7 @@ public void CommentsSurviveRoundTrip()
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 = @"
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Test/OpenRA.Game/VariableExpressionTest.cs
Expand Up @@ -354,7 +354,7 @@ public void TestParseHyphenErrors()
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-`");
Expand Down

0 comments on commit 727084c

Please sign in to comment.