StyleCop clean OpenRA.Game
This commit is contained in:
@@ -150,7 +150,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
if (anim == null || ticks >= length)
|
||||
yield break;
|
||||
|
||||
var cell = wr.world.Map.CellContaining(pos);
|
||||
var cell = wr.World.Map.CellContaining(pos);
|
||||
if (!args.SourceActor.World.FogObscures(cell))
|
||||
{
|
||||
if (info.Shadow)
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
[Desc("Use player remap color instead of a custom color?")]
|
||||
public readonly bool UsePlayerColor = true;
|
||||
|
||||
public object Create(ActorInitializer init) { return new Contrail(init.self, this); }
|
||||
public object Create(ActorInitializer init) { return new Contrail(init.Self, this); }
|
||||
}
|
||||
|
||||
class Contrail : ITick, IRender
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
|
||||
public IEnumerable<IRenderable> Render(WorldRenderer wr)
|
||||
{
|
||||
if (wr.world.FogObscures(wr.world.Map.CellContaining(pos)))
|
||||
if (wr.World.FogObscures(wr.World.Map.CellContaining(pos)))
|
||||
yield break;
|
||||
|
||||
yield return new TextRenderable(font, pos, 0, color, text);
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
|
||||
public IEnumerable<IRenderable> Render(WorldRenderer wr)
|
||||
{
|
||||
var cell = wr.world.Map.CellContaining(pos);
|
||||
var cell = wr.World.Map.CellContaining(pos);
|
||||
if (!args.SourceActor.World.FogObscures(cell))
|
||||
{
|
||||
if (info.Shadow)
|
||||
|
||||
@@ -83,8 +83,8 @@ namespace OpenRA.Mods.Common.Effects
|
||||
|
||||
public IEnumerable<IRenderable> Render(WorldRenderer wr)
|
||||
{
|
||||
if (wr.world.FogObscures(wr.world.Map.CellContaining(target)) &&
|
||||
wr.world.FogObscures(wr.world.Map.CellContaining(args.Source)))
|
||||
if (wr.World.FogObscures(wr.World.Map.CellContaining(target)) &&
|
||||
wr.World.FogObscures(wr.World.Map.CellContaining(args.Source)))
|
||||
yield break;
|
||||
|
||||
if (ticks < info.BeamDuration)
|
||||
|
||||
@@ -202,7 +202,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
if (info.ContrailLength > 0)
|
||||
yield return trail;
|
||||
|
||||
if (!args.SourceActor.World.FogObscures(wr.world.Map.CellContaining(pos)))
|
||||
if (!args.SourceActor.World.FogObscures(wr.World.Map.CellContaining(pos)))
|
||||
{
|
||||
if (info.Shadow)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
|
||||
public IEnumerable<IRenderable> Render(WorldRenderer wr)
|
||||
{
|
||||
if (a.Destroyed || wr.world.FogObscures(a))
|
||||
if (a.Destroyed || wr.World.FogObscures(a))
|
||||
return SpriteRenderable.None;
|
||||
|
||||
return anim.Render(a.CenterPosition, wr.Palette("chrome"));
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
if (!building.IsInWorld || !building.World.Selection.Actors.Contains(building))
|
||||
return SpriteRenderable.None;
|
||||
|
||||
var pos = wr.world.Map.CenterOfCell(cachedLocation);
|
||||
var pos = wr.World.Map.CenterOfCell(cachedLocation);
|
||||
var palette = wr.Palette(palettePrefix + building.Owner.InternalName);
|
||||
return circles.Render(pos, palette).Concat(flag.Render(pos, palette));
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
if (!self.Owner.IsAlliedWith(self.World.RenderPlayer))
|
||||
yield break;
|
||||
|
||||
if (wr.world.FogObscures(self))
|
||||
if (wr.World.FogObscures(self))
|
||||
yield break;
|
||||
|
||||
var pos = wr.ScreenPxPosition(self.CenterPosition);
|
||||
|
||||
Reference in New Issue
Block a user