Beispiel #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)));
        }
Beispiel #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);
 }
Beispiel #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);
        }
    }
Beispiel #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);
 }
Beispiel #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;
        }
Beispiel #6
0
 public DatabaseSpecification After(params Specification[] specifications)
 {
     return(new DatabaseSpecification(_databaseName, MigrationHistoryBuilder,
                                      Prerequisites.AddRange(specifications.SelectMany(x => x.Migrations))));
 }
Beispiel #7
0
 public TableSpecification After(params Specification[] specifications)
 {
     return(new TableSpecification(_migration, MigrationHistoryBuilder,
                                   Prerequisites.AddRange(specifications.SelectMany(x => x.Migrations))));
 }