public bool Tick() { if (!billOfMaterials.HasMats) { billOfMaterials.Tick(); return(false); } else { workRemaining++; if (workRemaining >= def.workTicksAmount) { return(true); } return(false); } }
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); } } } } }