rename WRange to WDist

This commit is contained in:
Matthias Mailänder
2015-07-06 16:35:15 +02:00
parent 54e1cf866c
commit 7447e0bf93
100 changed files with 244 additions and 244 deletions

View File

@@ -28,7 +28,7 @@ namespace OpenRA.Mods.RA.Activities
int ticks;
WAngle angle;
public Leap(Actor self, Actor target, WeaponInfo weapon, WRange speed, WAngle angle)
public Leap(Actor self, Actor target, WeaponInfo weapon, WDist speed, WAngle angle)
{
var targetMobile = target.TraitOrDefault<Mobile>();
if (targetMobile == null)

View File

@@ -107,8 +107,8 @@ namespace OpenRA.Mods.RA.Graphics
var renderables = new List<IFinalizedRenderable>();
if (Game.CosmeticRandom.Next(2) != 0)
{
var p1 = from + (1 / 3f) * dist + WRange.FromPDF(Game.CosmeticRandom, 2).Range * dist.Length / 4096 * norm;
var p2 = from + (2 / 3f) * dist + WRange.FromPDF(Game.CosmeticRandom, 2).Range * dist.Length / 4096 * norm;
var p1 = from + (1 / 3f) * dist + WDist.FromPDF(Game.CosmeticRandom, 2).Range * dist.Length / 4096 * norm;
var p2 = from + (2 / 3f) * dist + WDist.FromPDF(Game.CosmeticRandom, 2).Range * dist.Length / 4096 * norm;
renderables.AddRange(DrawZap(wr, from, p1, s, out p1, pal));
renderables.AddRange(DrawZap(wr, p1, p2, s, out p2, pal));
@@ -116,7 +116,7 @@ namespace OpenRA.Mods.RA.Graphics
}
else
{
var p1 = from + (1 / 2f) * dist + WRange.FromPDF(Game.CosmeticRandom, 2).Range * dist.Length / 4096 * norm;
var p1 = from + (1 / 2f) * dist + WDist.FromPDF(Game.CosmeticRandom, 2).Range * dist.Length / 4096 * norm;
renderables.AddRange(DrawZap(wr, from, p1, s, out p1, pal));
renderables.AddRange(DrawZap(wr, p1, to, s, out z, pal));

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Mods.RA.Traits
class AttackLeapInfo : AttackFrontalInfo
{
[Desc("Leap speed (in units/tick).")]
public readonly WRange Speed = new WRange(426);
public readonly WDist Speed = new WDist(426);
public readonly WAngle Angle = WAngle.FromDegrees(20);
public override object Create(ActorInitializer init) { return new AttackLeap(init.Self, this); }

View File

@@ -198,7 +198,7 @@ namespace OpenRA.Mods.RA.Traits
yield return new RangeCircleRenderable(
self.CenterPosition,
WRange.FromCells(self.Trait<PortableChrono>().Info.MaxDistance),
WDist.FromCells(self.Trait<PortableChrono>().Info.MaxDistance),
0,
Color.FromArgb(128, Color.LawnGreen),
Color.FromArgb(96, Color.Black));

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.RA.Traits
{
yield return new RangeCircleRenderable(
centerPosition,
WRange.FromCells(jamsMissiles.Range),
WDist.FromCells(jamsMissiles.Range),
0,
Color.FromArgb(128, Color.Red),
Color.FromArgb(96, Color.Black));
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.RA.Traits
{
yield return new RangeCircleRenderable(
centerPosition,
WRange.FromCells(jamsRadar.Range),
WDist.FromCells(jamsRadar.Range),
0,
Color.FromArgb(128, Color.Blue),
Color.FromArgb(96, Color.Black));
@@ -69,7 +69,7 @@ namespace OpenRA.Mods.RA.Traits
{
yield return new RangeCircleRenderable(
self.CenterPosition,
WRange.FromCells(jamsMissiles.Range),
WDist.FromCells(jamsMissiles.Range),
0,
Color.FromArgb(128, Color.Red),
Color.FromArgb(96, Color.Black));
@@ -80,7 +80,7 @@ namespace OpenRA.Mods.RA.Traits
{
yield return new RangeCircleRenderable(
self.CenterPosition,
WRange.FromCells(jamsRadar.Range),
WDist.FromCells(jamsRadar.Range),
0,
Color.FromArgb(128, Color.Blue),
Color.FromArgb(96, Color.Black));

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Mods.RA.Traits
public readonly int QuantizedFacings = 32;
[Desc("Spawn and remove the plane this far outside the map.")]
public readonly WRange Cordon = new WRange(5120);
public readonly WDist Cordon = new WDist(5120);
[ActorReference]
[Desc("Troops to be delivered. They will be distributed between the planes if SquadSize > 1.")]
@@ -47,7 +47,7 @@ namespace OpenRA.Mods.RA.Traits
public readonly int CameraRemoveDelay = 85;
[Desc("Weapon range offset to apply during the beacon clock calculation.")]
public readonly WRange BeaconDistanceOffset = WRange.FromCells(4);
public readonly WDist BeaconDistanceOffset = WDist.FromCells(4);
public override object Create(ActorInitializer init) { return new ParatroopersPower(init.Self, this); }
}