Merge pull request #7467 from ScottNZ/stylecop-fixes
Brace style fixes.
This commit is contained in:
@@ -41,9 +41,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
harv.LinkProc(self, harv.OwnerLinkedProc);
|
||||
}
|
||||
|
||||
if (harv.LinkedProc == null || !harv.LinkedProc.IsInWorld)
|
||||
harv.ChooseNewProc(self, null);
|
||||
|
||||
@@ -137,9 +137,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
|
||||
if (ticks++ >= length || (!info.High && world.ActorMap
|
||||
.GetUnitsAt(world.Map.CellContaining(pos)).Any(a => a.HasTrait<IBlocksBullets>())))
|
||||
{
|
||||
Explode(world);
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<IRenderable> Render(WorldRenderer wr)
|
||||
|
||||
@@ -295,9 +295,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
ToSubCell = FromSubCell = info.SharesCell ? init.World.Map.DefaultSubCell : SubCell.FullCell;
|
||||
if (init.Contains<SubCellInit>())
|
||||
{
|
||||
FromSubCell = ToSubCell = init.Get<SubCellInit, SubCell>();
|
||||
}
|
||||
|
||||
if (init.Contains<LocationInit>())
|
||||
{
|
||||
|
||||
@@ -63,9 +63,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
if (!self.World.CanPlaceBuilding(order.TargetString, buildingInfo, order.TargetLocation, null)
|
||||
|| !buildingInfo.IsCloseEnoughToBase(self.World, order.Player, order.TargetString, order.TargetLocation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var building = w.CreateActor(order.TargetString, new TypeDictionary
|
||||
{
|
||||
|
||||
@@ -284,18 +284,15 @@ namespace OpenRA.Mods.Common.Traits
|
||||
BeginProduction(new ProductionItem(this, order.TargetString, cost, playerPower, () => self.World.AddFrameEndTask(_ =>
|
||||
{
|
||||
var isBuilding = unit.Traits.Contains<BuildingInfo>();
|
||||
|
||||
if (isBuilding && !hasPlayedSound)
|
||||
{
|
||||
hasPlayedSound = Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", Info.ReadyAudio, self.Owner.Country.Race);
|
||||
}
|
||||
else if (!isBuilding)
|
||||
{
|
||||
if (BuildUnit(order.TargetString))
|
||||
Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", Info.ReadyAudio, self.Owner.Country.Race);
|
||||
else if (!hasPlayedSound && time > 0)
|
||||
{
|
||||
hasPlayedSound = Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", Info.BlockedAudio, self.Owner.Country.Race);
|
||||
}
|
||||
}
|
||||
})));
|
||||
}
|
||||
|
||||
@@ -127,9 +127,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
plane.QueueActivity(new RemoveSelf());
|
||||
}
|
||||
else
|
||||
{
|
||||
w.CreateActor(crateActor, new TypeDictionary { new OwnerInit(w.WorldActor.Owner), new LocationInit(p) });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -224,9 +224,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
if (node.Value.Nodes.Any(n => n.Key.StartsWith("RequiresPower"))
|
||||
&& !node.Value.Nodes.Any(n => n.Key.StartsWith("DisabledOverlay")))
|
||||
{
|
||||
node.Value.Nodes.Add(new MiniYamlNode("DisabledOverlay", new MiniYaml("")));
|
||||
}
|
||||
}
|
||||
|
||||
// ChronoshiftDeploy was replaced with PortableChrono
|
||||
@@ -267,9 +265,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
if (node.Value.Nodes.Any(n => n.Key.StartsWith("RenderBuilding"))
|
||||
&& !node.Value.Nodes.Any(n => n.Key == "RenderBuildingWall")
|
||||
&& !node.Value.Nodes.Any(n => n.Key == "WithMakeAnimation"))
|
||||
{
|
||||
node.Value.Nodes.Add(new MiniYamlNode("WithMakeAnimation", new MiniYaml("")));
|
||||
}
|
||||
}
|
||||
|
||||
// ParachuteAttachment was merged into Parachutable
|
||||
|
||||
@@ -53,18 +53,14 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
var player = GetPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var powers = player.PlayerActor.Trait<SupportPowerManager>().Powers
|
||||
.Select((a, i) => new { a, i });
|
||||
foreach (var power in powers)
|
||||
{
|
||||
if (!clocks.ContainsKey(power.a.Key))
|
||||
{
|
||||
clocks.Add(power.a.Key, new Animation(world, "clock"));
|
||||
}
|
||||
}
|
||||
|
||||
var iconSize = new float2(IconWidth, IconHeight);
|
||||
|
||||
Reference in New Issue
Block a user