Example #1
0
        /// <summary>
        /// Completes the initialization by updating the prequisites and checking trainability on trial account.
        /// </summary>
        internal void CompleteInitialization(IEnumerable <SerializableSkillPrerequisite> prereqs)
        {
            if (prereqs == null)
            {
                return;
            }

            // Create the prerequisites list
            Prerequisites.AddRange(prereqs.Select(x => new StaticSkillLevel(x.GetSkill(), x.Level)));
        }
Example #2
0
 public TechProject(
     fbGame game,
     int owner,
     Station station,
     int length,
     TechID tech
     ) : base(game, owner, station, Tech.Techs[tech].Cost, length)
 {
     this.tech = tech;
     Prerequisites.AddRange(Tech.Techs[tech].Prerequisites);
 }
Example #3
0
    public virtual void Initialize(Actor a, string d, List <Goal> p, List <Goal> o)
    {
        m_Actor     = a;
        Description = d;

        Prerequisites.AddRange(p);
        Options.AddRange(o);

        foreach (var prereq in Prerequisites)
        {
            prereq.Initialize(a);
        }
    }
Example #4
0
 public BuildingProject(
     fbGame game,
     int owner,
     Station station,
     int length,
     UnitType unitType
     ) : base(
         game,
         owner,
         station,
         unitType.Cost,
         length
         )
 {
     this.unitType = unitType;
     Prerequisites.AddRange(unitType.Prerequisites);
 }
Example #5
0
        /// <summary>
        /// Completes the initialization by updating the prequisites and checking trainability on trial account.
        /// </summary>
        internal void CompleteInitialization(IEnumerable <SerializableSkillPrerequisite> prereqs)
        {
            if (prereqs == null)
            {
                return;
            }

            // Create the prerequisites list
            Prerequisites.AddRange(prereqs.Select(x => new StaticSkillLevel(x.GetSkill(), x.Level)));

            if (!IsTrainableOnTrialAccount)
            {
                return;
            }

            // Check trainableOnTrialAccount on its childrens to be sure it's really trainable
            if (Prerequisites.All(prereq => prereq.Skill.IsTrainableOnTrialAccount))
            {
                return;
            }

            IsTrainableOnTrialAccount = false;
        }
Example #6
0
 public DatabaseSpecification After(params Specification[] specifications)
 {
     return(new DatabaseSpecification(_databaseName, MigrationHistoryBuilder,
                                      Prerequisites.AddRange(specifications.SelectMany(x => x.Migrations))));
 }
Example #7
0
 public TableSpecification After(params Specification[] specifications)
 {
     return(new TableSpecification(_migration, MigrationHistoryBuilder,
                                   Prerequisites.AddRange(specifications.SelectMany(x => x.Migrations))));
 }