Disables "building"-speech when nothing more can be built

This commit is contained in:
Kanar
2014-01-18 22:42:05 +01:00
parent d28992c054
commit aace7ca607
2 changed files with 12 additions and 6 deletions

View File

@@ -225,11 +225,8 @@ namespace OpenRA.Mods.RA
{
var inQueue = Queue.Count(pi => pi.Item == order.TargetString);
var owned = self.Owner.World.ActorsWithTrait<Buildable>().Count(a => a.Actor.Info.Name == order.TargetString && a.Actor.Owner == self.Owner);
if (inQueue + owned >= bi.BuildLimit)
{
Sound.PlayNotification(self.Owner, "Speech", Info.BlockedAudio, self.Owner.Country.Race);
return;
}
if (inQueue + owned >= bi.BuildLimit)
return;
}
for (var n = 0; n < order.TargetLocation.X; n++) // repeat count