Formatting fixes.
Spaces to tabs, indents, etc.
This commit is contained in:
@@ -881,7 +881,7 @@ namespace OpenRA.Mods.RA.AI
|
||||
|
||||
// Protected harvesters or building
|
||||
if ((self.HasTrait<Harvester>() || self.HasTrait<Building>()) &&
|
||||
p.Stances[e.Attacker.Owner] == Stance.Enemy)
|
||||
p.Stances[e.Attacker.Owner] == Stance.Enemy)
|
||||
{
|
||||
defenseCenter = e.Attacker.Location;
|
||||
ProtectOwn(e.Attacker);
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.RA.Air
|
||||
return this;
|
||||
|
||||
if (HeliFly.AdjustAltitude(self, helicopter, helicopter.Info.LandAltitude))
|
||||
return this;
|
||||
return this;
|
||||
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace OpenRA.Mods.RA
|
||||
foreach (var a in Armaments.Where(a => a.Info.Name == info.Guns))
|
||||
{
|
||||
if (!target.IsInRange(self.CenterPosition, a.Weapon.Range))
|
||||
continue;
|
||||
continue;
|
||||
|
||||
var t = Target.FromPos(cp - new WVec(0, a.Weapon.Range.Range / 2, cp.Z).Rotate(WRot.FromFacing(f)));
|
||||
inAttackRange = true;
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
// This isn't the bridge you're looking for
|
||||
if (!w.Map.IsInMap(x, y) || w.Map.MapTiles.Value[x, y].Type != tile ||
|
||||
w.Map.MapTiles.Value[x, y].Index != ind)
|
||||
w.Map.MapTiles.Value[x, y].Index != ind)
|
||||
continue;
|
||||
|
||||
subTiles.Add(new CPos(x, y), ind);
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace OpenRA.Mods.RA
|
||||
// Steal and reset the owners exploration
|
||||
infiltrator.Owner.Shroud.Explore(self.Owner.Shroud);
|
||||
if (!self.Owner.HasFogVisibility())
|
||||
self.Owner.Shroud.ResetExploration();
|
||||
self.Owner.Shroud.ResetExploration();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ namespace OpenRA.Mods.RA.Move
|
||||
|
||||
public void SetPosition(Actor self, CPos cell)
|
||||
{
|
||||
SetLocation(cell,fromSubCell, cell,fromSubCell);
|
||||
SetLocation(cell, fromSubCell, cell, fromSubCell);
|
||||
SetVisualPosition(self, fromCell.CenterPosition + MobileInfo.SubCellOffsets[fromSubCell]);
|
||||
FinishedMoving(self);
|
||||
}
|
||||
@@ -225,7 +225,7 @@ namespace OpenRA.Mods.RA.Move
|
||||
public void SetPosition(Actor self, WPos pos)
|
||||
{
|
||||
var cell = pos.ToCPos();
|
||||
SetLocation(cell,fromSubCell, cell,fromSubCell);
|
||||
SetLocation(cell, fromSubCell, cell, fromSubCell);
|
||||
SetVisualPosition(self, pos);
|
||||
FinishedMoving(self);
|
||||
}
|
||||
@@ -355,14 +355,14 @@ namespace OpenRA.Mods.RA.Move
|
||||
|
||||
public string VoicePhraseForOrder(Actor self, Order order)
|
||||
{
|
||||
switch( order.OrderString )
|
||||
switch (order.OrderString)
|
||||
{
|
||||
case "Move":
|
||||
case "Scatter":
|
||||
case "Stop":
|
||||
return "Move";
|
||||
default:
|
||||
return null;
|
||||
case "Move":
|
||||
case "Scatter":
|
||||
case "Stop":
|
||||
return "Move";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ namespace OpenRA.Mods.RA.Move
|
||||
return new[]{ fromSubCell, SubCell.TopLeft, SubCell.TopRight, SubCell.Center,
|
||||
SubCell.BottomLeft, SubCell.BottomRight}.First(b =>
|
||||
{
|
||||
var blockingActors = self.World.ActorMap.GetUnitsAt(a,b).Where(c => c != ignoreActor);
|
||||
var blockingActors = self.World.ActorMap.GetUnitsAt(a, b).Where(c => c != ignoreActor);
|
||||
if (blockingActors.Any())
|
||||
{
|
||||
// Non-sharable unit can enter a cell with shareable units only if it can crush all of them
|
||||
@@ -577,5 +577,5 @@ namespace OpenRA.Mods.RA.Move
|
||||
var facing = Util.GetFacing(toPos - fromPos, Facing);
|
||||
return Util.SequenceActivities(new Turn(facing), new Drag(fromPos, toPos, length));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
public static bool HasFogVisibility( this Player a )
|
||||
{
|
||||
var gpsWatcher = a.PlayerActor.TraitOrDefault<GpsWatcher>();
|
||||
var gpsWatcher = a.PlayerActor.TraitOrDefault<GpsWatcher>();
|
||||
return gpsWatcher != null && (gpsWatcher.Granted || gpsWatcher.GrantedAllies);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
var position = self.CenterPosition;
|
||||
if (position.Z > 0 && self.GetDamageState() >= info.MinDamage &&
|
||||
!self.World.FogObscures(position.ToCPos()))
|
||||
!self.World.FogObscures(position.ToCPos()))
|
||||
{
|
||||
var offset = info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation));
|
||||
var pos = position + body.LocalToWorld(offset);
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
|
||||
panel.Get<LabelWidget>("TIME_LABEL").GetText = () => (currentSong == null) ? "" :
|
||||
"{0:D2}:{1:D2} / {2:D2}:{3:D2}".F((int)Sound.MusicSeekPosition / 60, (int)Sound.MusicSeekPosition % 60,
|
||||
currentSong.Length / 60, currentSong.Length % 60);
|
||||
currentSong.Length / 60, currentSong.Length % 60);
|
||||
|
||||
var musicSlider = panel.Get<SliderWidget>("MUSIC_SLIDER");
|
||||
musicSlider.OnChange += x => Sound.MusicVolume = x;
|
||||
|
||||
Reference in New Issue
Block a user