Fix some spellings.

This commit is contained in:
RoosterDragon
2015-11-27 00:15:09 +00:00
parent 3e8df55bcb
commit bfe1804bf6
56 changed files with 91 additions and 91 deletions

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Activities
this.targetCenter = targetCenter;
}
// CanEnter(target) should to be true; othwise, Enter may abort.
// CanEnter(target) should to be true; otherwise, Enter may abort.
// Tries counter starts at 1 (reset every tick)
protected virtual bool TryGetAlternateTarget(Actor self, int tries, ref Target target) { return false; }
protected virtual bool CanReserve(Actor self) { return true; }

View File

@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Effects
[Desc("Interval in ticks between each spawned Trail animation.")]
public readonly int TrailInterval = 2;
[Desc("Delay in ticks until trail animaion is spawned.")]
[Desc("Delay in ticks until trail animation is spawned.")]
public readonly int TrailDelay = 1;
[PaletteReference("TrailUsePlayerPalette")] public readonly string TrailPalette = "effect";

View File

@@ -514,7 +514,7 @@ namespace OpenRA.Mods.Common.Effects
// Also, never change horizontal facing and never travel backwards
// Possible techniques to avoid close cliffs are deceleration, turning
// as sharply as possible to travel directly upwards and then returning
// to zero vertical facing as low as possible while still not hittin the
// to zero vertical facing as low as possible while still not hitting the
// high terrain. A last technique (and the preferred one, normally used when
// the missile hasn't been fired near a cliff) is simply finding the smallest
// vertical facing that allows for a smooth climb to the new terrain's height

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.Server
{
public class ColorValidator : ServerTrait, IClientJoined
{
// The bigger the color threshold, the less permitive is the algorithm
// The bigger the color threshold, the less permissive is the algorithm
const int ColorThreshold = 0x70;
const byte ColorLowerBound = 0x80;
const byte ColorHigherBound = 0xFF;
@@ -59,7 +59,7 @@ namespace OpenRA.Mods.Common.Server
// Reduce vector by it's biggest value (more calculations, but more accuracy too)
var vectorMax = vector.Max(vv => Math.Abs(vv));
if (vectorMax == 0)
vectorMax = 1; // Avoid divison by 0
vectorMax = 1; // Avoid division by 0
vector[0] /= vectorMax;
vector[1] /= vectorMax;
@@ -93,7 +93,7 @@ namespace OpenRA.Mods.Common.Server
alternativeColor[1] = forbiddenColor.G + (int)(vector[1] * weightVector[1] * ii);
alternativeColor[2] = forbiddenColor.B + (int)(vector[2] * weightVector[2] * ii);
// Be sure it doesnt go out of bounds (0x33 is the lower limit for HSL picker)
// Be sure it doesn't go out of bounds (0x33 is the lower limit for HSL picker)
alternativeColor[0] = alternativeColor[0].Clamp(ColorLowerBound, ColorHigherBound);
alternativeColor[1] = alternativeColor[1].Clamp(ColorLowerBound, ColorHigherBound);
alternativeColor[2] = alternativeColor[2].Clamp(ColorLowerBound, ColorHigherBound);

View File

@@ -367,7 +367,7 @@ namespace OpenRA.Mods.Common.Server
foreach (var c in server.LobbyInfo.Clients)
{
// Validate if color is allowed and get an alternative it it isn't
// Validate if color is allowed and get an alternative it isn't
c.Color = c.PreferredColor = ColorValidator.ValidatePlayerColorAndGetAlternative(server, c.Color, c.Index, conn);
}
@@ -730,7 +730,7 @@ namespace OpenRA.Mods.Common.Server
var kickConn = server.Conns.SingleOrDefault(c => server.GetClient(c) != null && server.GetClient(c).Index == kickClientID);
if (kickConn == null)
{
server.SendOrderTo(conn, "Message", "Noone in that slot.");
server.SendOrderTo(conn, "Message", "No-one in that slot.");
return true;
}
@@ -869,7 +869,7 @@ namespace OpenRA.Mods.Common.Server
var newHslColor = FieldLoader.GetValue<HSLColor>("(value)", parts[1]);
// Validate if color is allowed and get an alternative it it isn't
// Validate if color is allowed and get an alternative it isn't
var altHslColor = ColorValidator.ValidatePlayerColorAndGetAlternative(server, newHslColor, targetClient.Index, conn);
targetClient.Color = altHslColor;

View File

@@ -145,7 +145,7 @@ namespace OpenRA.Mods.Common.SpriteLoaders
if (h.Format == Format.Format20)
h.RefImage = headers[i - 1];
else if (h.Format == Format.Format40 && !offsets.TryGetValue(h.RefOffset, out h.RefImage))
throw new InvalidDataException("Reference doesnt point to image data {0}->{1}".F(h.FileOffset, h.RefOffset));
throw new InvalidDataException("Reference doesn't point to image data {0}->{1}".F(h.FileOffset, h.RefOffset));
}
shpBytesFileOffset = stream.Position;

View File

@@ -137,7 +137,7 @@ namespace OpenRA.Mods.Common.Traits
Facing = init.Contains<FacingInit>() ? init.Get<FacingInit, int>() : info.InitialFacing;
// TODO: HACK: This is a hack until we can properly distinquish between airplane and helicopter!
// TODO: HACK: This is a hack until we can properly distinguish between airplane and helicopter!
// Or until the activities get unified enough so that it doesn't matter.
IsPlane = !info.CanHover;
}

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
protected override bool CanAttack(Actor self, Target target)
{
// dont fire while landed or when outside the map
// Don't fire while landed or when outside the map.
return base.CanAttack(self, target) && self.CenterPosition.Z > 0 && self.World.Map.Contains(self.Location);
}
}

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Traits
{
// nowhere to land, pick something friendly and circle over it.
// i'd prefer something we own
// I'd prefer something we own
var someBuilding = self.World.ActorsHavingTrait<Building>()
.FirstOrDefault(a => a.Owner == self.Owner);

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Offset at which that the exiting actor is spawned relative to the center of the producing actor.")]
public readonly WVec SpawnOffset = WVec.Zero;
[Desc("Cell offset where the exiting actor enters the ActorMap relative to the topleft cell of the producting actor.")]
[Desc("Cell offset where the exiting actor enters the ActorMap relative to the topleft cell of the producing actor.")]
public readonly CVec ExitCell = CVec.Zero;
public readonly int Facing = -1;

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Overrides the IndicatorPalettePrefix.")]
[PaletteReference] public readonly string IndicatorPalette = "";
[Desc("Suffixed by the interal repairing player name.")]
[Desc("Suffixed by the internal repairing player name.")]
public readonly string IndicatorPalettePrefix = "player";
public override object Create(ActorInitializer init) { return new RepairableBuilding(init.Self, this); }

View File

@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits
reservedFor = forActor;
reservedForAircraft = forAircraft;
// NOTE: we really dont care about the GC eating DisposableActions that apply to a world *other* than
// NOTE: we really don't care about the GC eating DisposableActions that apply to a world *other* than
// the one we're playing in.
return new DisposableAction(
() => { reservedFor = null; reservedForAircraft = null; },

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("How long (in ticks) the actor should panic for.")]
public readonly int PanicLength = 25 * 10;
[Desc("Panic movement speed as a precentage of the normal speed.")]
[Desc("Panic movement speed as a percentage of the normal speed.")]
public readonly int PanicSpeedModifier = 200;
[Desc("Chance (out of 100) the unit has to enter panic mode when attacked.")]

View File

@@ -12,7 +12,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("The inaccuracy of this actor is multipled based on upgrade level if specified.")]
[Desc("The inaccuracy of this actor is multiplied based on upgrade level if specified.")]
public class InaccuracyMultiplierInfo : UpgradeMultiplierTraitInfo
{
public override object Create(ActorInitializer init) { return new InaccuracyMultiplier(this, init.Self.Info.Name); }

View File

@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly bool SpeedUp = false;
[Desc("Every time another production building of the same queue is",
"contructed, the build times of all actors in the queue",
"constructed, the build times of all actors in the queue",
"decreased by a percentage of the original time.")]
public readonly int[] BuildTimeSpeedReduction = { 100, 85, 75, 65, 60, 55, 50 };

View File

@@ -69,10 +69,10 @@ namespace OpenRA.Mods.Common.Traits
readonly Actor self;
// A list of things we could possibly build
readonly Dictionary<ActorInfo, ProductionState> produceable = new Dictionary<ActorInfo, ProductionState>();
readonly Dictionary<ActorInfo, ProductionState> producible = new Dictionary<ActorInfo, ProductionState>();
readonly List<ProductionItem> queue = new List<ProductionItem>();
readonly IEnumerable<ActorInfo> allProduceables;
readonly IEnumerable<ActorInfo> buildableProduceables;
readonly IEnumerable<ActorInfo> allProducibles;
readonly IEnumerable<ActorInfo> buildableProducibles;
// Will change if the owner changes
PowerManager playerPower;
@@ -102,9 +102,9 @@ namespace OpenRA.Mods.Common.Traits
Faction = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : self.Owner.Faction.InternalName;
Enabled = !info.Factions.Any() || info.Factions.Contains(Faction);
CacheProduceables(playerActor);
allProduceables = produceable.Where(a => a.Value.Buildable || a.Value.Visible).Select(a => a.Key);
buildableProduceables = produceable.Where(a => a.Value.Buildable).Select(a => a.Key);
CacheProducibles(playerActor);
allProducibles = producible.Where(a => a.Value.Buildable || a.Value.Visible).Select(a => a.Key);
buildableProducibles = producible.Where(a => a.Value.Buildable).Select(a => a.Key);
}
void ClearQueue()
@@ -131,9 +131,9 @@ namespace OpenRA.Mods.Common.Traits
Enabled = !Info.Factions.Any() || Info.Factions.Contains(Faction);
}
// Regenerate the produceables and tech tree state
// Regenerate the producibles and tech tree state
oldOwner.PlayerActor.Trait<TechTree>().Remove(this);
CacheProduceables(newOwner.PlayerActor);
CacheProducibles(newOwner.PlayerActor);
newOwner.PlayerActor.Trait<TechTree>().Update();
}
@@ -145,9 +145,9 @@ namespace OpenRA.Mods.Common.Traits
public void OnTransform(Actor self) { }
public void AfterTransform(Actor self) { }
void CacheProduceables(Actor playerActor)
void CacheProducibles(Actor playerActor)
{
produceable.Clear();
producible.Clear();
if (!Enabled)
return;
@@ -157,7 +157,7 @@ namespace OpenRA.Mods.Common.Traits
{
var bi = a.TraitInfo<BuildableInfo>();
produceable.Add(a, new ProductionState());
producible.Add(a, new ProductionState());
ttc.Add(a.Name, bi.Prerequisites, bi.BuildLimit, this);
}
}
@@ -173,22 +173,22 @@ namespace OpenRA.Mods.Common.Traits
public void PrerequisitesAvailable(string key)
{
produceable[self.World.Map.Rules.Actors[key]].Buildable = true;
producible[self.World.Map.Rules.Actors[key]].Buildable = true;
}
public void PrerequisitesUnavailable(string key)
{
produceable[self.World.Map.Rules.Actors[key]].Buildable = false;
producible[self.World.Map.Rules.Actors[key]].Buildable = false;
}
public void PrerequisitesItemHidden(string key)
{
produceable[self.World.Map.Rules.Actors[key]].Visible = false;
producible[self.World.Map.Rules.Actors[key]].Visible = false;
}
public void PrerequisitesItemVisible(string key)
{
produceable[self.World.Map.Rules.Actors[key]].Visible = true;
producible[self.World.Map.Rules.Actors[key]].Visible = true;
}
public ProductionItem CurrentItem()
@@ -204,9 +204,9 @@ namespace OpenRA.Mods.Common.Traits
public virtual IEnumerable<ActorInfo> AllItems()
{
if (self.World.AllowDevCommands && developerMode.AllTech)
return produceable.Keys;
return producible.Keys;
return allProduceables;
return allProducibles;
}
public virtual IEnumerable<ActorInfo> BuildableItems()
@@ -214,15 +214,15 @@ namespace OpenRA.Mods.Common.Traits
if (!Enabled)
return Enumerable.Empty<ActorInfo>();
if (self.World.AllowDevCommands && developerMode.AllTech)
return produceable.Keys;
return producible.Keys;
return buildableProduceables;
return buildableProducibles;
}
public bool CanBuild(ActorInfo actor)
{
ProductionState ps;
if (!produceable.TryGetValue(actor, out ps))
if (!producible.TryGetValue(actor, out ps))
return false;
return ps.Buildable || (self.World.AllowDevCommands && developerMode.AllTech);
@@ -368,7 +368,7 @@ namespace OpenRA.Mods.Common.Traits
// Returns false if the unit can't be built
protected virtual bool BuildUnit(string name)
{
// Cannot produce if i'm dead
// Cannot produce if I'm dead
if (!self.IsInWorld || self.IsDead)
{
CancelProduction(name, 1);

View File

@@ -90,7 +90,7 @@ namespace OpenRA.Mods.Common.Traits
{
if (Holding)
{
// Hah! We met ths critical owned condition
// Hah! We met this critical owned condition
if (--TicksLeft == 0)
mo.MarkCompleted(player, objectiveID);
}

View File

@@ -122,7 +122,7 @@ namespace OpenRA.Mods.Common.Traits
WorldUtils.AreMutualAllies(a.Owner, currentOwner) || !CanBeCapturedBy(a));
}
// TODO exclude other NeutralActor that arent permanent
// TODO exclude other NeutralActor that aren't permanent
bool IsStillInRange(Actor self)
{
return UnitsInRange().Any(a => a.Owner == self.Owner && CanBeCapturedBy(a));
@@ -134,7 +134,7 @@ namespace OpenRA.Mods.Common.Traits
.Where(a => a.Owner != OriginalOwner && CanBeCapturedBy(a));
}
// TODO exclude other NeutralActor that arent permanent
// TODO exclude other NeutralActor that aren't permanent
Actor GetInRange(Actor self)
{
return CaptorsInRange(self).ClosestTo(self);

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Renders crates with both water and land variants.")]
class WithCrateBodyInfo : ITraitInfo, Requires<RenderSpritesInfo>, IRenderActorPreviewSpritesInfo
{
[Desc("Easteregg sequences to use in december.")]
[Desc("Easteregg sequences to use in December.")]
public readonly string[] XmasImages = { };
[SequenceReference] public readonly string IdleSequence = "idle";

View File

@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
if (discoverer != null && !string.IsNullOrEmpty(Info.Notification))
Game.Sound.PlayNotification(self.World.Map.Rules, discoverer, "Speech", Info.Notification, discoverer.Faction.InternalName);
// Radar notificaion
// Radar notification
if (Info.PingRadar && radarPings.Value != null)
radarPings.Value.Add(() => true, self.CenterPosition, Color.Red, 50);
}

View File

@@ -119,7 +119,7 @@ namespace OpenRA.Mods.Common.Traits
// Different upgradeable traits may define (a) different level ranges for the same upgrade type,
// and (b) multiple upgrade types for the same trait. The unrestricted level for each trait is
// tracked independently so that we can can correctly revoke levels without adding the burden of
// tracked independently so that we can correctly revoke levels without adding the burden of
// tracking both the overall (unclamped) and effective (clamped) levels on each individual trait.
void NotifyUpgradeLevelChanged(IEnumerable<IUpgradable> traits, Actor self, string upgrade, int levelAdjust)
{

View File

@@ -21,10 +21,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Number of ticks to wait before decreasing the effective move radius.")]
public readonly int TicksToWaitBeforeReducingMoveRadius = 5;
[Desc("Mimimum ammount of ticks the actor will sit idly before starting to wander.")]
[Desc("Minimum amount of ticks the actor will sit idly before starting to wander.")]
public readonly int MinMoveDelayInTicks = 0;
[Desc("Maximum ammount of ticks the actor will sit idly before starting to wander.")]
[Desc("Maximum amount of ticks the actor will sit idly before starting to wander.")]
public readonly int MaxMoveDelayInTicks = 0;
public abstract object Create(ActorInitializer init);

View File

@@ -86,7 +86,7 @@ namespace OpenRA.Mods.Common.Traits
foreach (var cell in dirtyCells)
{
// Select all neighbors inside the map boundries
// Select all neighbors inside the map boundaries
var thisCell = cell; // benign closure hazard
var neighbors = CVec.Directions.Select(d => d + thisCell)
.Where(c => map.Contains(c));

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly string Name = null;
[Desc("Map listed indices to shadow.")]
public readonly int[] ShadowIndex = { };
[Desc("Apply palette rotatotors or not.")]
[Desc("Apply palette rotators or not.")]
public readonly bool AllowModifiers = true;
public object Create(ActorInitializer init) { return new PlayerPaletteFromCurrentTileset(init.World, this); }

View File

@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Traits
public void WorldLoaded(World w, WorldRenderer wr)
{
// NOTE(jsd): 32 seems a sane default initial capacity for the total # of harvesters in a game. Purely a guesstimate.
// 32 seems a sane default initial capacity for the total # of harvesters in a game. Purely a guesstimate.
claimByCell = new Dictionary<CPos, ResourceClaim>(32);
claimByActor = new Dictionary<Actor, ResourceClaim>(32);
}

View File

@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Traits
{
var actorReference = new ActorReference(kv.Value.Value, kv.Value.ToDictionary());
// if there is no real player associated, dont spawn it.
// If there is no real player associated, don't spawn it.
var ownerName = actorReference.InitDict.Get<OwnerInit>().PlayerName;
if (!world.Players.Any(p => p.InternalName == ownerName))
continue;

View File

@@ -270,7 +270,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
// AttackMove was generalized to support all moveable actor types
// AttackMove was generalized to support all movable actor types
if (engineVersion < 20140116)
{
if (depth == 1 && node.Key == "AttackMove")

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Widgets
public Func<int> GetPercentage;
public Func<bool> IsIndeterminate;
// Indeterminant bar properties
// Indeterminate bar properties
float offset = 0f;
float tickStep = 0.04f;

View File

@@ -87,7 +87,7 @@ namespace OpenRA.Mods.Common.Widgets
RenderBounds.X + (RenderBounds.Width - scale * video.Width) / 2,
RenderBounds.Y + (RenderBounds.Height - scale * video.Height * AspectRatio) / 2);
// Round size to integer pixels. Round up to be consistent with the scale calcuation.
// Round size to integer pixels. Round up to be consistent with the scale calculation.
videoSize = new float2((int)Math.Ceiling(video.Width * scale), (int)Math.Ceiling(video.Height * AspectRatio * scale));
if (!DrawOverlay)