Пример #1
0
 private void SetItem(Goods current)
 {
     if (current == this.current)
     {
         return;
     }
     recent.Remove(current);
     if (recent.Count > 18)
     {
         recent.RemoveAt(0);
     }
     if (this.current != null)
     {
         recent.Add(this.current);
     }
     this.current = current;
     currentFlow  = current.ApproximateFlow(atCurrentMilestones);
     productions.Clear();
     foreach (var recipe in current.production)
     {
         productions.Add(new RecipeEntry(recipe, true, current, atCurrentMilestones));
     }
     productions.Sort(this);
     usages.Clear();
     foreach (var usage in current.usages)
     {
         usages.Add(new RecipeEntry(usage, false, current, atCurrentMilestones));
     }
     usages.Sort(this);
     Rebuild();
     productionList.Rebuild();
     usageList.Rebuild();
 }
Пример #2
0
 public float GetGoodsFlow(Goods goods) => goods.ApproximateFlow();