Beispiel #1
0
 protected Invention(string name, string description, Value cost, params Invention[] requiredInventions) : base(name)
 {
     this.description = description;
     this.Cost        = cost;
     allInventions.Add(this);
     if (requiredInventions != null)
     {
         foreach (var item in requiredInventions)
         {
             InventedPreviousTechs.add(new Condition(x => (x as IInventor).Science.IsInvented(item), item.ShortName + " aren't invented", true));
         }
     }
     Invented = new Condition(x => (x as IInventor).Science.IsInvented(this), "Invented " + name, true);
 }
Beispiel #2
0
 public bool CanInvent(IInventor inventor)
 {
     return(InventedPreviousTechs.isAllTrue(inventor));
 }