Allow player to add a "priority unit" to production queue
* If production is ordered by `Ctrl + Left Click` the item is added to the top of the stack after the currently produced item * Works with `Shift` for priority queueing of 5 items * This modifier is not taken into account for `ParallelProductionQueue` as it doesn't make sense in that context
This commit is contained in:
committed by
abcdefg30
parent
81d53a4f1a
commit
a7279415dc
@@ -50,6 +50,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return Queue.Contains(item);
|
||||
}
|
||||
|
||||
protected override void BeginProduction(ProductionItem item, bool hasPriority)
|
||||
{
|
||||
// Ignore `hasPriority` as it's not relevant in parallel production context.
|
||||
Queue.Add(item);
|
||||
}
|
||||
|
||||
public override int RemainingTimeActual(ProductionItem item)
|
||||
{
|
||||
var parallelBuilds = Queue.FindAll(i => !i.Paused && !i.Done)
|
||||
|
||||
Reference in New Issue
Block a user