Add logic to disallowing On Hold on a queue.

This commit is contained in:
Mustafa Alperen Seki
2018-03-15 12:54:29 +03:00
committed by reaperrr
parent f2e270ce06
commit 356f24b78c
2 changed files with 5 additions and 2 deletions

View File

@@ -294,9 +294,9 @@ namespace OpenRA.Mods.Common.Widgets
Game.Sound.Play(SoundType.UI, TabClick);
if (item.Paused || item.Done || item.TotalCost == item.RemainingCost)
if (CurrentQueue.Info.DisallowPaused || item.Paused || item.Done || item.TotalCost == item.RemainingCost)
{
// Instant cancel of things we have not started yet and things that are finished
// Instantly cancel items that haven't started, have finished, or if the queue doesn't support pausing
Game.Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Speech", CurrentQueue.Info.CancelledAudio, World.LocalPlayer.Faction.InternalName);
World.IssueOrder(Order.CancelProduction(CurrentQueue.Actor, icon.Name, handleCount));
}