Propagate race to produced actors.

This commit is contained in:
Paul Chote
2014-06-21 21:29:14 +12:00
parent 4b2663015b
commit 4db2cf6b2b
10 changed files with 48 additions and 34 deletions

View File

@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Cnc
public ProductionAirdrop(ProductionAirdropInfo info, Actor self)
: base(info, self) { }
public override bool Produce(Actor self, ActorInfo producee)
public override bool Produce(Actor self, ActorInfo producee, string raceVariant)
{
var owner = self.Owner;
@@ -69,7 +69,8 @@ namespace OpenRA.Mods.Cnc
foreach (var cargo in self.TraitsImplementing<INotifyDelivery>())
cargo.Delivered(self);
self.World.AddFrameEndTask(ww => DoProduction(self, producee, exit));
self.World.AddFrameEndTask(ww => DoProduction(self, producee, exit, raceVariant));
Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.ReadyAudio, self.Owner.Country.Race);
}));

View File

@@ -125,7 +125,7 @@ namespace OpenRA.Mods.Cnc.Widgets
if (first != null && first.Done && actor.Traits.Contains<BuildingInfo>())
{
Sound.Play(TabClick);
World.OrderGenerator = new PlaceBuildingOrderGenerator(CurrentQueue.Actor, icon.Name);
World.OrderGenerator = new PlaceBuildingOrderGenerator(CurrentQueue, icon.Name);
}
else if (first != null && first.Paused)
{