Exemplo n.º 1
0
        public virtual void Tick()
        {
            if (underConstruction)
            {
                if (!constructionPaused)
                {
                    if (!billOfMaterials.HasMats)
                    {
                        billOfMaterials.Tick();
                    }
                    else
                    {
                        if (DecreaseTime())
                        {
                            underConstruction = false;
                            Messages.Message("AssemblyLineConstructionFinished".Translate(this.label), MessageSound.Benefit);
                        }
                    }
                }
            }
            else
            {
                UpgradeManager.Tick();

                if (CurrentOrder != null)
                {
                    if (CurrentOrder.DesiresToWork)
                    {
                        CurrentOrder.Tick();
                    }
                    else
                    {
                        if (orderStack.Count > 1 && orderStack.Any((Order o) => o.DesiresToWork))
                        {
                            OrderStack.FinishOrderAndGetNext(CurrentOrder);
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
 public virtual void SpawnSetup()
 {
     UpgradeManager.SpawnSetup();
 }