fix indents everywhere

This commit is contained in:
Chris Forbes
2011-10-18 15:10:17 +13:00
parent 227bbc109e
commit bc6af1841b
180 changed files with 2707 additions and 2707 deletions

View File

@@ -37,7 +37,7 @@ namespace OpenRA.Traits
{
var paletteName = "{0}{1}".F( info.BaseName, owner.InternalName );
var newpal = new Palette(wr.GetPalette(info.BasePalette),
new PlayerColorRemap(owner.ColorRamp, info.PaletteFormat));
new PlayerColorRemap(owner.ColorRamp, info.PaletteFormat));
wr.AddPalette(paletteName, newpal);
}
}

View File

@@ -64,16 +64,16 @@ namespace OpenRA.Traits
for (int x = map.Bounds.Left; x < map.Bounds.Right; x++)
for (int y = map.Bounds.Top; y < map.Bounds.Bottom; y++)
{
var type = resourceTypes.FirstOrDefault(
var type = resourceTypes.FirstOrDefault(
r => r.info.ResourceType == w.Map.MapResources.Value[x, y].type);
if (type == null)
continue;
if (type == null)
continue;
if (!AllowResourceAt(type, new int2(x,y)))
continue;
content[x, y].type = type;
content[x, y].type = type;
content[x, y].image = ChooseContent(type);
}
@@ -86,13 +86,13 @@ namespace OpenRA.Traits
}
}
public bool AllowResourceAt(ResourceType rt, int2 a)
{
if (!world.Map.IsInMap(a.X, a.Y)) return false;
if (!rt.info.AllowedTerrainTypes.Contains(world.GetTerrainInfo(a).Type)) return false;
if (!rt.info.AllowUnderActors && world.ActorMap.AnyUnitsAt(a)) return false;
return true;
}
public bool AllowResourceAt(ResourceType rt, int2 a)
{
if (!world.Map.IsInMap(a.X, a.Y)) return false;
if (!rt.info.AllowedTerrainTypes.Contains(world.GetTerrainInfo(a).Type)) return false;
if (!rt.info.AllowUnderActors && world.ActorMap.AnyUnitsAt(a)) return false;
return true;
}
Sprite[] ChooseContent(ResourceType t)
{

View File

@@ -22,8 +22,8 @@ namespace OpenRA.Traits
public readonly string Name = null;
public readonly string TerrainType = "Ore";
public readonly string[] AllowedTerrainTypes = { };
public readonly bool AllowUnderActors = false;
public readonly string[] AllowedTerrainTypes = { };
public readonly bool AllowUnderActors = false;
public Sprite[][] Sprites;
public int PaletteIndex;

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Traits
public class ScreenShaker : ITick
{
int ticks = 0;
List<ShakeEffect> shakeEffects = new List<ShakeEffect>();
List<ShakeEffect> shakeEffects = new List<ShakeEffect>();
public void Tick (Actor self)
{

View File

@@ -78,7 +78,7 @@ namespace OpenRA.Traits
return;
if (a.Owner == null || a.Owner.World.LocalPlayer == null
|| a.Owner.Stances[a.Owner.World.LocalPlayer] != Stance.Ally) return;
|| a.Owner.Stances[a.Owner.World.LocalPlayer] != Stance.Ally) return;
if (vis.ContainsKey(a))
{
@@ -160,7 +160,7 @@ namespace OpenRA.Traits
public void UpdateActor(Actor a)
{
if (a.Owner == null || a.Owner.World.LocalPlayer == null
|| a.Owner.Stances[a.Owner.World.LocalPlayer] != Stance.Ally) return;
|| a.Owner.Stances[a.Owner.World.LocalPlayer] != Stance.Ally) return;
RemoveActor(a); AddActor(a);
}