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

@@ -54,7 +54,7 @@ namespace OpenRA.Mods.D2k.Activities
{
case State.Intercept:
state = State.LockCarryable;
return Util.SequenceActivities(movement.MoveWithinRange(Target.FromActor(cargo), WRange.FromCells(4)), this);
return Util.SequenceActivities(movement.MoveWithinRange(Target.FromActor(cargo), WDist.FromCells(4)), this);
case State.LockCarryable:
// Last check

View File

@@ -23,10 +23,10 @@ namespace OpenRA.Mods.D2k.Traits
public readonly int[] Falloff = { 100, 100, 25, 11, 6, 4, 3, 2, 1, 0 };
[Desc("Range between falloff steps.")]
public readonly WRange Spread = new WRange(3072);
public readonly WDist Spread = new WDist(3072);
[Desc("Ranges at which each Falloff step is defined. Overrides Spread.")]
public WRange[] Range = null;
public WDist[] Range = null;
public override object Create(ActorInitializer init) { return new AttractsWorms(init, this); }
}

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.D2k.Traits
public class CarryableInfo : ITraitInfo
{
[Desc("Required distance away from destination before requesting a pickup. Default is 6 cells.")]
public WRange MinDistance = WRange.FromCells(6);
public WDist MinDistance = WDist.FromCells(6);
public object Create(ActorInitializer init) { return new Carryable(init.Self, this); }
}
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.D2k.Traits
public void MovingToResources(Actor self, CPos targetCell, Activity next) { RequestTransport(targetCell, next); }
public void MovingToRefinery(Actor self, CPos targetCell, Activity next) { RequestTransport(targetCell, next); }
public WRange MinimumDistance { get { return info.MinDistance; } }
public WDist MinimumDistance { get { return info.MinDistance; } }
public void RequestTransport(CPos destination, Activity afterLandActivity)
{

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.D2k.Traits
public class Carryall : INotifyBecomingIdle, INotifyKilled, ISync, IRender, INotifyActorDisposing
{
readonly Actor self;
readonly WRange carryHeight;
readonly WDist carryHeight;
readonly CarryallInfo info;
// The actor we are currently carrying.

View File

@@ -21,10 +21,10 @@ namespace OpenRA.Mods.D2k.Traits
public readonly int TargetRescanInterval = 32;
[Desc("The radius in which the worm \"searches\" for targets.")]
public readonly WRange MaxSearchRadius = WRange.FromCells(27);
public readonly WDist MaxSearchRadius = WDist.FromCells(27);
[Desc("The range at which the worm launches an attack regardless of noise levels.")]
public readonly WRange IgnoreNoiseAttackRange = WRange.FromCells(3);
public readonly WDist IgnoreNoiseAttackRange = WDist.FromCells(3);
[Desc("The chance this actor has of disappearing after it attacks (in %).")]
public readonly int ChanceToDisappear = 80;
@@ -83,7 +83,7 @@ namespace OpenRA.Mods.D2k.Traits
if (IsMovingTowardTarget)
return;
self.QueueActivity(mobile.Value.MoveWithinRange(Target.FromCell(self.World, targetCell, SubCell.Any), WRange.FromCells(1)));
self.QueueActivity(mobile.Value.MoveWithinRange(Target.FromCell(self.World, targetCell, SubCell.Any), WDist.FromCells(1)));
}
public void Tick(Actor self)

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.D2k.Traits
[WeaponReference]
public string[] Weapons = { };
public int[] Pieces = { 3, 10 };
public WRange[] Range = { WRange.FromCells(2), WRange.FromCells(5) };
public WDist[] Range = { WDist.FromCells(2), WDist.FromCells(5) };
public object Create(ActorInitializer actor) { return new ThrowsShrapnel(this); }
}

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Mods.D2k.Warheads
[Desc("Duration of the owner change (in ticks). Set to 0 to make it permanent.")]
public readonly int Duration = 0;
public readonly WRange Range = WRange.FromCells(1);
public readonly WDist Range = WDist.FromCells(1);
public override void DoImpact(Target target, Actor firedBy, IEnumerable<int> damageModifiers)
{