Merge pull request #10121 from RoosterDragon/spelling
Fix some spellings
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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); }
|
||||
|
||||
@@ -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; },
|
||||
|
||||
@@ -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.")]
|
||||
|
||||
@@ -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); }
|
||||
|
||||
@@ -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 };
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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); }
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user