Formatting fixes.

Spaces to tabs, indents, etc.
This commit is contained in:
RoosterDragon
2014-05-23 15:22:16 +01:00
parent d6fe3c5fc3
commit 0c8bdff5be
18 changed files with 69 additions and 69 deletions

View File

@@ -85,7 +85,7 @@ namespace OpenRA
{
var si = Info.Traits.GetOrDefault<SelectableInfo>();
var size = (si != null && si.Bounds != null) ? new int2(si.Bounds[0], si.Bounds[1]) :
TraitsImplementing<IAutoSelectionSize>().Select(x => x.SelectionSize(this)).FirstOrDefault();
TraitsImplementing<IAutoSelectionSize>().Select(x => x.SelectionSize(this)).FirstOrDefault();
var offset = -size / 2;
if (si != null && si.Bounds != null && si.Bounds.Length > 2)

View File

@@ -69,7 +69,7 @@ namespace OpenRA.FileSystem
index = entries.ToDictionaryWithConflictLog(x => x.Hash,
"{0} ({1} format, Encrypted: {2}, DataStart: {3})".F(filename, (isCncMix ? "C&C" : "RA/TS/RA2"), isEncrypted, dataStart),
null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)
null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)
);
}

View File

@@ -185,7 +185,7 @@ namespace OpenRA.GameRules
var cellInfo = world.GetTerrainInfo(cell);
if (!ValidTargets.Intersect(cellInfo.TargetTypes).Any()
|| InvalidTargets.Intersect(cellInfo.TargetTypes).Any())
|| InvalidTargets.Intersect(cellInfo.TargetTypes).Any())
return false;
return true;

View File

@@ -71,7 +71,7 @@ namespace OpenRA.Scripting
throw new InvalidOperationException("[LuaGlobal] attribute not found for global table '{0}'".F(type));
Name = names.First().Name;
Bind(new [] { this });
Bind(new[] { this });
}
}
@@ -143,7 +143,7 @@ namespace OpenRA.Scripting
if (ctor == null)
throw new InvalidOperationException("{0} must define a constructor that takes a ScriptContext context parameter".F(b.Name));
var binding = (ScriptGlobal)ctor.Invoke(new [] { this });
var binding = (ScriptGlobal)ctor.Invoke(new[] { this });
using (var obj = binding.ToLuaValue(this))
registerGlobal.Call(binding.Name, obj).Dispose();
}

View File

@@ -50,7 +50,7 @@ namespace OpenRA
static void EmitSyncOpcodes(Type type, ILGenerator il)
{
if (hashFunctions.ContainsKey(type))
il.EmitCall(OpCodes.Call, hashFunctions[type], null);
il.EmitCall(OpCodes.Call, hashFunctions[type], null);
else if (type == typeof(bool))
{
var l = il.DefineLabel();

View File

@@ -162,8 +162,8 @@ namespace OpenRA.Traits
};
foreach (var s in states)
if (state >= s.First && anim.HasSequence(s.Second+baseSequence))
return s.Second+baseSequence;
if (state >= s.First && anim.HasSequence(s.Second + baseSequence))
return s.Second + baseSequence;
return baseSequence;
}

View File

@@ -113,7 +113,7 @@ namespace OpenRA.Traits
void DrawTags(WorldRenderer wr, Actor self, int2 basePosition)
{
if (!self.Owner.IsAlliedWith(self.World.RenderPlayer))
return;
return;
var tagImages = new Animation(self.World, "pips");
var pal = wr.Palette(Info.Palette);

View File

@@ -107,7 +107,7 @@ namespace OpenRA.Widgets
if (ps.HasFlags(PanelSides.Center) && ss[8] != null)
FillRectWithSprite(new Rectangle(bounds.Left + marginLeft, bounds.Top + marginTop,
bounds.Width - marginWidth, bounds.Height - marginHeight),
ss[8]);
ss[8]);
// Left border
if (ps.HasFlags(PanelSides.Left) && ss[2] != null)