Brace style fixes

This commit is contained in:
ScottNZ
2015-02-12 23:54:32 +13:00
parent 1eb6c984f5
commit 582b6635ff
23 changed files with 21 additions and 82 deletions

View File

@@ -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>())
{

View File

@@ -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
{

View File

@@ -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);
}
}
})));
}

View File

@@ -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) });
}
});
}