rename WRange to WDist
This commit is contained in:
@@ -21,8 +21,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public class AircraftInfo : ITraitInfo, IFacingInfo, IOccupySpaceInfo, ICruiseAltitudeInfo, UsesInit<LocationInit>, UsesInit<FacingInit>
|
||||
{
|
||||
public readonly WRange CruiseAltitude = new WRange(1280);
|
||||
public readonly WRange IdealSeparation = new WRange(1706);
|
||||
public readonly WDist CruiseAltitude = new WDist(1280);
|
||||
public readonly WDist IdealSeparation = new WDist(1706);
|
||||
[Desc("Whether the aircraft can be repulsed.")]
|
||||
public readonly bool Repulsable = true;
|
||||
[Desc("The speed at which the aircraft is repulsed from other aircraft. Specify -1 for normal movement speed.")]
|
||||
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public virtual object Create(ActorInitializer init) { return new Aircraft(init, this); }
|
||||
public int GetInitialFacing() { return InitialFacing; }
|
||||
public WRange GetCruiseAltitude() { return CruiseAltitude; }
|
||||
public WDist GetCruiseAltitude() { return CruiseAltitude; }
|
||||
|
||||
[VoiceReference] public readonly string Voice = "Action";
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public readonly bool Spins = true;
|
||||
public readonly bool Moves = false;
|
||||
public readonly WRange Velocity = new WRange(43);
|
||||
public readonly WDist Velocity = new WDist(43);
|
||||
|
||||
public object Create(ActorInitializer init) { return new FallsToEarth(init.Self, this); }
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
[Desc("Allow the helicopter turn before landing.")]
|
||||
public readonly bool TurnToLand = false;
|
||||
public readonly WRange LandAltitude = WRange.Zero;
|
||||
public readonly WDist LandAltitude = WDist.Zero;
|
||||
|
||||
[Desc("How fast the helicopter ascends or descends.")]
|
||||
public readonly WRange AltitudeVelocity = new WRange(43);
|
||||
public readonly WDist AltitudeVelocity = new WDist(43);
|
||||
|
||||
public override object Create(ActorInitializer init) { return new Helicopter(init, this); }
|
||||
}
|
||||
@@ -145,9 +145,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public Activity MoveTo(CPos cell, int nearEnough) { return new HeliFly(self, Target.FromCell(self.World, cell)); }
|
||||
public Activity MoveTo(CPos cell, Actor ignoredActor) { return new HeliFly(self, Target.FromCell(self.World, cell)); }
|
||||
public Activity MoveWithinRange(Target target, WRange range) { return new HeliFly(self, target, WRange.Zero, range); }
|
||||
public Activity MoveWithinRange(Target target, WRange minRange, WRange maxRange) { return new HeliFly(self, target, minRange, maxRange); }
|
||||
public Activity MoveFollow(Actor self, Target target, WRange minRange, WRange maxRange) { return new Follow(self, target, minRange, maxRange); }
|
||||
public Activity MoveWithinRange(Target target, WDist range) { return new HeliFly(self, target, WDist.Zero, range); }
|
||||
public Activity MoveWithinRange(Target target, WDist minRange, WDist maxRange) { return new HeliFly(self, target, minRange, maxRange); }
|
||||
public Activity MoveFollow(Actor self, Target target, WDist minRange, WDist maxRange) { return new Follow(self, target, minRange, maxRange); }
|
||||
public CPos NearestMoveableCell(CPos cell) { return cell; }
|
||||
|
||||
public Activity MoveIntoWorld(Actor self, CPos cell, SubCell subCell = SubCell.Any)
|
||||
|
||||
@@ -128,13 +128,13 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public Activity MoveTo(CPos cell, int nearEnough) { return Util.SequenceActivities(new Fly(self, Target.FromCell(self.World, cell)), new FlyCircle(self)); }
|
||||
public Activity MoveTo(CPos cell, Actor ignoredActor) { return Util.SequenceActivities(new Fly(self, Target.FromCell(self.World, cell)), new FlyCircle(self)); }
|
||||
public Activity MoveWithinRange(Target target, WRange range) { return Util.SequenceActivities(new Fly(self, target, WRange.Zero, range), new FlyCircle(self)); }
|
||||
public Activity MoveWithinRange(Target target, WRange minRange, WRange maxRange)
|
||||
public Activity MoveWithinRange(Target target, WDist range) { return Util.SequenceActivities(new Fly(self, target, WDist.Zero, range), new FlyCircle(self)); }
|
||||
public Activity MoveWithinRange(Target target, WDist minRange, WDist maxRange)
|
||||
{
|
||||
return Util.SequenceActivities(new Fly(self, target, minRange, maxRange), new FlyCircle(self));
|
||||
}
|
||||
|
||||
public Activity MoveFollow(Actor self, Target target, WRange minRange, WRange maxRange) { return new FlyFollow(self, target, minRange, maxRange); }
|
||||
public Activity MoveFollow(Actor self, Target target, WDist minRange, WDist maxRange) { return new FlyFollow(self, target, minRange, maxRange); }
|
||||
public CPos NearestMoveableCell(CPos cell) { return cell; }
|
||||
|
||||
public Activity MoveIntoWorld(Actor self, CPos cell, SubCell subCell = SubCell.Any) { return new Fly(self, Target.FromCell(self.World, cell)); }
|
||||
@@ -143,7 +143,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return Util.SequenceActivities(new CallFunc(() => SetVisualPosition(self, fromPos)), new Fly(self, Target.FromPos(toPos)));
|
||||
}
|
||||
|
||||
public Activity MoveToTarget(Actor self, Target target) { return new Fly(self, target, WRange.FromCells(3), WRange.FromCells(5)); }
|
||||
public Activity MoveToTarget(Actor self, Target target) { return new Fly(self, target, WDist.FromCells(3), WDist.FromCells(5)); }
|
||||
public Activity MoveIntoTarget(Actor self, Target target) { return new Land(self, target); }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user