Restored production queue current item checks
Fixes regression #5948 where you could freely build any building by canceling the production before deploying by restoring the currentItem checks in the PlaceBuilding order to ensure that the production is still valid.
This commit is contained in:
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
var unit = self.World.Map.Rules.Actors[order.TargetString];
|
||||
var queue = order.TargetActor.TraitsImplementing<ProductionQueue>()
|
||||
.FirstOrDefault(q => q.CanBuild(unit));
|
||||
.FirstOrDefault(q => q.CanBuild(unit) && q.CurrentItem() != null && q.CurrentItem().Item == order.TargetString && q.CurrentItem().RemainingTime == 0);
|
||||
|
||||
if (queue == null)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user