Ejemplo n.º 1
0
 public virtual void TryOutputItem()
 {
     if (!OutputSlotOccupied && thingPlacementQueue.Count > 0)
     {
         GenPlace.TryPlaceThing(thingPlacementQueue.First(), OutputSlot, Map, ThingPlaceMode.Direct);
         thingPlacementQueue.RemoveAt(0);
     }
     else if (thingPlacementQueue.Count > 0)
     {
         foreach (var t in thingPlacementQueue)
         {
             var thing = OutputSlot.GetThingList(Map).Find(th => th.CanStackWith(t));
             thing?.TryAbsorbStack(t, true);
             if (t.Destroyed || t.stackCount == 0)
             {
                 thingPlacementQueue.Remove(t);
                 break;
             }
         }
     }
 }