private void QueueUpPieces(List <BasePiece> basePieces)
        {
            using (packetSender.Suppress <ConstructionAmountChanged>())
                using (packetSender.Suppress <ConstructionCompleted>())
                    using (packetSender.Suppress <PlaceBasePiece>())
                    {
                        foreach (BasePiece basePiece in basePieces)
                        {
                            buildEventQueue.EnqueueBasePiecePlaced(basePiece);

                            if (basePiece.ConstructionCompleted)
                            {
                                buildEventQueue.EnqueueConstructionCompleted(basePiece.Id, basePiece.BaseId);
                            }
                            else
                            {
                                buildEventQueue.EnqueueAmountChanged(basePiece.Id, basePiece.ConstructionAmount);
                            }
                        }
                    }
        }
Example #2
0
 public override void Process(ConstructionAmountChanged amountChanged)
 {
     buildEventQueue.EnqueueAmountChanged(amountChanged.Id, amountChanged.ConstructionAmount);
 }