Fix indentation in ProductionFromMapEdge

This commit is contained in:
Oliver Brakmann
2016-02-28 18:22:54 +01:00
parent df7ec2b029
commit 0039cbc590

View File

@@ -74,37 +74,37 @@ namespace OpenRA.Mods.D2k.Traits
var initialFacing = self.World.Map.FacingBetween(location.Value, destination, 0); var initialFacing = self.World.Map.FacingBetween(location.Value, destination, 0);
self.World.AddFrameEndTask(w => self.World.AddFrameEndTask(w =>
{
var td = new TypeDictionary
{ {
var td = new TypeDictionary new OwnerInit(self.Owner),
{ new LocationInit(location.Value),
new OwnerInit(self.Owner), new CenterPositionInit(pos),
new LocationInit(location.Value), new FacingInit(initialFacing)
new CenterPositionInit(pos), };
new FacingInit(initialFacing)
};
if (factionVariant != null) if (factionVariant != null)
td.Add(new FactionInit(factionVariant)); td.Add(new FactionInit(factionVariant));
var newUnit = self.World.CreateActor(producee.Name, td); var newUnit = self.World.CreateActor(producee.Name, td);
var move = newUnit.TraitOrDefault<IMove>(); var move = newUnit.TraitOrDefault<IMove>();
if (move != null) if (move != null)
newUnit.QueueActivity(move.MoveTo(destination, 2)); newUnit.QueueActivity(move.MoveTo(destination, 2));
newUnit.SetTargetLine(Target.FromCell(self.World, destination), Color.Green, false); newUnit.SetTargetLine(Target.FromCell(self.World, destination), Color.Green, false);
if (!self.IsDead) if (!self.IsDead)
foreach (var t in self.TraitsImplementing<INotifyProduction>()) foreach (var t in self.TraitsImplementing<INotifyProduction>())
t.UnitProduced(self, newUnit, destination); t.UnitProduced(self, newUnit, destination);
var notifyOthers = self.World.ActorsWithTrait<INotifyOtherProduction>(); var notifyOthers = self.World.ActorsWithTrait<INotifyOtherProduction>();
foreach (var notify in notifyOthers) foreach (var notify in notifyOthers)
notify.Trait.UnitProducedByOther(notify.Actor, self, newUnit); notify.Trait.UnitProducedByOther(notify.Actor, self, newUnit);
foreach (var t in newUnit.TraitsImplementing<INotifyBuildComplete>()) foreach (var t in newUnit.TraitsImplementing<INotifyBuildComplete>())
t.BuildingComplete(newUnit); t.BuildingComplete(newUnit);
}); });
return true; return true;
} }